Open
Description
TypeScript Version: 3.7.0-dev.20190831
Search Terms: class, constructor, static, computed, quoted
Code
class A { static constructor() {} }
class B { static "constructor"() {} }
class C { static ["constructor"]() {} }
Expected behavior:
Even though it may be confused with non-standard extensions like #265, I think treating all cases equally would be less confusing, because unlike non-static ["constructor"]
there is no difference at runtime.
Actual behavior:
A
and B
(with #31949) get a 'static' modifier cannot appear on a constructor declaration.
diagnostic.
Playground Link:
http://www.typescriptlang.org/play/#code/MYGwhgzhAECC0G9oQC5hQS2NYB7AdqgE4CuwKuRAFAJSIC+09AUKJDAEKLJqbYBEeQilLlK-WgyatwUaAGFuqdFmgBtQQWJkKRfgF1JCRiyA
Related Issues: #31020, eslint/eslint#12110