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

fix(types): use object and string instead of Object and String (#7126)

Zen 8 лет назад
Родитель
Сommit
d2e1d49c41
3 измененных файлов с 11 добавлено и 11 удалено
  1. 4 4
      types/options.d.ts
  2. 4 4
      types/vnode.d.ts
  3. 3 3
      types/vue.d.ts

+ 4 - 4
types/options.d.ts

@@ -58,12 +58,12 @@ export interface ComponentOptions<
   PropsDef=PropsDefinition<DefaultProps>> {
   data?: Data;
   props?: PropsDef;
-  propsData?: Object;
+  propsData?: object;
   computed?: Accessors<Computed>;
   methods?: Methods;
   watch?: Record<string, WatchOptionsWithHandler<any> | WatchHandler<any> | string>;
 
-  el?: Element | String;
+  el?: Element | string;
   template?: string;
   render?(createElement: CreateElement): VNode;
   renderError?: (h: () => VNode, err: Error) => VNode;
@@ -83,10 +83,10 @@ export interface ComponentOptions<
 
   directives?: { [key: string]: DirectiveFunction | DirectiveOptions };
   components?: { [key: string]: Component<any, any, any, any> | AsyncComponent<any, any, any, any> };
-  transitions?: { [key: string]: Object };
+  transitions?: { [key: string]: object };
   filters?: { [key: string]: Function };
 
-  provide?: Object | (() => Object);
+  provide?: object | (() => object);
   inject?: InjectOptions;
 
   model?: {

+ 4 - 4
types/vnode.d.ts

@@ -27,8 +27,8 @@ export interface VNode {
 
 export interface VNodeComponentOptions {
   Ctor: typeof Vue;
-  propsData?: Object;
-  listeners?: Object;
+  propsData?: object;
+  listeners?: object;
   children?: VNodeChildren;
   tag?: string;
 }
@@ -42,14 +42,14 @@ export interface VNodeData {
   staticClass?: string;
   class?: any;
   staticStyle?: { [key: string]: any };
-  style?: Object[] | Object;
+  style?: object[] | object;
   props?: { [key: string]: any };
   attrs?: { [key: string]: any };
   domProps?: { [key: string]: any };
   hook?: { [key: string]: Function };
   on?: { [key: string]: Function | Function[] };
   nativeOn?: { [key: string]: Function | Function[] };
-  transition?: Object;
+  transition?: object;
   show?: boolean;
   inlineTemplate?: {
     render: Function;

+ 3 - 3
types/vue.d.ts

@@ -37,7 +37,7 @@ export interface Vue {
   readonly $attrs: Record<string, string>;
   readonly $listeners: Record<string, Function | Function[]>;
 
-  $mount(elementOrSelector?: Element | String, hydrating?: boolean): this;
+  $mount(elementOrSelector?: Element | string, hydrating?: boolean): this;
   $forceUpdate(): void;
   $destroy(): void;
   $set: typeof Vue.set;
@@ -78,9 +78,9 @@ export interface VueConstructor<V extends Vue = Vue> {
 
   nextTick(callback: () => void, context?: any[]): void;
   nextTick(): Promise<void>
-  set<T>(object: Object, key: string, value: T): T;
+  set<T>(object: object, key: string, value: T): T;
   set<T>(array: T[], key: number, value: T): T;
-  delete(object: Object, key: string): void;
+  delete(object: object, key: string): void;
   delete<T>(array: T[], key: number): void;
 
   directive(