Created by: orange-buffalo
When generating code with typescript-fetch
, it creates imports of both types and values via import
statement. This causes issues with modern toolset (e.g. Vite or esbuild) due to separate processing of individual modules and type erasure - as a result, import
statement refers to no longer existing export.
Typescript 3.8 introduces import type
statement for importing types. typescript-fetch
already generates Typescript 4.0 which has this support. Hence this PR suggests usage of import type
statement for importing types during typescript-fetch
generation.
See also #11179 (closed).