Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cbbdca9

Browse filesBrowse files
committed
test: fix props related test for types
1 parent ab65f42 commit cbbdca9
Copy full SHA for cbbdca9

File tree

Expand file treeCollapse file tree

1 file changed

+6
-11
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-11
lines changed

‎test-dts/mixins.ts

Copy file name to clipboardExpand all lines: test-dts/mixins.ts
+6-11Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -91,23 +91,18 @@ describe('props', () => {
9191

9292
class App extends Props {
9393
mounted() {
94-
type ExpectedProps = Readonly<
95-
{
96-
foo: number
97-
bar: string
98-
} & {
99-
baz?: boolean | undefined
100-
}
101-
>
102-
10394
const vm = this
10495
equals<typeof vm.foo, number>(true)
10596
equals<typeof vm.bar, string>(true)
10697
equals<typeof vm.baz, boolean | undefined>(true)
107-
equals<typeof vm.$props, ExpectedProps>(true)
98+
equals<typeof vm.$props.foo, number | undefined>(true)
99+
equals<typeof vm.$props.bar, string>(true)
100+
equals<typeof vm.$props.baz, boolean | undefined>(true)
108101

109102
// @ts-expect-error
110103
this.nonExist
104+
// @ts-expect-error
105+
this.$props.nonExist
111106
}
112107
}
113108
})
@@ -157,7 +152,7 @@ describe('emits', () => {
157152
class App extends Emits {
158153
mounted() {
159154
const vm = this
160-
equals<typeof vm.$props, {}>(true)
155+
equals<typeof vm.$props, any>(false)
161156
}
162157
}
163158
})

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.