abstract
modifier cannot be used with private a identifier
#60617
Labels
Milestone
abstract
modifier cannot be used with private a identifier
#60617
π Search Terms
abstract, private fields, classes
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play/?ssl=17&ssc=22&pln=1&pc=1#code/IYIwzgLgTsDGEAJYBthjAgggg3gKAQVEhngQGIAPALgQDsBXAWxAFMoCFOBzViADQAUASlydCUPgyh0EEABYBLMADoqnAL55OkYBEWwEAIQQBeJKnTGErShFZ0AJhmz5ChWAHs6JBvE9QImLu7mAMAA7sIuLuCspqlGYIAKwxWoRaWnhePojASXSsAO5YKkbZ3mCeyKwqyJ7cgsAqvAIiwkA
π» Code
This code works as you would expect at runtime (chrome devtools screenshot), since nested static classes can access the same private fields as their containing class.
π Actual behavior
TypeScript errors on line 2 with this message:
... requiring a ts-expect-error directive.
π Expected behavior
The abstract keyword is allowed.
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: