kalimahapps/vue-options-to-composition

TypeScript support

Closed this issue · 1 comments

d9k commented

I know, probably it's hard to implement.

I had to use https://www.typescriptlang.org/play/ with TS config -> Target -> ESNext to strip types from "options" code and than return types to "composition" code by hand

Update: defineComponent() must be stripped to.

It is hard to implement as you have stated. Generally speaking, vue2 and options API were not written using TypeScript so providing support for this feature might have limited use-case. If you have a sample code I can check if this is something feasible.