Skip to content

Commit 241c572

Browse files
committed
feat: typescript versions support graceful degradation
1 parent 67eb752 commit 241c572

File tree

19 files changed

+262
-123
lines changed

19 files changed

+262
-123
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ es-legacy
44
umd
55
tslib
66
tses
7+
types-legacy/*/*.d.ts
78
node_modules
89
npm-debug.log
910
e2e/fixtures/scripts

enum-plus v3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
- [x] Release the `UMD` module format of `enum-plus` in `umd` folder.
1919
- [x] Reuse one copy of testing code for both `Jest` and `e2e` testing.
2020
- [x] Remove `private member` syntax from the codebase.
21-
- [ ] Add `typesVersions` to `package.json` to support multiple TypeScript versions. Also add another copy to `exports` field to fix [Node16's bug](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-9.html#exports-is-prioritized-over-typesversions).
21+
- [x] Support graceful downgrade for multiple TypeScript versions. For `v5.0` and later, Enum initializations allows omitting the `as const` assertion. For earlier versions, will be automatically downgraded to the earlier syntax, just manually adding `as const` as needed.
2222

2323
### Plugin System
2424

0 commit comments

Comments
 (0)