-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Closed
Description
Version
3.2.11
Reproduction link
Steps to reproduce
interface Option {
value: unknown;
text: string;
}
const optionsProptype: PropType<string[]> | PropType<number[]> | PropType<Option[]> = Array;
// const selectedProptype = [String, Number, Object]; <-- this works
// const selectedProptype = [String, Number, Object] as const; <-- Doesn't work but not a big deal. Wanted to mention it anyways.
const selectedProptype = [String, Number, Object as PropType<Option>];
export default defineComponent({
props: {
options: {
type: optionsProptype,
required: true,
},
modelValue: { // <---- ERROR: No overload matches this call. The last overload gave the following error. ts(2769)
type: selectedProptype,
required: true,
},
},
});
What is expected?
No error
What is actually happening?
ERROR: No overload matches this call. The last overload gave the following error. ts(2769)
Metadata
Metadata
Assignees
Labels
No labels