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
Using OptionalDeep on an object that contains any breaks the generated type.
Reproduce the bug
typeMyType={foo: string;bar: any;};typeOptionalType=O.Partial<MyType,'deep'>;constt: OptionalType={foo: 'ok',bar: {// ts error: type 'string' is not assignable to type 'OptionalDeep<any>'.bar: 'baz',},};// OptionalType evaluates to:typeOptionalType={foo?: string|undefined;bar?: OptionalDeep<any>|undefined;}
🐞 Bug Report
Describe the bug
Using
OptionalDeep
on an object that containsany
breaks the generated type.Reproduce the bug
Expected behavior
OptionalDeep<any>
should evaluate toany
.Possible Solution
Change OptionalDeep to:
Screenshots
after proposed fix:
The text was updated successfully, but these errors were encountered: