Skip to content

Commit bf9cde8

Browse files
refactor: cleanup ts ignore
1 parent 1f31a51 commit bf9cde8

File tree

2 files changed

+20
-13
lines changed

2 files changed

+20
-13
lines changed

Diff for: src/vue-wrapper.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ export class VueWrapper<T extends ComponentPublicInstance>
2020
vm: ComponentPublicInstance,
2121
setProps?: (props: Record<string, any>) => void
2222
) {
23-
// TODO Remove cast after Vue releases the fix
24-
this.rootVM = (vm.$root as any) as ComponentPublicInstance
23+
this.rootVM = vm.$root
2524
this.componentVM = vm as T
2625
this.__setProps = setProps
2726
}
@@ -111,10 +110,9 @@ export class VueWrapper<T extends ComponentPublicInstance>
111110

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

Diff for: yarn.lock

+17-8
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==
@@ -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"

0 commit comments

Comments
 (0)