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
Type 'readonly { baz: number; }[]' is not assignable to type 'Spec<{ baz: number; }, never>'.
Type 'readonly { baz: number; }[]' is not assignable to type '(v: { baz: number; }) => { baz: number; }'.
Type 'readonly { baz: number; }[]' provides no match for the signature '(v: { baz: number; }): { baz: number; }'.ts(2322)
Workaround
Use $set instead
The text was updated successfully, but these errors were encountered:
m-rutter
changed the title
$push and ReadonlyArray does not play nice
$push and ReadonlyArray<T> does not play nice
Mar 30, 2020
I am having issues with
$push
andReadonlyArray
types, which is very common in graphql codegen generated interfaces.Minimal Example
returns this type error:
Workaround
Use
$set
insteadThe text was updated successfully, but these errors were encountered: