Skip to content

Commit d2e1d49

Browse files
Zzzenyyx990803
authored andcommitted
fix(types): use object and string instead of Object and String (vuejs#7126)
1 parent a71e653 commit d2e1d49

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

types/options.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ export interface ComponentOptions<
5858
PropsDef=PropsDefinition<DefaultProps>> {
5959
data?: Data;
6060
props?: PropsDef;
61-
propsData?: Object;
61+
propsData?: object;
6262
computed?: Accessors<Computed>;
6363
methods?: Methods;
6464
watch?: Record<string, WatchOptionsWithHandler<any> | WatchHandler<any> | string>;
6565

66-
el?: Element | String;
66+
el?: Element | string;
6767
template?: string;
6868
render?(createElement: CreateElement): VNode;
6969
renderError?: (h: () => VNode, err: Error) => VNode;
@@ -83,10 +83,10 @@ export interface ComponentOptions<
8383

8484
directives?: { [key: string]: DirectiveFunction | DirectiveOptions };
8585
components?: { [key: string]: Component<any, any, any, any> | AsyncComponent<any, any, any, any> };
86-
transitions?: { [key: string]: Object };
86+
transitions?: { [key: string]: object };
8787
filters?: { [key: string]: Function };
8888

89-
provide?: Object | (() => Object);
89+
provide?: object | (() => object);
9090
inject?: InjectOptions;
9191

9292
model?: {

types/vnode.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ export interface VNode {
2727

2828
export interface VNodeComponentOptions {
2929
Ctor: typeof Vue;
30-
propsData?: Object;
31-
listeners?: Object;
30+
propsData?: object;
31+
listeners?: object;
3232
children?: VNodeChildren;
3333
tag?: string;
3434
}
@@ -42,14 +42,14 @@ export interface VNodeData {
4242
staticClass?: string;
4343
class?: any;
4444
staticStyle?: { [key: string]: any };
45-
style?: Object[] | Object;
45+
style?: object[] | object;
4646
props?: { [key: string]: any };
4747
attrs?: { [key: string]: any };
4848
domProps?: { [key: string]: any };
4949
hook?: { [key: string]: Function };
5050
on?: { [key: string]: Function | Function[] };
5151
nativeOn?: { [key: string]: Function | Function[] };
52-
transition?: Object;
52+
transition?: object;
5353
show?: boolean;
5454
inlineTemplate?: {
5555
render: Function;

types/vue.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export interface Vue {
3737
readonly $attrs: Record<string, string>;
3838
readonly $listeners: Record<string, Function | Function[]>;
3939

40-
$mount(elementOrSelector?: Element | String, hydrating?: boolean): this;
40+
$mount(elementOrSelector?: Element | string, hydrating?: boolean): this;
4141
$forceUpdate(): void;
4242
$destroy(): void;
4343
$set: typeof Vue.set;
@@ -78,9 +78,9 @@ export interface VueConstructor<V extends Vue = Vue> {
7878

7979
nextTick(callback: () => void, context?: any[]): void;
8080
nextTick(): Promise<void>
81-
set<T>(object: Object, key: string, value: T): T;
81+
set<T>(object: object, key: string, value: T): T;
8282
set<T>(array: T[], key: number, value: T): T;
83-
delete(object: Object, key: string): void;
83+
delete(object: object, key: string): void;
8484
delete<T>(array: T[], key: number): void;
8585

8686
directive(

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy