Microsoft/TypeScript
GitHub で見るNo error for undeclared #private property in `.js` files
Open
#35,962 opened on 2020年1月2日
BugDomain: JavaScriptEffort: ModerateHelp Wanted
Repository metrics
- Stars
- (48,455 stars)
- PR merge metrics
- (平均マージ 6d 17h) (30d で 9 merged PRs)
説明
class Thing {
/**
* @param prop {string}
*/
constructor(prop) {
this.#prop = prop;
}
}
This class assigns to #prop, but it's an error to use #prop without declaring it.
This is reported as a SyntaxError, so this should report an error even outside of checkJs.