-
-
Notifications
You must be signed in to change notification settings - Fork 421
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Johnson Chu <[email protected]>
- Loading branch information
1 parent
50be014
commit 828b9e5
Showing
4 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
packages/vue-test-workspace/vue-tsc/non-strict-template/#3204/main.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<script setup lang="ts" generic="T"> | ||
import { exactType } from 'vue-tsc/shared'; | ||
const props = withDefaults(defineProps<{ | ||
value?: T | null; | ||
list?: T[]; | ||
}>(), { | ||
value: null, | ||
}); | ||
</script> | ||
|
||
<template> | ||
<div v-for="item of list"> | ||
{{ exactType(item, {} as T) }} | ||
</div> | ||
<div v-for="item of props.list"> | ||
{{ exactType(item, {} as T) }} | ||
</div> | ||
<div v-for="item of $props.list"> | ||
{{ exactType(item, {} as T) }} | ||
</div> | ||
</templat> |
13 changes: 13 additions & 0 deletions
13
packages/vue-test-workspace/vue-tsc/non-strict-template/#3405/main.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<script setup lang="ts" generic="T"> | ||
import { exactType } from 'vue-tsc/shared'; | ||
const props = defineProps<{ | ||
foo: T; | ||
bar: string; | ||
}>(); | ||
</script> | ||
|
||
<template> | ||
{{ exactType(props.bar, '' as string) }} | ||
{{ exactType(props.foo, {} as T) }} | ||
</template> |