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
Allow to assign optional property into it equivalent number | undefined
Actual behavior:
TS2345: Argument of type 'typeof C' is not assignable to parameter of type 'ComponentClass<{ a: number | undefined; }>'.
Type 'C' is not assignable to type 'Component<{ a: number | undefined; }, ComponentState>'.
Types of property 'props' are incompatible.
Type 'Readonly<{ children?: ReactNode; }> & Readonly<F>' is not assignable to type 'Readonly<{ children?: ReactNode; }> & Readonly<{ a: number | undefined; }>'.
Type 'Readonly<{ children?: ReactNode; }> & Readonly<F>' is not assignable to type 'Readonly<{ a: number | undefined; }>'.
Property 'a' is optional in type 'Readonly<{ children?: ReactNode; }> & Readonly<F>' but required in type 'Readonly<{ a: number | undefined; }>'.
Activity
j-oliveras commentedon Dec 22, 2017
Duplicate of #12400? (seams like will be solved into typescript 2.8)