Skip to content

Commit 9f90748

Browse files
committed
style(lint): enforce array-type
1 parent dd659c2 commit 9f90748

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/tslint.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"allow-leading-underscore",
2222
"allow-pascal-case"
2323
],
24-
"no-namespace": false
24+
"no-namespace": false,
25+
"array-type": [true, "array"]
2526
}
2627
}

src/types/vue-template-compiler.d.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ declare module 'vue-template-compiler' {
2424

2525
interface CompiledResultFunctions {
2626
render: () => VNode;
27-
staticRenderFns: Array<() => VNode>;
27+
staticRenderFns: (() => VNode)[];
2828
}
2929

3030
interface ModuleOptions {
@@ -86,7 +86,7 @@ declare module 'vue-template-compiler' {
8686
export interface ASTElement {
8787
type: 1;
8888
tag: string;
89-
attrsList: Array<{ name: string; value: any }>;
89+
attrsList: { name: string; value: any }[];
9090
attrsMap: Record<string, any>;
9191
parent: ASTElement | undefined;
9292
children: ASTNode[];
@@ -100,8 +100,8 @@ declare module 'vue-template-compiler' {
100100
hasBindings?: boolean;
101101

102102
text?: string;
103-
attrs?: Array<{ name: string; value: any }>;
104-
props?: Array<{ name: string; value: string }>;
103+
attrs?: { name: string; value: any }[];
104+
props?: { name: string; value: string }[];
105105
plain?: boolean;
106106
pre?: true;
107107
ns?: string;
@@ -165,7 +165,7 @@ declare module 'vue-template-compiler' {
165165
type: 2;
166166
expression: string;
167167
text: string;
168-
tokens: Array<string | Record<string, any>>;
168+
tokens: (string | Record<string, any>)[];
169169
static?: boolean;
170170
// 2.4 ssr optimization
171171
ssrOptimizability?: SSROptimizability;

0 commit comments

Comments
 (0)