-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
DuplicateAn existing issue was already createdAn existing issue was already createdQuestionAn issue which isn't directly actionable in codeAn issue which isn't directly actionable in code
Description
Since TypeScript is a superset of JavaScript it should be possible to compile ES6 code without errors.
This valid ES6 snippets throws the following error:
Error:(3, 14) TS2339: Property 'weight' does not exist on type 'Car'.
class Car {
constructor(weight) {
this.weight = weight;
}
}
Is this a bug or a 'feature'?
Metadata
Metadata
Assignees
Labels
DuplicateAn existing issue was already createdAn existing issue was already createdQuestionAn issue which isn't directly actionable in codeAn issue which isn't directly actionable in code