|
|
@@ -387,12 +387,14 @@ const props = defineProps({ foo: String })
|
|
|
qux?(): number;
|
|
|
quux?(): void
|
|
|
quuxx?: Promise<string>;
|
|
|
+ quuux?: number;
|
|
|
fred?: string
|
|
|
}>(), {
|
|
|
foo: 'hi',
|
|
|
qux() { return 1 },
|
|
|
['quux']() { },
|
|
|
async quuxx() { return await Promise.resolve('hi') },
|
|
|
+ quuux(a, [b, ...c], {d, ...e}, ...f) { return 1 },
|
|
|
get fred() { return 'fred' }
|
|
|
})
|
|
|
</script>
|
|
|
@@ -412,6 +414,9 @@ const props = defineProps({ foo: String })
|
|
|
expect(content).toMatch(
|
|
|
`quuxx: { type: Promise, required: false, async default() { return await Promise.resolve('hi') } }`,
|
|
|
)
|
|
|
+ expect(content).toMatch(
|
|
|
+ `quuux: { type: Number, required: false, default(a, [b, ...c], {d, ...e}, ...f) { return 1 } }`,
|
|
|
+ )
|
|
|
expect(content).toMatch(
|
|
|
`fred: { type: String, required: false, get default() { return 'fred' } }`,
|
|
|
)
|
|
|
@@ -423,6 +428,7 @@ const props = defineProps({ foo: String })
|
|
|
qux: BindingTypes.PROPS,
|
|
|
quux: BindingTypes.PROPS,
|
|
|
quuxx: BindingTypes.PROPS,
|
|
|
+ quuux: BindingTypes.PROPS,
|
|
|
fred: BindingTypes.PROPS,
|
|
|
props: BindingTypes.SETUP_CONST,
|
|
|
})
|