Skip to content

Commit 0cd9202

Browse files
refactor: cleanup ts ignore
1 parent 85c7f52 commit 0cd9202

File tree

2 files changed

+72
-65
lines changed

2 files changed

+72
-65
lines changed

Diff for: src/vue-wrapper.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ export class VueWrapper implements WrapperAPI {
1919
vm: ComponentPublicInstance,
2020
setProps?: (props: Record<string, any>) => void
2121
) {
22-
// TODO Remove cast after Vue releases the fix
23-
this.rootVM = (vm.$root as any) as ComponentPublicInstance
22+
this.rootVM = vm.$root
2423
this.componentVM = vm
2524
this.__setProps = setProps
2625
}
@@ -110,10 +109,9 @@ export class VueWrapper implements WrapperAPI {
110109

111110
setProps(props: Record<string, any>): Promise<void> {
112111
// if this VM's parent is not the root, error out
113-
// TODO: Remove ignore after Vue releases fix
114-
// @ts-ignore
115-
if (this.vm.$parent !== this.rootVM)
112+
if (this.vm.$parent !== this.rootVM) {
116113
throw Error('You can only use setProps on your mounted component')
114+
}
117115
this.__setProps(props)
118116
return nextTick()
119117
}

Diff for: yarn.lock

+69-60
Original file line numberDiff line numberDiff line change
@@ -268,10 +268,10 @@
268268
dependencies:
269269
"@babel/types" "^7.8.3"
270270

271-
"@babel/helper-validator-identifier@^7.9.0":
272-
version "7.9.0"
273-
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz#ad53562a7fc29b3b9a91bbf7d10397fd146346ed"
274-
integrity sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw==
271+
"@babel/helper-validator-identifier@^7.9.0", "@babel/helper-validator-identifier@^7.9.5":
272+
version "7.9.5"
273+
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz#90977a8e6fbf6b431a7dc31752eee233bf052d80"
274+
integrity sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==
275275

276276
"@babel/helper-wrap-function@^7.8.3":
277277
version "7.8.3"
@@ -830,7 +830,16 @@
830830
lodash "^4.17.13"
831831
to-fast-properties "^2.0.0"
832832

833-
"@babel/types@^7.8.6", "@babel/types@^7.9.0":
833+
"@babel/types@^7.8.6":
834+
version "7.9.5"
835+
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.5.tgz#89231f82915a8a566a703b3b20133f73da6b9444"
836+
integrity sha512-XjnvNqenk818r5zMaba+sLQjnbda31UfUURv3ei0qPQw4u+j2jMyJ5b11y8ZHYTRSI3NnInQkkkRT4fLqqPdHg==
837+
dependencies:
838+
"@babel/helper-validator-identifier" "^7.9.5"
839+
lodash "^4.17.13"
840+
to-fast-properties "^2.0.0"
841+
842+
"@babel/types@^7.9.0":
834843
version "7.9.0"
835844
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.0.tgz#00b064c3df83ad32b2dbf5ff07312b15c7f1efb5"
836845
integrity sha512-BS9JKfXkzzJl8RluW4JGknzpiUV7ZrvTayM6yfqLTVBEnFtyowVIOu6rqxRd5cVO6yGoWf4T8u8dgK9oB+GCng==
@@ -1222,34 +1231,34 @@
12221231
dependencies:
12231232
"@types/yargs-parser" "*"
12241233

1225-
1226-
version "3.0.0-alpha.12"
1227-
resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.0.0-alpha.12.tgz#f125bdfd637d6bcc95edb2c55483a242932c5d2e"
1228-
integrity sha512-0aDhUP9SS+O1psH2xm08oxQQV+5p5ig/zhSNL8fOreSQabIzfSuNfZqrJ8e2Ffa+zoJkZ0Z0SKJ1+UuzHXm0zA==
1234+
1235+
version "3.0.0-alpha.13"
1236+
resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.0.0-alpha.13.tgz#8126c92f562af047c28c4ce7f343d77f0ceea7d7"
1237+
integrity sha512-k7VTQnjQlCfsSdfwi867dUHUzqm5/2qldikWAABMlaqr4mEn+yVCla7JqQxFGZta/JF8cOv/GfqlA/vWBlYh7A==
12291238
dependencies:
12301239
"@babel/parser" "^7.8.6"
12311240
"@babel/types" "^7.8.6"
1232-
"@vue/shared" "3.0.0-alpha.12"
1241+
"@vue/shared" "3.0.0-alpha.13"
12331242
estree-walker "^0.8.1"
12341243
source-map "^0.6.1"
12351244

1236-
1237-
version "3.0.0-alpha.12"
1238-
resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.0.0-alpha.12.tgz#3f5b856007d5201c477540299bd89e0989e83543"
1239-
integrity sha512-MpdGAFmS8Pc945Kgo0FbAQVObi+aTBGpDCz4f1UwBBR8z/TVgENTd8DXzksOnu82RrW1hV5Lbn3uUW/RuHFJlQ==
1245+
1246+
version "3.0.0-alpha.13"
1247+
resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.0.0-alpha.13.tgz#b1930ebbe770dbed543dbe7ac88f2955719051f2"
1248+
integrity sha512-g5FnVAx+HLUox3N+XHKIZTpMJeJu5Uj0JNf8X4s5Td5zFcWG+KJGUHz8qU9H0unrPc01uiT/VfhYErhFcRdVKg==
12401249
dependencies:
1241-
"@vue/compiler-core" "3.0.0-alpha.12"
1242-
"@vue/shared" "3.0.0-alpha.12"
1250+
"@vue/compiler-core" "3.0.0-alpha.13"
1251+
"@vue/shared" "3.0.0-alpha.13"
12431252

12441253
"@vue/compiler-sfc@^3.0.0-alpha.12":
1245-
version "3.0.0-alpha.12"
1246-
resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.0.0-alpha.12.tgz#485db9f732486c9007402683eeac2ed78313a788"
1247-
integrity sha512-rshwehh3tvRf5xx4ONYgQOYYjXKeZEwES2ZeSEG2oLRw4vnkHryFB9gLpV6I+E9fhlJ4RHiNRxR1Sj+kbDk71A==
1248-
dependencies:
1249-
"@vue/compiler-core" "3.0.0-alpha.12"
1250-
"@vue/compiler-dom" "3.0.0-alpha.12"
1251-
"@vue/compiler-ssr" "3.0.0-alpha.12"
1252-
"@vue/shared" "3.0.0-alpha.12"
1254+
version "3.0.0-alpha.13"
1255+
resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.0.0-alpha.13.tgz#075921331a01ab483e71e3b33bf4238c0c35a449"
1256+
integrity sha512-koU+iNgyleTBRphI/XZ4V1UxveQC4ILniOXFVRNTHBCzSzfFI+Dd5lHMr3BDOABnb1EuUZeC/hAz6tc4U0qzEw==
1257+
dependencies:
1258+
"@vue/compiler-core" "3.0.0-alpha.13"
1259+
"@vue/compiler-dom" "3.0.0-alpha.13"
1260+
"@vue/compiler-ssr" "3.0.0-alpha.13"
1261+
"@vue/shared" "3.0.0-alpha.13"
12531262
consolidate "^0.15.1"
12541263
hash-sum "^2.0.0"
12551264
lru-cache "^5.1.1"
@@ -1258,42 +1267,42 @@
12581267
postcss-selector-parser "^6.0.2"
12591268
source-map "^0.6.1"
12601269

1261-
1262-
version "3.0.0-alpha.12"
1263-
resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.0.0-alpha.12.tgz#533d8aa43595a9df764d2af7227ae4720d777324"
1264-
integrity sha512-DNdBuRaE37QECxoCskOD2m2AYaInP9b9eGlZM4atWIOUfBrJkpS9mUxloRDP+cOrk6S7N88VGLbEEOpF4wnbIQ==
1270+
1271+
version "3.0.0-alpha.13"
1272+
resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.0.0-alpha.13.tgz#9d8955b1af20c819bc2e4c336d4987ce36f92f15"
1273+
integrity sha512-K3+PQKKQGQNdlqLpAah7s5jRlE5sDCkhc54PM7XK7F9yjyzWFWApaMEZjJrqYWjjYFgLkTXzgd8CdV72vMy7HQ==
12651274
dependencies:
1266-
"@vue/compiler-dom" "3.0.0-alpha.12"
1267-
"@vue/shared" "3.0.0-alpha.12"
1275+
"@vue/compiler-dom" "3.0.0-alpha.13"
1276+
"@vue/shared" "3.0.0-alpha.13"
12681277

1269-
1270-
version "3.0.0-alpha.12"
1271-
resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.0.0-alpha.12.tgz#35cb74dd08ee8f8929166b54cbaa0c30c959a865"
1272-
integrity sha512-9lSysYh00p1lkZehwjUf6r4aZIgp+rRKIWfxlffnnEwH1rloOV0RkYJrix4NTOcxHHqIYYcoGBVJ3AK64pCJoQ==
1278+
1279+
version "3.0.0-alpha.13"
1280+
resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.0.0-alpha.13.tgz#032fbfd1b9c50153e2f37fc99ae63b460377387a"
1281+
integrity sha512-ICzFWsxQAyPDW8O9SGJ++tYXRHOUBTh1/qKZsIEOTQEI1Rt0O9EOOXA3NGlGmSS2U0EXO0Usfcvn9EoHRwFBHw==
12731282
dependencies:
1274-
"@vue/shared" "3.0.0-alpha.12"
1283+
"@vue/shared" "3.0.0-alpha.13"
12751284

1276-
1277-
version "3.0.0-alpha.12"
1278-
resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.0.0-alpha.12.tgz#790c4a9743d2999d1886b6da1a193f90aaf5fa9a"
1279-
integrity sha512-eVhd4bbVNd25FulwR9B6QD5+TeADlwSUm1ktRA0zvO3Sy+QAABPXXI147R/i18tr2v51tVWsUTIWz5f7H7Uang==
1285+
1286+
version "3.0.0-alpha.13"
1287+
resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.0.0-alpha.13.tgz#2430fc835399924c206d113e6f6acaa921707a3f"
1288+
integrity sha512-bo6hQQN0qfo7zWaSdegTa2eU7yXEK4v3noLyHmWhCbIzrKPa0pauGU1nBnXOlTgM8bkL8i8+rvMB0YwEJkhLMw==
12801289
dependencies:
1281-
"@vue/reactivity" "3.0.0-alpha.12"
1282-
"@vue/shared" "3.0.0-alpha.12"
1290+
"@vue/reactivity" "3.0.0-alpha.13"
1291+
"@vue/shared" "3.0.0-alpha.13"
12831292

1284-
1285-
version "3.0.0-alpha.12"
1286-
resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.0.0-alpha.12.tgz#70044b72db2ec184b49baaa6e36fc7ac6f7b2fbd"
1287-
integrity sha512-G5JHfJfm/NX0hsoI/x3PNYqzv99B4Dryz9WU++WAIwM+VZLyTat0H6Q3jWdVeGm5h9tY/zr6UD7NokGRKuwsUw==
1293+
1294+
version "3.0.0-alpha.13"
1295+
resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.0.0-alpha.13.tgz#de33f7ae9035877ede1bee27e5c28108f1eea86a"
1296+
integrity sha512-fnz1QZhLxodrDFSvtTwP84xGo6yrzEoC1k7LFh0mnOu6Mw3r4WkVhD8xeh3A/oPJ3jM22cIe8SL5UJqLeltQyw==
12881297
dependencies:
1289-
"@vue/runtime-core" "3.0.0-alpha.12"
1290-
"@vue/shared" "3.0.0-alpha.12"
1298+
"@vue/runtime-core" "3.0.0-alpha.13"
1299+
"@vue/shared" "3.0.0-alpha.13"
12911300
csstype "^2.6.8"
12921301

1293-
1294-
version "3.0.0-alpha.12"
1295-
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.0.0-alpha.12.tgz#36855f95e2855f0099980aebf63edf51e0bad471"
1296-
integrity sha512-SVXQd0fJ7Fod7J8WBFDPLp0rNobnixo11E+OevC9cBs5Y0fZklAr+8i5XaJJ/fdPr9qDWFHweXDwIvVzpoZMOA==
1302+
1303+
version "3.0.0-alpha.13"
1304+
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.0.0-alpha.13.tgz#7d9bcf763c77bd9e10bbb6a27577af7f0ad853c4"
1305+
integrity sha512-j3co+5x0DNZXQzS3drvWaRwQVFltkY4fQHdegfVIofhXZc/PrHP4E+PE3U8GxeqrU6DSjO+4YpY4aVGRUjbgpw==
12971306

12981307
abab@^2.0.0:
12991308
version "2.0.3"
@@ -1951,9 +1960,9 @@ cssstyle@^2.0.0:
19511960
cssom "~0.3.6"
19521961

19531962
csstype@^2.6.8:
1954-
version "2.6.9"
1955-
resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.9.tgz#05141d0cd557a56b8891394c1911c40c8a98d098"
1956-
integrity sha512-xz39Sb4+OaTsULgUERcCk+TJj8ylkL4aSVDQiX/ksxbELSqwkgt4d4RD7fovIdgJGSuNYqwZEiVjYY5l0ask+Q==
1963+
version "2.6.10"
1964+
resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.10.tgz#e63af50e66d7c266edb6b32909cfd0aabe03928b"
1965+
integrity sha512-D34BqZU4cIlMCY93rZHbrq9pjTAQJ3U8S8rfBqjwHxkGPThWFjzZDQpgMJY0QViLxth6ZKYiwFBo14RdN44U/w==
19571966

19581967
dashdash@^1.12.0:
19591968
version "1.14.1"
@@ -5111,13 +5120,13 @@ vue-jest@vuejs/vue-jest#next:
51115120
ts-jest "^24.0.0"
51125121

51135122
vue@^3.0.0-alpha.12:
5114-
version "3.0.0-alpha.12"
5115-
resolved "https://registry.yarnpkg.com/vue/-/vue-3.0.0-alpha.12.tgz#b8eb8dd47822e8d4479bd2d4155a28f7b2c72689"
5116-
integrity sha512-EKMdt7MOSXLo6F6h8UHLI8GzW58qDyyKPLt4NV6GOzyjtSPdlx2j+ZsCe6C9d+NRXSvvf4RtUwpWqOZ/jGmZwg==
5123+
version "3.0.0-alpha.13"
5124+
resolved "https://registry.yarnpkg.com/vue/-/vue-3.0.0-alpha.13.tgz#a0428ec5494841f2f3564b47a17c550645b8f442"
5125+
integrity sha512-U7Lq60IJojWAUqn7n43F0TqfcQdjYOgQ2OTQuz7wvcfStJ+LxNFOd8/qX5MuJCG/f/7gmOMda1+U/CEa6NEEIg==
51175126
dependencies:
5118-
"@vue/compiler-dom" "3.0.0-alpha.12"
5119-
"@vue/runtime-dom" "3.0.0-alpha.12"
5120-
"@vue/shared" "3.0.0-alpha.12"
5127+
"@vue/compiler-dom" "3.0.0-alpha.13"
5128+
"@vue/runtime-dom" "3.0.0-alpha.13"
5129+
"@vue/shared" "3.0.0-alpha.13"
51215130

51225131
vuex@^4.0.0-alpha.1:
51235132
version "4.0.0-alpha.1"

0 commit comments

Comments
 (0)