Open bekalshenoy opened 4 years ago
Don't think it relates to the composition api itself. But I suppose you can type the validator.
defineComponent({
props: {
magic: (x: Magic) => true
}
})
@bekalshenoy You can type it this way:
type ComponentProps = {
value: string
}
defineComponent<ComponentProps>({
// Props will automatically has `ComponentProps` type
setup(props) {}
})
The Documentation Is Limited For How To Use Types In Props. It Can Help Me To Use Interface As A Type For A Prop Instead Of Using
Object
By Default.