Hi, I am trying to find a way for my built code using tsc to not transpile imports to dynamic imports because those won't resolve:
Example:
import type {
RestContext,
} from 'msw'
const buildObject = () => {
type ContextWithInput = RestContext & { input: () => void }
return {} as unknown as ContextWithInput
}
when this file is built this is how the import is done:
// ...d.ts
declare const buildObject: () => import("msw/lib/glossary-de6278a9").D & {
cookie: (name: string, value: string, options?: import("cookie").CookieSerializeOptions | undefined) => import("msw/lib/glossary-de6278a9").R<any, any>;
text: <BodyType extends string>(body: BodyType) => import("msw/lib/glossary-de6278a9").R<BodyType, any>;
body: <BodyType_1 extends string | Blob | BufferSource | FormData | ReadableStream<any>>(value: BodyType_1) => import("msw/lib/glossary-de6278a9").R<BodyType_1, any>;
json: <BodyTypeJSON>(body: BodyTypeJSON) => import("msw/lib/glossary-de6278a9").R<BodyTypeJSON, any>;
xml: <BodyType_2 extends string>(body: BodyType_2) => import("msw/lib/glossary-de6278a9").R<BodyType_2, any>;
} & {
input: () => void;
}
Is there a way to either keep the import as non dynamic in the .d.ts file import { RestContext } from 'msw' or have the import() statement be import("msw").RestContext
Cheers!