|
|
@@ -10,7 +10,8 @@ import {
|
|
|
ShallowUnwrapRef,
|
|
|
FunctionalComponent,
|
|
|
ComponentPublicInstance,
|
|
|
- toRefs
|
|
|
+ toRefs,
|
|
|
+ IsAny
|
|
|
} from './index'
|
|
|
|
|
|
declare function extractComponentOptions<Props, RawBindings>(
|
|
|
@@ -62,6 +63,7 @@ describe('object props', () => {
|
|
|
ffff: Ref<(a: number, b: string) => { a: boolean }>
|
|
|
validated: Ref<string | undefined>
|
|
|
object: Ref<object | undefined>
|
|
|
+ zzz: any
|
|
|
}
|
|
|
|
|
|
describe('defineComponent', () => {
|
|
|
@@ -130,7 +132,8 @@ describe('object props', () => {
|
|
|
// validator requires explicit annotation
|
|
|
validator: (val: unknown) => val !== ''
|
|
|
},
|
|
|
- object: Object as PropType<object>
|
|
|
+ object: Object as PropType<object>,
|
|
|
+ zzz: Object as PropType<any>
|
|
|
},
|
|
|
setup(props) {
|
|
|
const refs = toRefs(props)
|
|
|
@@ -152,6 +155,7 @@ describe('object props', () => {
|
|
|
expectType<ExpectedRefs['ffff']>(refs.ffff)
|
|
|
expectType<ExpectedRefs['validated']>(refs.validated)
|
|
|
expectType<ExpectedRefs['object']>(refs.object)
|
|
|
+ expectType<IsAny<typeof props.zzz>>(true)
|
|
|
|
|
|
return {
|
|
|
setupA: 1,
|