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
typeRect={width: number|undefined;}classHasARect<TextendsRect>{rect: T;get<KextendskeyofT>(prop: K): T[K]{returnthis.rect[prop];}getWidth(r: T): number{returnthis.get("width")||0;// Type 'undefined' is not assignable to type 'number'.}}
Expected behavior:
This is not a type error.
Actual behavior:
Type 'T["width"]' is not assignable to type 'number'.
Type 'number | undefined' is not assignable to type 'number'.
Type 'undefined' is not assignable to type 'number'.
The text was updated successfully, but these errors were encountered:
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
TypeScript Version: 2.6.2
Code
Expected behavior:
This is not a type error.
Actual behavior:
The text was updated successfully, but these errors were encountered: