We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
yyx990803
Learn more about funding links in repositories.
Report abuse
this.$props
string
1 parent d9d4d4e commit 704173eCopy full SHA for 704173e
packages-private/dts-test/defineComponent.test-d.tsx
@@ -2068,3 +2068,13 @@ expectString(instance.actionText)
2068
// public prop on $props should be optional
2069
// @ts-expect-error
2070
expectString(instance.$props.actionText)
2071
+
2072
+// #12122
2073
+defineComponent({
2074
+ props: { foo: String },
2075
+ render() {
2076
+ expectType<{ readonly foo?: string }>(this.$props)
2077
+ // @ts-expect-error
2078
+ expectType<string>(this.$props)
2079
+ },
2080
+})
packages/runtime-core/src/apiDefineComponent.ts
@@ -265,7 +265,7 @@ export function defineComponent<
265
Mixin,
266
Extends,
267
ResolvedEmits,
268
- RuntimeEmitsKeys,
+ {},
269
{},
270
false,
271
InjectOptions,
0 commit comments