Playground
interfacePolymerElement{properties?: {[propName: string]: StringConstructor|PolymerElementProperty};}interfacePolymerElementProperty{type: StringConstructor;}// Why is this incorrectly implements?classWithoutTypeAnnotationimplementsPolymerElement{properties={prop1: String,prop2: {type: String}};}classWithTypeAnnotationimplementsPolymerElement{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.
Playground
Both
propertiesare same object, but tsc occurs error in a case without type annotation. Why?Thanks.