dts resolve types from peer/dependencies
- Dominant language
- TypeScript
- Stars
- 11.3k
- Forks
- 275
- PR merge metrics
- No merged PRs in 30d
Description
Is there a way to resolve types from packages on peer and dependencies? Importing a chain of packages causes "The inferred type of X cannot be named without a reference to Y" https://github.com/microsoft/TypeScript/issues/47663 when using with pnpm.
For example, if I have a package named [@ttoss/cloud-roles](https://github.com/ttoss/ttoss/tree/main/packages/cloud-roles) that, after build, generates ([@ttoss/cloudformation](https://github.com/ttoss/ttoss/tree/main/packages/cloudformation) is a [dependency](https://github.com/ttoss/ttoss/blob/main/packages/cloud-roles/package.json)).
```
import { IAMRoleResource, CloudFormationTemplate } from '@ttoss/cloudformation';
export { CloudFormationTemplate, IAMRoleResource, Outputs } from '@ttoss/cloudformation';
```
When I import @ttoss/cloud-roles, I get the error:

I've tried using the experimental `--dts-resolve` flag, but it didn't work.
Contributor guide
Assessment
This issue has not been assessed yet.