|
|
|
|
|
by EvanYou
2098 days ago
|
|
> Having to write two type definitions for Component Props: one TS interface/type, and one as the JS object sucks. Uh, you don't have to? TS inference works with the JS objects. There's no need to provide the generic argument here. Also check out this: https://github.com/vuejs/rfcs/blob/sfc-improvements/active-r... (auto-generating runtime types from TS interface) |
|
Happy Vue user since 2016.
> TS inference works with the JS objects. There's no need to provide the generic argument here.
That's totally valid -- I am just being nitpicky and complaining because if possible I'd prefer to do it the other way: TS type -> JS object
> auto-generating runtime types from TS interface
Whoa. Well, that solves that then.