-
-
Notifications
You must be signed in to change notification settings - Fork 534
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
Support for TS 3.7 (Optional Chaining, Nullish Coalescing) #906
Comments
What’s the error? It’s most likely your configuration, this package supports any typescript version you’re using. |
`const data = result?.rows; SyntaxError: Unexpected token . I use nodemon with this config : Same error with Nullish Coalescing syntax. |
This is a runtime error, not a TypeScript error. Duplicate of #903. |
If someone get to this the problem is in |
I am also having trouble getting optional chaining to work with ES2020, but it does work with ES2019. Problem is I need
Error:
|
@clairefro you should be able to set "lib" to include es2020 type declarations and "target" to downlevel to es2019. If you have any more questions, I recommend asking on the TypeScript Community Discord. https://discord.com/invite/typescript |
@clairefro same thing March 13, 2021, I hope I could have time to provide a solution for this feature, but I don't, I got many things to do, kudos and thanks to all the people working hard on this, as a dev I appreciate the effort, but for now, I will wait for a solution using ES2020, my problem is fixed by using ES2019, but I don't know why yet, I am open to explanations ✌️. |
Check out the configs from @tsconfig/bases. Look at the |
Hi there,
I just tried to upgrade my app to TypeScript 3.7 but I just got stuck on ts-node (8.4.1) not recognising the syntax of both Optional Chaining (obj?.prop) and Nullish Coalescing (const value = val1 ?? val2).
Since I didn't see any issue related to this, do you know if there is someone already working on it ?
I could try to help with this, even though I don't have any experience with ts-node code base.
The text was updated successfully, but these errors were encountered: