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
TypeScript 4.0 Syntax Support #2260
Comments
Support for the |
This would be awesome to have an ESLint rule for to require it! The TS team even alluded to that in their announcement :) |
With that it probably also makes sense to add a rule to enforce the same for Promise |
If v4.0 is live - should the docs be updated? They still say that it only supports TypeScript < 3.10.0 |
@bradennapier still only v4.0.0-rc, not stable release yet. |
Sweet, thanks! Well the docs on that branch I think still say the support is for Thanks! |
Whilst we support the syntax, we don't officially mark ourselves as supporting the beta/rc versions. This release required minimal changes to support, so we were luckily able to add full support ahead of time. 3.9 was similar in that it required no changes, but we waited for the full release before bumping. 3.8 we still don't have full support for because we're waiting on the AST spec for private class members. Note that our v4 release is entirely unrelated to TS v4 release (I wasn't supposed to link that PR, I wasn't thinking and confused myself). When TS v4.0 officially releases, there may be some changes since the RC that we need to handle, so we have to wait until it is released before we update all of the docs and version ranges. |
checking in here since I'm doing an upgrade right now and see the warnings from this package in my console |
Well yeah, TS4.0 was only released to npm 3 hours ago....... |
Can't wait 😍 |
It looks like TS 4.0 is supported, according to the status of this ticket, but I've upgraded TS to 4.02, and Basically I'm seeing #2098 (but that's been closed and locked, otherwise I'd comment over there). Am I missing something obvious here? |
likely your versions are out of sync somewhere - either there are multiple versions of our tooling installed locally, or your IDE needs to be restarted to pick up the new versions. We have passing tests (fixture and snapshot) that are currently running against TS4.0.2, so it's unlikely to be a bug from our end? Unless I missed some syntax. |
This happened to me as well, first in CI builds only but eventually in my local machine after deleting node_modules and reinstalling packages. Not sure what's wrong. |
I'm unable to repro. As mentioned it's working fine in master. Also I just tried a clean install with:
// .eslintrc.js
module.exports = {
parser: "@typescript-eslint/parser",
rules: {
semi: 1
}
}; // a.ts
type T = [a: string]; $ DEBUG=typescript-eslint:* yarn eslint a.ts
typescript-eslint:typescript-estree:createIsolatedProgram Getting isolated program in TSX mode for: ./a.ts +0ms
Done in 0.96s. Check the versions installed in your |
Oh yeah, you're right. Thanks! |
@neilbryson How did you force that resolution on react-scripts? |
Yarn has this functionality built in https://classic.yarnpkg.com/en/docs/selective-version-resolutions/ |
https://devblogs.microsoft.com/typescript/announcing-typescript-4-0-beta/
Variadic Tuple Types (Supported)
This is already supported at the AST level - this is a type functionality change only.
Labelled Tuple Elements (Supported #2378)
This requires AST updates.
Short-Circuiting Assignment Operators (Supported #2307)
This requires AST updates.
AST: estree/estree#212
unknown
oncatch
Clause Bindings (Supported #2306)This requires AST updates
The text was updated successfully, but these errors were encountered: