TypeScript/tests/cases/conformance/classes/members/privateNames/privateNameUncheckedJsOptionalChain.ts
Joey Watts f84b2d20a9 Parse error on private identifier optional chain (#35987)
Previously, this error was reported in the checker, so JS files with
checkJs: false were not erroring on this invalid syntax.
2020-01-07 16:00:15 -08:00

13 lines
216 B
TypeScript

// @allowJs: true
// @checkJs: false
// @noEmit: true
// @Filename: privateNameUncheckedJsOptionalChain.js
// @target: es2015
class C {
#bar;
constructor () {
this?.#foo;
this?.#bar;
}
}