forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace DataType enum with type & add runtime dataTypes (elastic#82231)
## Summary Expands on pattern added in elastic#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
committed
Nov 4, 2020
1 parent
e541395
commit cf3f854
Showing
4 changed files
with
18 additions
and
7 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