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
interfaceI{p: string;}classCimplementsI{p: string;pp: number;}// no errorconstc: Partial<C>={p: ""};functionff<TextendsI>(v: Partial<T>){// no errorreturnv.p;}functionf<TextendsI>(){// error TS2322: Type '{ p: string; }' is not assignable to type 'Partial<T>'// why?constt: Partial<T>={p: ""};}
Expected behavior:
No error
Actual behavior:
Error at line: const t: Partial<T> = { p: "" };
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.3.3
See also playground
Code
Expected behavior:
No error
Actual behavior:
Error at line:
const t: Partial<T> = { p: "" };
The text was updated successfully, but these errors were encountered: