Browse Source

fix(types): update this for nextTick api (#9541)

dev
Gcaufy 6 years ago
committed by Evan You
parent
commit
f33301619d
  1. 3
      types/test/vue-test.ts
  2. 2
      types/vue.d.ts

3
types/test/vue-test.ts

@ -86,6 +86,9 @@ class Test extends Vue {
}
});
this.nextTick(() => {});
this.nextTick(function () {
console.log(this.text === 'test');
}, { text: 'test'});
this.nextTick().then(() => {});
this.set({}, "", "");
this.set({}, 1, "");

2
types/vue.d.ts

@ -89,7 +89,7 @@ export interface VueConstructor<V extends Vue = Vue> {
extend<Props>(definition: FunctionalComponentOptions<Props, RecordPropsDefinition<Props>>): ExtendedVue<V, {}, {}, {}, Props>;
extend(options?: ComponentOptions<V>): ExtendedVue<V, {}, {}, {}, {}>;
nextTick(callback: () => void, context?: any[]): void;
nextTick<T>(callback: (this: T) => void, context?: T): void;
nextTick(): Promise<void>
set<T>(object: object, key: string | number, value: T): T;
set<T>(array: T[], key: number, value: T): T;

Loading…
Cancel
Save