Open blocka opened 7 years ago
With Vue 2.5, TypeScript can understand basic prop types like
props: {
foo: String,
bar: Number,
baz: Boolean,
}
So there is no way to specify a prop as being of a custom type? ie:
interface IData {
id: Number;
name: String;
}
props: {
foo: IData
}
You could try
props: {
foo: { default: {} as IData }
}
It's great that my props are recognized, but the props are all type "any", which doesn't help me much. I see that
extend
is generic, and the last property is for props. But I can't make heads or tails of what to do with that.