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
When using patchOptions, which is returned from useModal, I would like to enable TypeScript support for partial patching of options. Currently, if a modal has two props (regardless of whether they are required or optional), calling patchOptions({ attrs: { prop1: true } }) results in a TypeScript error indicating that the second prop is not set. However, since patchOptions is designed to allow partial updates to options, it should support partial typing without requiring all props to be defined.
What is actually happening?
Type '{ prop1: boolean; }' is not assignable to type 'NonNullable<Partial<{}> & Omit<{ readonly prop1: boolean; readonly prop2: boolean; } & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>>'.
Property 'prop1' is missing in type '{ prop2: boolean; }' but required in type 'Omit<{ readonly prop1: boolean; readonly prop2: boolean; } & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>'.ts-plugin(2322)
The text was updated successfully, but these errors were encountered:
Version
vue-final-modal: 4.5.5
vue: 3.5.13
nuxt: 3.15.1
OS
Mac
What is Expected?
When using
patchOptions
, which is returned fromuseModal
, I would like to enable TypeScript support for partial patching of options. Currently, if a modal has two props (regardless of whether they are required or optional), callingpatchOptions({ attrs: { prop1: true } })
results in a TypeScript error indicating that the second prop is not set. However, sincepatchOptions
is designed to allow partial updates to options, it should support partial typing without requiring all props to be defined.What is actually happening?
The text was updated successfully, but these errors were encountered: