You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.exporttypeSomeComp={modalProps: ModalProps;popoverProps: PopoverProps;};
And I checked the source code. Seems this issue is caused by the function resolveModuleName.
In this line:
functionresolveModuleName(context: VisitorContext,moduleName: string){
...;letmoduleFileOutputDir=implicitPackageIndex ? resolvedDir : resolvedSourceFileOutputDir;// When `moduleName` equals `@monospace/components`, `implicitPackageIndex` is not undefined and// the `resolvedDir` is a path point to the source ts file but not the output declaration file.
...;}
Reproduce repo
https://github.com/zongc1001/exposes-dts-poc.git
Reproduce step
pnpm install
pnpm build:alias
types/packages/openapp/src/deep/import-other-mono.d.ts
:The text was updated successfully, but these errors were encountered: