Skip to content

Commit 7078cd8

Browse files
committed
fix: Map index type incorrect in v-for
close #544
1 parent 03a6c94 commit 7078cd8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/vscode-vue-languageservice/src/utils/globalDoc.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ declare global {
6767
interface __VLS_GlobalComponents extends GlobalComponents { }
6868
var __VLS_defineComponent: PickNotAny<typeof vue_1.defineComponent, typeof vue_2.defineComponent>;
6969
function __VLS_getVforSourceType<T>(source: T): T extends number ? number[] : T;
70-
function __VLS_getVforKeyType<T>(source: T): T extends AnyArray ? number : keyof T;
71-
function __VLS_getVforIndexType<T>(source: T): T extends AnyArray ? undefined : number;
70+
function __VLS_getVforKeyType<T>(source: T): T extends AnyArray ? number : typeof Symbol.iterator extends keyof T ? number : keyof T;
71+
function __VLS_getVforIndexType<T>(source: T): T extends AnyArray ? undefined : typeof Symbol.iterator extends keyof T ? undefined : number;
7272
function __VLS_getNameOption<T>(t?: T): T extends { name: infer N } ? N : undefined;
7373
function __VLS_pickForItem<S, T2>(source: S, forInItem: T2): S extends { [Symbol.iterator](): IterableIterator<infer T1> } ? T1 : T2;
7474
function __VLS_mergePropDefaults<P, D>(props: P, defaults: D): {

0 commit comments

Comments
 (0)