mirror of
https://gitee.com/vuejs/vue.git
synced 2024-11-29 18:47:39 +08:00
fix(types): update this for nextTick api (#9541)
This commit is contained in:
parent
2277b2322c
commit
f33301619d
@ -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
vendored
2
types/vue.d.ts
vendored
@ -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…
Reference in New Issue
Block a user