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
`<script setup lang="ts">const model = defineModel<number | undefined>()</script>`,
236
+
),
237
+
).toMatchInlineSnapshot(`
238
+
"<script setup>
239
+
const model = defineModel({ type: null })
240
+
</script>"
241
+
`)
242
+
expect(
243
+
awaitfixture(
244
+
`<script setup lang="ts">const model = defineModel<boolean | undefined>()</script>`,
245
+
),
246
+
).toMatchInlineSnapshot(`
247
+
"<script setup>
248
+
const model = defineModel({ type: Boolean, skipCheck: true })
249
+
</script>"
250
+
`)
251
+
expect(
252
+
awaitfixture(
253
+
`<script setup lang="ts">const model = defineModel<Function | undefined>()</script>`,
254
+
),
255
+
).toMatchInlineSnapshot(`
256
+
"<script setup>
257
+
const model = defineModel({ type: Function, skipCheck: true })
258
+
</script>"
259
+
`)
233
260
234
261
awaitexpect(fixture('<script setup lang="ts">defineModel("foo", "bar")</script>')).rejects.toThrow(`[vue-sfc-transformer] defineModel()'s second argument must be an object.`)
0 commit comments