File tree 4 files changed +29
-25
lines changed
4 files changed +29
-25
lines changed Original file line number Diff line number Diff line change 74
74
"@babel/plugin-transform-flow-strip-types" : " ^7.0.0" ,
75
75
"@babel/preset-env" : " ^7.0.0" ,
76
76
"@babel/register" : " ^7.0.0" ,
77
- "@types/node" : " ^10 .12.18 " ,
77
+ "@types/node" : " ^12 .12.0 " ,
78
78
"@types/webpack" : " ^4.4.22" ,
79
79
"acorn" : " ^5.2.1" ,
80
80
"babel-eslint" : " ^10.0.1" ,
136
136
"serialize-javascript" : " ^1.3.0" ,
137
137
"shelljs" : " ^0.8.1" ,
138
138
"terser" : " ^3.10.2" ,
139
- "typescript" : " ^3.1.3 " ,
139
+ "typescript" : " ^3.6.4 " ,
140
140
"webpack" : " ~4.28.4" ,
141
141
"weex-js-runtime" : " ^0.23.6" ,
142
142
"weex-styler" : " ^0.3.0" ,
Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ export interface RenderContext<Props=DefaultProps> {
144
144
injections : any
145
145
}
146
146
147
- export type Prop < T > = { ( ) : T } | { new ( ...args : any [ ] ) : T & object } | { new ( ...args : string [ ] ) : Function }
147
+ export type Prop < T > = { ( ) : T } | { new ( ...args : never [ ] ) : T & object } | { new ( ...args : string [ ] ) : Function }
148
148
149
149
export type PropType < T > = Prop < T > | Prop < T > [ ] ;
150
150
Original file line number Diff line number Diff line change @@ -90,21 +90,20 @@ Vue.component('union-prop', {
90
90
}
91
91
} ) ;
92
92
93
- // stopped working since TS 3.4
94
- // Vue.component('union-prop-with-no-casting', {
95
- // props: {
96
- // mixed: [RegExp, Array],
97
- // object: [Cat, User],
98
- // primitive: [String, Number],
99
- // regex: RegExp
100
- // },
101
- // data() {
102
- // this.mixed;
103
- // this.object;
104
- // this.primitive;
105
- // this.regex.compile;
106
- // }
107
- // })
93
+ Vue . component ( 'union-prop-with-no-casting' , {
94
+ props : {
95
+ mixed : [ RegExp , Array ] ,
96
+ object : [ Cat , User ] ,
97
+ primitive : [ String , Number ] ,
98
+ regex : RegExp
99
+ } ,
100
+ data ( ) {
101
+ this . mixed ;
102
+ this . object ;
103
+ this . primitive ;
104
+ this . regex . compile ;
105
+ }
106
+ } )
108
107
109
108
Vue . component ( 'prop-with-primitive-default' , {
110
109
props : {
@@ -113,7 +112,7 @@ Vue.component('prop-with-primitive-default', {
113
112
default : ( ) => String ( Math . round ( Math . random ( ) * 10000000 ) )
114
113
}
115
114
} ,
116
- created ( ) {
115
+ created ( ) : void {
117
116
this . id ;
118
117
}
119
118
} ) ;
@@ -152,7 +151,7 @@ Vue.component('component', {
152
151
}
153
152
} ,
154
153
methods : {
155
- plus ( ) {
154
+ plus ( ) : void {
156
155
this . a ++ ;
157
156
this . aDouble . toFixed ( ) ;
158
157
this . aPlus = 1 ;
Original file line number Diff line number Diff line change 675
675
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f"
676
676
integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==
677
677
678
- " @types/node@*" , "@types/node@^10.12.18" :
678
+ " @types/node@* " :
679
679
version "10.12.18"
680
680
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.18.tgz#1d3ca764718915584fcd9f6344621b7672665c67"
681
681
integrity sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==
682
682
683
+ " @types/node@^12.12.0 " :
684
+ version "12.12.0"
685
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.0.tgz#ff3201972d6dc851a9275308a17b9b5094e68057"
686
+ integrity sha512-6N8Sa5AaENRtJnpKXZgvc119PKxT1Lk9VPy4kfT8JF23tIe1qDfaGkBR2DRKJFIA7NptMz+fps//C6aLi1Uoug==
687
+
683
688
" @types/tapable@* " :
684
689
version "1.0.4"
685
690
resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.4.tgz#b4ffc7dc97b498c969b360a41eee247f82616370"
@@ -7927,10 +7932,10 @@ typedarray@^0.0.6:
7927
7932
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
7928
7933
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
7929
7934
7930
- typescript@^3.1.3 :
7931
- version "3.2.2 "
7932
- resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.2.2 .tgz#fe8101c46aa123f8353523ebdcf5730c2ae493e5 "
7933
- integrity sha512-VCj5UiSyHBjwfYacmDuc/NOk4QQixbE+Wn7MFJuS0nRuPQbof132Pw4u53dm264O8LPc2MVsc7RJNml5szurkg ==
7935
+ typescript@^3.6.4 :
7936
+ version "3.6.4 "
7937
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.6.4 .tgz#b18752bb3792bc1a0281335f7f6ebf1bbfc5b91d "
7938
+ integrity sha512-unoCll1+l+YK4i4F8f22TaNVPRHcD9PA3yCuZ8g5e0qGqlVlJ/8FSateOLLSagn+Yg5+ZwuPkL8LFUc0Jcvksg ==
7934
7939
7935
7940
uglify-js@^3.1.4 :
7936
7941
version "3.6.1"
You can’t perform that action at this time.
0 commit comments