File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -91,23 +91,18 @@ describe('props', () => {
91
91
92
92
class App extends Props {
93
93
mounted ( ) {
94
- type ExpectedProps = Readonly <
95
- {
96
- foo : number
97
- bar : string
98
- } & {
99
- baz ?: boolean | undefined
100
- }
101
- >
102
-
103
94
const vm = this
104
95
equals < typeof vm . foo , number > ( true )
105
96
equals < typeof vm . bar , string > ( true )
106
97
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 )
108
101
109
102
// @ts -expect-error
110
103
this . nonExist
104
+ // @ts -expect-error
105
+ this . $props . nonExist
111
106
}
112
107
}
113
108
} )
@@ -157,7 +152,7 @@ describe('emits', () => {
157
152
class App extends Emits {
158
153
mounted ( ) {
159
154
const vm = this
160
- equals < typeof vm . $props , { } > ( true )
155
+ equals < typeof vm . $props , any > ( false )
161
156
}
162
157
}
163
158
} )
You can’t perform that action at this time.
0 commit comments