Babel error when using override of TypeScript 4.3.2
See original GitHub issueWhat version of Next.js are you using?
11.0.1
What version of Node.js are you using?
14.16.0
What browser are you using?
Chrome
What operating system are you using?
Windows
How are you deploying your application?
next dev
Describe the Bug
I noticed that the basic-feature
of docs has the wrong information as it says:
But Next.JS still doesn’t support some features of the version because of the Babel version 7.12.5, and what’s new in TypeScript 4.3 is only added in version 7.14.0 as per the update notes
Uncaught at getBabelError
Expected Behavior
update the Babel dependency of Next.JS to version 7.14.0, or remove the Incremental type checking from the docs telling to use a TypeScript version that Next.JS is not yet supported.
To Reproduce
an example error is using the new TypeScript override:
class Test {
show () {
console.log('show Test')
}
}
class Test2 extends Test {
override show(){
console.log('overriding show Test')
}
}
new Test2().show()
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Documentation - TypeScript 4.3
When this option is turned on, it becomes an error to override any method from a superclass unless you explicitly use an override...
Read more >7.14.0 Released: New class features enabled by default ...
Babel 7.14.0 is out! This release enables class fields and private methods by default (they were promoted to Stage 4 during the recent...
Read more >Namespace not marked type-only declare - Babel/Typescript
I used the packages react-app-rewired with the cutomize-cra. I created the config-overrides.js to overrides the config about cra (create-react- ...
Read more >@babel/preset-typescript | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >Javascript – Namespace not marked type-only declare – Babel ...
I have created app via npx create-react-app –typescript. And I wanted to use some autogenerated code with namespaces due to that babel throw...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @ijjk, I tested it and it’s working, thanks.
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.