π Search Terms
"d.ts unresolved modules import"
π Version & Regression Information
Typescript v5.5.4
β― Playground Link
No response
π» Code
Here is a basic reproduction: https://github.com/baptisteArno/zod-d-ts-issue
- pnpm install
- pnpm turbo build --filter=package-three...
- See error because schema is of type any
π Actual behavior
package-two generates with imports from zod which package is not installed in package-two.
This means that the type that we get when importing things from package-two are of inferred type any
π Expected behavior
I would expect the d.ts file to instead imports from installed packages only.
In that very specific case, I would expect it to generate:
export declare const schema: typeof import("package-one").schema
instead of
export declare const schema: import("zod").ZodObject<
{
id: import("zod").ZodString;
name: import("zod").ZodString;
},
"strip",
import("zod").ZodTypeAny,
{
id: string;
name: string;
},
{
id: string;
name: string;
}
>;
Additional information about the issue
No response
π Search Terms
"d.ts unresolved modules import"
π Version & Regression Information
Typescript v5.5.4
β― Playground Link
No response
π» Code
Here is a basic reproduction: https://github.com/baptisteArno/zod-d-ts-issue
π Actual behavior
package-two generates with imports from
zodwhich package is not installed in package-two.This means that the type that we get when importing things from package-two are of inferred type
anyπ Expected behavior
I would expect the d.ts file to instead imports from installed packages only.
In that very specific case, I would expect it to generate:
instead of
Additional information about the issue
No response