Skip to content

Commit 11f2378

Browse files
committed
test(language-core): simplify test fixture for #5896
1 parent ab594f1 commit 11f2378

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

test-workspace/tsc/#5895/main.vue

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
1-
<script setup lang="ts" generic="TValue extends string, TGrid extends readonly (readonly TValue[])[]">
2-
import { type MaybeRef, unref } from 'vue';
3-
4-
const getGridKey = (rowIndex: number, columnIndex: number) =>
5-
`${rowIndex}|${columnIndex}`;
6-
7-
class Grid<TValue, TGrid extends readonly (readonly TValue[])[]> {
8-
grid!: MaybeRef<TGrid>;
9-
}
10-
11-
const { grid } = defineProps<{
12-
grid: Grid<TValue, TGrid>;
13-
}>();
1+
<script setup lang="ts" generic="T extends string, TGrid extends readonly (readonly T[])[]">
2+
import { exactType } from '../shared';
143
</script>
154

165
<template>
17-
<template v-for="(row, rowIndex) of unref(grid.grid)" :key="rowIndex">
18-
<div v-for="(_text, columnIndex) of row" :key="getGridKey(rowIndex, columnIndex)" />
6+
<template v-for="(row, rowIndex) of ({} as TGrid)">
7+
{{ exactType(rowIndex, {} as number) }}
8+
<template v-for="(col, columnIndex) of row">
9+
{{ exactType(col, {} as T) }}
10+
{{ exactType(columnIndex, {} as number) }}
11+
</template>
1912
</template>
2013
</template>

0 commit comments

Comments
 (0)