Research TS development experience
phoenix-ru opened this issue · comments
I am still not sure how TS is used in the official compiler to generate .d.ts
of .vue
files. It uses defineComponent
in the generated code but I want to find a balance between generating the most optimal code (i.e. omitting defineComponent
) and supporting TS definitions.
Tasks:
Supporting imported types in defineProps
and defineEmits
requires filesystem access -> a filesystem interface needs to be provided to compiler similar to https://github.com/vuejs/core/blob/ae97e5053895eeaaa443306e72cd8f45da001179/packages/compiler-sfc/src/script/resolveType.ts#L849-L875