-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
) ## Summary Expands on pattern added in #82188 Replace `enum DataType` with TS type `DataType` & runtime JS `dataTypes` ```diff - export enum DataType { - logs = 'logs', - metrics = 'metrics', -} + export const dataTypes = { + Logs: 'logs', + Metrics: 'metrics', + } as const; + export type DataType = typeof dataTypes; ``` <img width="513" alt="Screen Shot 2020-11-02 at 5 13 56 PM" src="https://user-images.githubusercontent.com/57655/97926339-f5898c00-1d30-11eb-8935-92aad936aeea.png"> <img width="774" alt="Screen Shot 2020-11-02 at 5 14 05 PM" src="https://user-images.githubusercontent.com/57655/97926341-f5898c00-1d30-11eb-8d68-b39e2904cf85.png"> <img width="780" alt="Screen Shot 2020-11-02 at 5 19 50 PM" src="https://user-images.githubusercontent.com/57655/97926342-f5898c00-1d30-11eb-9799-95d77bfc1757.png"> # Conflicts: # x-pack/plugins/ingest_manager/common/constants/epm.ts # x-pack/plugins/ingest_manager/common/types/models/epm.ts
- Loading branch information
John Schulz
authored
Nov 4, 2020
1 parent
ec5163c
commit cb7ce2d
Showing
4 changed files
with
13 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters