es2018 class properties compile error
See original GitHub issueclass A {
prop=1;
}
class A {
['asd']=1;
}
output:
JSC_PARSE_ERROR: Parse error. '(' expected at line 3 character 11
['generic']=1;
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How do I target ES2018 in TypeScript? - Stack Overflow
I know I could add "lib": ["es2015"] to add libraries to the compilation but I don't need those libraries, I am targeting ES2018....
Read more >babel/plugin-proposal-class-properties
Below is a class with four class properties which will be transformed. class Bork { //Property initializer syntax instanceProperty = "bork"; boundFunction =...
Read more >Documentation - tsc CLI Options - TypeScript
Flag Type Default
‑‑allowJs boolean false
‑‑allowUmdGlobalAccess boolean false
‑‑allowUnreachableCode boolean
Read more >Avoiding those dang cannot read property of undefined errors
Uncaught TypeError: Cannot read property 'foo' of undefined. The dreaded error we all hit at some point in JavaScript development.
Read more >ES5 to ESNext — here's every feature added to JavaScript ...
ES2018 introduces rest properties, which are the same but for objects. Rest properties: const { first, second, ...others } = { first: 1,...
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 FreeTop 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
Top GitHub Comments
The fact that they’re working in Chrome is one of the reasons we expect them to be added to the standard in ES_2020. The TC39 process requires working implementations of a feature before making it part of the standard.
The closure-compiler team’s goal is to follow the standard rather than any particular browser implementation, even Google’s own.
FWIW, I’m rather anxious to add support for these. I feel they’re long overdue.
Duplicate of #2731