You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this a bug or by design, but it's confusing me:
interfaceConstraint{message?: string;}varbadConstraint: Constraint={messge: "rte"// errors as expected};vargoodConstraint: Constraint|boolean={messge: "rte"// I expect this to error!};
I'm not sure if this a bug or by design, but it's confusing me:
Can anybody explain what is going on here?
http://www.typescriptlang.org/Playground/#src=interface%20Constraint%20%7B%0D%0A%20%20message%3F%3A%20string%3B%0D%0A%7D%0D%0A%0D%0Avar%20badConstraint%3A%20Constraint%20%3D%20%7B%0D%0A%20%20messge%3A%20%22rte%22%20%2F%2F%20errors%20as%20expected%0D%0A%7D%3B%0D%0A%0D%0Avar%20goodConstraint%3A%20Constraint%20%7C%20boolean%20%3D%20%7B%0D%0A%20%20messge%3A%20%22rte%22%20%2F%2F%20I%20expect%20this%20to%20error!%0D%0A%7D%3B%0D%0A