New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Partial support for TypeScript 3.8 (private fields, import/export type modifier) #7631
Conversation
6acb9e5
to
7707dde
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TypeScript 3.8 supports top-level await, so this pr will fix #6608
typescript-estree v2.23.0 has been released which contains support for the The other parts of typescript-eslint/typescript-eslint#1436 have not yet been released as their AST spec has not yet been finalized. It seems like these may take a while to get consensus on so I'd be very tempted to not wait for them.
|
63ba70d
to
869b396
Compare
| ------------------------------------------------------------------------------------------------------------------------------- | ------------------- | ----------------- | | ||
| [Type-Only Imports and Exports](https://devblogs.microsoft.com/typescript/announcing-typescript-3-8/#type-only-imports-exports) | ✔️ | ❌ | | ||
| [ECMAScript Private Fields](https://devblogs.microsoft.com/typescript/announcing-typescript-3-8/#ecmascript-private-fields) | ✔️ | ✔️ | | ||
| [`export * as ns`](https://devblogs.microsoft.com/typescript/announcing-typescript-3-8/#export-star-as-namespace-syntax) | ❌ | ❌ | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export * as ns
seems to be supported with babel-ts
.
Playground
parser=babel-ts
Input:
export * as foo from './foo';
Output
export * as foo from "./foo";
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. Overlooked this somehow. I'll fix the changelog.
export type { A as B }; | ||
export type { B as C } from "./a"; | ||
export type { foo } from "bar"; | ||
export type * from "bar"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thorn0 Is this test needed? TS Playground says "Only named exports may use 'export type'.
".
https://www.typescriptlang.org/play/?ssl=1&ssc=1&pln=2&pc=1#code/KYDwDg9gTgLgBDAnmYcBUcBmUIFs4BEARgIZQEDcAUEA
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove this test. Babel 7.9.0 can't parse it.
issue: #7263
typescript-estree issue: typescript-eslint/typescript-eslint#1436
✨Try the playground for this PR✨