Просмотр исходного кода

fix(types): fix vm.$once argument type (#8995)

vm.$once should accept an event or array of events as first parameter.

fix #8983
hugoazevedosoares 7 лет назад
Родитель
Сommit
97086f3658
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      types/vue.d.ts

+ 1 - 1
types/vue.d.ts

@@ -53,7 +53,7 @@ export interface Vue {
     options?: WatchOptions
   ): (() => void);
   $on(event: string | string[], callback: Function): this;
-  $once(event: string, callback: Function): this;
+  $once(event: string | string[], callback: Function): this;
   $off(event?: string | string[], callback?: Function): this;
   $emit(event: string, ...args: any[]): this;
   $nextTick(callback: (this: this) => void): void;