Skip to content

Commit 32b65e3

Browse files
committed
chore(dependecy): upgrade typescript
1 parent 33add70 commit 32b65e3

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"rollup-plugin-terser": "^4.0.4",
4545
"rollup-plugin-typescript2": "^0.21.0",
4646
"ts-jest": "^24.0.2",
47-
"typescript": "^3.4.5",
47+
"typescript": "^3.6.2",
4848
"vue": "^2.5.22"
4949
},
5050
"peerDependencies": {

src/apis/watch.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ function createWatcher(
113113
};
114114

115115
if (flushMode === 'sync') {
116+
// @ts-ignore: use undocumented option "sync" ahd "before"
116117
return vm.$watch(getter, noopFn, {
117118
immediate: true,
118119
deep: options.deep,
119-
// @ts-ignore
120120
sync: true,
121121
before: runCleanup,
122122
});
@@ -127,10 +127,10 @@ function createWatcher(
127127
const doWatch = () => {
128128
if (hasEnded) return;
129129

130+
// @ts-ignore: use undocumented option "before"
130131
stopRef = vm.$watch(getter, noopFn, {
131132
immediate: false,
132133
deep: options.deep,
133-
// @ts-ignore
134134
before: runCleanup,
135135
});
136136
};
@@ -191,6 +191,7 @@ function createWatcher(
191191
applyCb(n, o);
192192
};
193193

194+
// @ts-ignore: use undocumented option "sync"
194195
const stop = vm.$watch(getter, options.lazy ? callback : shiftCallback, {
195196
immediate: !options.lazy,
196197
deep: options.deep,

src/setup.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,9 @@ export function mixin(Vue: VueConstructor) {
153153
// wrapper the data option, so we can invoke setup before data get resolved
154154
$options.data = function wrappedData() {
155155
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 || {};
157159
};
158160
}
159161

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4152,10 +4152,10 @@ type-fest@^0.4.1:
41524152
resolved "https://registry.npm.taobao.org/type-fest/download/type-fest-0.4.1.tgz#8bdf77743385d8a4f13ba95f610f5ccd68c728f8"
41534153
integrity sha1-i993dDOF2KTxO6lfYQ9czWjHKPg=
41544154

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=
41594159

41604160
uglify-js@^3.1.4:
41614161
version "3.6.0"

0 commit comments

Comments
 (0)