Skip to content

Commit

Permalink
fix(types): update this for nextTick api (vuejs#9541)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gcaufy authored and kiku-jw committed Jun 18, 2019
1 parent 68069b5 commit c389419
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions types/test/vue-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, "");
Expand Down
2 changes: 1 addition & 1 deletion types/vue.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c389419

Please sign in to comment.