File tree Expand file tree Collapse file tree 4 files changed +11
-8
lines changed Expand file tree Collapse file tree 4 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 44
44
"rollup-plugin-terser" : " ^4.0.4" ,
45
45
"rollup-plugin-typescript2" : " ^0.21.0" ,
46
46
"ts-jest" : " ^24.0.2" ,
47
- "typescript" : " ^3.4.5 " ,
47
+ "typescript" : " ^3.6.2 " ,
48
48
"vue" : " ^2.5.22"
49
49
},
50
50
"peerDependencies" : {
Original file line number Diff line number Diff line change @@ -113,10 +113,10 @@ function createWatcher(
113
113
} ;
114
114
115
115
if ( flushMode === 'sync' ) {
116
+ // @ts -ignore: use undocumented option "sync" ahd "before"
116
117
return vm . $watch ( getter , noopFn , {
117
118
immediate : true ,
118
119
deep : options . deep ,
119
- // @ts -ignore
120
120
sync : true ,
121
121
before : runCleanup ,
122
122
} ) ;
@@ -127,10 +127,10 @@ function createWatcher(
127
127
const doWatch = ( ) => {
128
128
if ( hasEnded ) return ;
129
129
130
+ // @ts -ignore: use undocumented option "before"
130
131
stopRef = vm . $watch ( getter , noopFn , {
131
132
immediate : false ,
132
133
deep : options . deep ,
133
- // @ts -ignore
134
134
before : runCleanup ,
135
135
} ) ;
136
136
} ;
@@ -191,6 +191,7 @@ function createWatcher(
191
191
applyCb ( n , o ) ;
192
192
} ;
193
193
194
+ // @ts -ignore: use undocumented option "sync"
194
195
const stop = vm . $watch ( getter , options . lazy ? callback : shiftCallback , {
195
196
immediate : ! options . lazy ,
196
197
deep : options . deep ,
Original file line number Diff line number Diff line change @@ -153,7 +153,9 @@ export function mixin(Vue: VueConstructor) {
153
153
// wrapper the data option, so we can invoke setup before data get resolved
154
154
$options . data = function wrappedData ( ) {
155
155
initSetup ( vm , vm . $props ) ;
156
- return typeof data === 'function' ? data . call ( vm , vm ) : data || { } ;
156
+ return typeof data === 'function'
157
+ ? ( data as ( this : ComponentInstance , x : ComponentInstance ) => object ) . call ( vm , vm )
158
+ : data || { } ;
157
159
} ;
158
160
}
159
161
Original file line number Diff line number Diff line change @@ -4152,10 +4152,10 @@ type-fest@^0.4.1:
4152
4152
resolved "https://registry.npm.taobao.org/type-fest/download/type-fest-0.4.1.tgz#8bdf77743385d8a4f13ba95f610f5ccd68c728f8"
4153
4153
integrity sha1-i993dDOF2KTxO6lfYQ9czWjHKPg=
4154
4154
4155
- typescript@^3.4.5 :
4156
- version "3.5.1 "
4157
- resolved "https://registry.npm.taobao.org/typescript/download/typescript-3.5.1 .tgz#ba72a6a600b2158139c5dd8850f700e231464202 "
4158
- integrity sha1-unKmpgCyFYE5xd2IUPcA4jFGQgI =
4155
+ typescript@^3.6.2 :
4156
+ version "3.6.2 "
4157
+ resolved "https://registry.npm.taobao.org/typescript/download/typescript-3.6.2 .tgz#105b0f1934119dde543ac8eb71af3a91009efe54 "
4158
+ integrity sha1-EFsPGTQRnd5UOsjrca86kQCe/lQ =
4159
4159
4160
4160
uglify-js@^3.1.4 :
4161
4161
version "3.6.0"
You can’t perform that action at this time.
0 commit comments