ts-prop
Prop type definition of Vue3. only recommended for typescript.
install
example
api
property | default type | example |
---|---|---|
string | string | prop.string.type |
number | number | prop.number.default(7).type |
stringNumber | string Ι number | prop.stringNumber.type |
boolean | boolean | prop.boolean.type |
stringBool | boolean Ι string | prop.stringBool.type |
numberBool | boolean Ι number | prop.numberBool.type |
symbol | symbol | prop.symbol.type |
date | date | prop.date.type |
vNode | vue.VNode Ι string Ι null | prop.vNode.type |
css | vue.StyleValue | prop.css.type |
object | Record<string, unknown> | prop.object<{name?:string,age?:number}>().type |
array | Record<string, unknown>[] | prop.array<{name:string}>().type |
func | ()=>void | prop.func<(value?:number)=>boolean>() recommended to use emit |
emit | ()=>void | prop.func<(value:string)=>void>() |