-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
QuestionAn issue which isn't directly actionable in codeAn issue which isn't directly actionable in code
Description
interface PolymerElement {
properties?: { [propName: string]: StringConstructor|PolymerElementProperty };
}
interface PolymerElementProperty {
type: StringConstructor;
}
// Why is this incorrectly implements?
class WithoutTypeAnnotation implements PolymerElement {
properties = {
prop1: String,
prop2: {
type: String
}
};
}
class WithTypeAnnotation implements PolymerElement {
properties:{ [propName: string]: StringConstructor|PolymerElementProperty } = {
prop1: String,
prop2: {
type: String
}
};
}
Both properties
are same object, but tsc occurs error in a case without type annotation. Why?
Thanks.
Metadata
Metadata
Assignees
Labels
QuestionAn issue which isn't directly actionable in codeAn issue which isn't directly actionable in code