-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Export enums as const enums but leave original strings intact.
This avoids a breaking change for existing consumers whilst new consumers can still pass in enum values and typecheck. E.g. both of these work: ``` const message: ConsoleMessage = { source: 'xml', level: 'log', text: 'foo' } ``` ``` const message2: ConsoleMessage = { source: ConsoleMessageSource.XML, level: ConsoleMessageLevel.Log, text: 'foo' } ```
- Loading branch information
1 parent
2bb3bb0
commit 08875fa
Showing
2 changed files
with
186 additions
and
176 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
Oops, something went wrong.