Open lostfictions opened 2 years ago
Current version does not support default
imports (import A from "..."
) and for named imports (like import { A, B } from "..."
) type
keyword should be ignored (but still it will generate code in .gd
files because it is not handled what needs to be fixed). Support for default imports will come at some point after merging #61.
this SHOULD be an extremely simple fix as import type
generates absolutely no code :)
Given this code:
ts2gd
errors out with the following:Expected behaviour:
import type
statements (all forms, includingimport type X
,import type { X }
, andimport { type X }
) are erased, as in normal TypeScript.A workaround is to write the following:
EDIT: actually, it seems to be more than
import type
--import
appears to be broken outright. Support isn't documented at all in the README and there aren't any examples, but from other issues (like https://github.com/johnfn/ts2gd/issues/66) I get that sense that it didn't formerly crash even if not all use cases were supported. Is this a regression?