-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
TypeScript 5.0 support #783
Comments
alangpierce
added a commit
that referenced
this issue
Mar 20, 2023
Instructions: https://github.com/alangpierce/sucrase/wiki/Porting-changes-from-Babel's-parser Fixes #783 f7e231fc97 Allow negative number in ambient const initializer (#15338) 🚫 Only affects error handling. 89f38880ce v7.20.13 🚫 Release only. 41aac8b803 fix: `new (foo?.bar)()` incorrectly throws exception `OptionalChainingNoNew` (#15377) 🚫 Only affects error handling. 91b24d5d55 chore: Remove meaningless `typeof undefined` (#15395) 🚫 Babel-internal change. 3aee4e367a Disallows specifiers after export * as ns (#15385) 🚫 Only affects error handling. e5e923d99c Disallow await as bound name in using declaration (#15391) 🚫 Only affects error handling. 6e1cc6e958 v7.20.15 🚫 Release only. 812ad554ab polish: improve "`await` as identifier" error in modules (#15400) 🚫 Only affects error handling. d3bd1a3f2f [ts] Fix restrictions for optional parameters (#15414) 🚫 Appears to only affect error handling. 9be2c7fd79 [ts] treat single type param with a constraint as unambiguous (#15436) 🚫 Only affects error handling. 3c26949819 Add `annexb: false` parser option to disable Annex B (#15320) 🚫 I believe all Annex B syntax support was removed long ago. 6e8ce9da64 [ts] Support `export type * from` (#15381) ✅ Ported and added test. 2a7495f2c8 Parser option to allow `new.target` outside functions (#15114) 🚫 Only affects error handling. eae47c9ec8 Implement decorators as presented at `2023-01` TC39 meeting (#15405) ✅ No parser changes were necessary, but added support for decorators after export with imports transform. 2f3ef392d6 [ts] Support `const` modifier in type parameters (#15384) ✅ This was already accidentally working, but I added some logic to make it work intentionally and added a test. 34136c53f8 docs: fix typos (#15432) 🚫 Babel-internal change. de7d75a78b v7.21.0 🚫 Release only. 7feaa36ad5 Fix problems found while publishing 7.21.0 (#15440) 🚫 Not relevant to Sucrase. fa77313884 v7.21.1 🚫 Release only. a2fdc207ce fix: Throws on `new foo?.bar!()` (#15439) 🚫 Only affects error handling. fc33467911 v7.21.2 🚫 Release only. 6e3dffe51a disallow mixins/implements in flow interface (#15479) 🚫 Only affects error handling. 4035521068 chore: Enable rule `no-confusing-void-expression` (#15485) 🚫 Babel-internal change. 80863c220b [ts] Allow keywords in tuple labels (#15423) ✅ Type parsing already allowed keywords, added a test for this case. fbfbd1da8c v7.21.3 🚫 Release only.
alangpierce
added a commit
that referenced
this issue
Mar 20, 2023
Instructions: https://github.com/alangpierce/sucrase/wiki/Porting-changes-from-Babel's-parser Fixes #783 f7e231fc97 Allow negative number in ambient const initializer (#15338) 🚫 Only affects error handling. 89f38880ce v7.20.13 🚫 Release only. 41aac8b803 fix: `new (foo?.bar)()` incorrectly throws exception `OptionalChainingNoNew` (#15377) 🚫 Only affects error handling. 91b24d5d55 chore: Remove meaningless `typeof undefined` (#15395) 🚫 Babel-internal change. 3aee4e367a Disallows specifiers after export * as ns (#15385) 🚫 Only affects error handling. e5e923d99c Disallow await as bound name in using declaration (#15391) 🚫 Only affects error handling. 6e1cc6e958 v7.20.15 🚫 Release only. 812ad554ab polish: improve "`await` as identifier" error in modules (#15400) 🚫 Only affects error handling. d3bd1a3f2f [ts] Fix restrictions for optional parameters (#15414) 🚫 Appears to only affect error handling. 9be2c7fd79 [ts] treat single type param with a constraint as unambiguous (#15436) 🚫 Only affects error handling. 3c26949819 Add `annexb: false` parser option to disable Annex B (#15320) 🚫 I believe all Annex B syntax support was removed long ago. 6e8ce9da64 [ts] Support `export type * from` (#15381) ✅ Ported and added test. 2a7495f2c8 Parser option to allow `new.target` outside functions (#15114) 🚫 Only affects error handling. eae47c9ec8 Implement decorators as presented at `2023-01` TC39 meeting (#15405) ✅ No parser changes were necessary, but added support for decorators after export with imports transform. 2f3ef392d6 [ts] Support `const` modifier in type parameters (#15384) ✅ This was already accidentally working, but I added some logic to make it work intentionally and added a test. 34136c53f8 docs: fix typos (#15432) 🚫 Babel-internal change. de7d75a78b v7.21.0 🚫 Release only. 7feaa36ad5 Fix problems found while publishing 7.21.0 (#15440) 🚫 Not relevant to Sucrase. fa77313884 v7.21.1 🚫 Release only. a2fdc207ce fix: Throws on `new foo?.bar!()` (#15439) 🚫 Only affects error handling. fc33467911 v7.21.2 🚫 Release only. 6e3dffe51a disallow mixins/implements in flow interface (#15479) 🚫 Only affects error handling. 4035521068 chore: Enable rule `no-confusing-void-expression` (#15485) 🚫 Babel-internal change. 80863c220b [ts] Allow keywords in tuple labels (#15423) ✅ Type parsing already allowed keywords, added a test for this case. fbfbd1da8c v7.21.3 🚫 Release only.
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
TypeScript 5.0 was recently released: https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/ and this issue tracks support for new syntax.
Changes relevant to Sucrase:
const
type parameters: This will hopefully be straightforward to implement. My plan is to pull this in as part of catching up on babel-parser changes.export type *
: This also will hopefully be straightforward and picked up as part of babel porting.--verbatimModuleSyntax
: I'm hoping to implement an option like this soon, but I won't consider it necessary as part of this tracking issue. It's great to see this as a new option, and I'm hoping that the community moves to this as a default mode since the behavior is much more clear and it would make the Sucrase implementation much simpler and faster.The text was updated successfully, but these errors were encountered: