-
-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
Reproduce repo
https://github.com/zongc1001/exposes-dts-poc.git
- tsconfig.json:
{
...,
"compilerOptions": {
...,
"baseUrl": ".",
"paths": {
"@monospace/openapp": ["packages/openapp"],
"@monospace/openapp/*": ["packages/openapp/*"],
"@monospace/*": ["packages/*"],
},
"plugins": [
{
"transform": "typescript-transform-paths",
"afterDeclarations": true,
},
]
},
"include": [
"expose/expose.ts",
],
}
Reproduce step
pnpm install
pnpm build:alias
- Check the output file
types/packages/openapp/src/deep/import-other-mono.d.ts
:
import { ModalProps } from "../../../../../packages/components"; // Wrong. Point to the source ts file.
import { PopoverProps } from "../../../components/src/Popover"; // Correct. Point to the output d.ts file.
export type SomeComp = {
modalProps: ModalProps;
popoverProps: PopoverProps;
};
- And the source file:
import { Modal, ModalProps } from "@monospace/components";
import { Popover, PopoverProps } from "@monospace/components/src/Popover";
console.log(Modal, Popover);
export type SomeComp = {
modalProps: ModalProps,
popoverProps: PopoverProps,
}
Metadata
Metadata
Assignees
Labels
No labels