},
}),
)
+
+const Comp = defineComponent({
+ props: {
+ actionText: {
+ type: {} as PropType<string>,
+ default: 'Become a sponsor',
+ },
+ },
+ __typeProps: {} as {
+ actionText?: string
+ },
+})
+
+const instance = new Comp()
+function expectString(s: string) {}
+// instance prop with default should be non-null
+expectString(instance.actionText)
+
+// public prop on $props should be optional
+// @ts-expect-error
+expectString(instance.$props.actionText)
C extends ComputedOptions = {},
M extends MethodOptions = {},
E extends EmitsOptions = {},
- PublicProps = P,
+ PublicProps = {},
Defaults = {},
MakeDefaultsOptional extends boolean = false,
Options = ComponentOptionsBase<any, any, any, any, any, any, any, any, any>,
options?: WatchOptions,
): WatchStopHandle
} & ExposedKeys<
- IfAny<P, P, Omit<P, keyof ShallowUnwrapRef<B>>> &
+ IfAny<
+ P,
+ P,
+ Readonly<Defaults> & Omit<P, keyof ShallowUnwrapRef<B> | keyof Defaults>
+ > &
ShallowUnwrapRef<B> &
UnwrapNestedRefs<D> &
ExtractComputedReturns<C> &