We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7683aa7 commit ebb4ab0Copy full SHA for ebb4ab0
test/setup.test.ts
@@ -48,6 +48,19 @@ describe('transform typescript script setup', () => {
48
})
49
</script>"
50
`)
51
+ expect(
52
+ await fixture([
53
+ `<script lang="ts">interface PropsData { msg?: string, count: number }</script>`,
54
+ `<script setup lang="ts">const { msg = 'hello' } = defineProps<PropsData>()</script>`,
55
+ ].join('\n')),
56
+ ).toMatchInlineSnapshot(`
57
+ "<script setup>
58
+ const { msg = 'hello' } = defineProps({
59
+ msg: { type: String, required: false },
60
+ count: { type: Number, required: true }
61
+ })
62
+ </script>"
63
+ `)
64
65
66
it('strips generic from script setup blocks', async () => {
0 commit comments