I'm pretty clueless on tree-shaking, but would this type-only import possibly aid tree-shaking? Or would there be no difference due to how import() works?
Yours is a .d.ts file so it may be a totally moot point, but I'm provisionally planning to consume it as a .ts file so I'm wondering about the new TypeScript's type-only imports.
type Image = import("@nativescript/core/ui/image/image").Image;
import type { Image } from "@nativescript/core/ui/image/image";
(Caveat: NativeScript Playground, at least for the React template, doesn't use a version of TypeScript modern enough to support type-only imports yet).
I'm pretty clueless on tree-shaking, but would this type-only import possibly aid tree-shaking? Or would there be no difference due to how
import()
works?Yours is a
.d.ts
file so it may be a totally moot point, but I'm provisionally planning to consume it as a.ts
file so I'm wondering about the new TypeScript's type-only imports.(Caveat: NativeScript Playground, at least for the React template, doesn't use a version of TypeScript modern enough to support type-only imports yet).