diff --git a/types/test/vue-test.ts b/types/test/vue-test.ts index 326969c163..b275b17ad0 100644 --- a/types/test/vue-test.ts +++ b/types/test/vue-test.ts @@ -87,8 +87,10 @@ class Test extends Vue { this.nextTick(() => {}); this.nextTick().then(() => {}); this.set({}, "", ""); + this.set({}, 1, ""); this.set([true, false, true], 1, true); this.delete({}, ""); + this.delete({}, 1); this.delete([true, false], 0); this.directive("", {bind() {}}); this.filter("", (value: number) => value); diff --git a/types/vue.d.ts b/types/vue.d.ts index 179fb5fe38..dee41eeef5 100644 --- a/types/vue.d.ts +++ b/types/vue.d.ts @@ -91,9 +91,9 @@ export interface VueConstructor { nextTick(callback: () => void, context?: any[]): void; nextTick(): Promise - set(object: object, key: string, value: T): T; + set(object: object, key: string | number, value: T): T; set(array: T[], key: number, value: T): T; - delete(object: object, key: string): void; + delete(object: object, key: string | number): void; delete(array: T[], key: number): void; directive(