Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[api-extractor] Don't output in the API report the items imported from other libraries (in the monorepo, with 'paths' mapping in tsconfig) #3666

Open
Platonn opened this issue Sep 30, 2022 · 0 comments

Comments

@Platonn
Copy link

Platonn commented Sep 30, 2022

When running API Extractor for each library separately in the monorepo, to my surprise, in the API report of certain library I get full declarations of the types that were imported from my other libraries. For example the report for a certain library looks like this:

// Note: X was just imported from @my/other-library
interface X {
 foo: number;
 bar: string;
}

export interface Y extends X { ... }

Instead, I would rather expect getting in the report just import { X } from '@my/other-library' when X comes from other library than I'm currently analyzing. For example I would expect the following report:

import { X } from '@my/other-library';

export interface Y extends X { ... }

(similar as if X would be imported from some node_modules package).

It would be great to just output import { X } from '@my/other-library' in the report.

Note: I'm using a tsconfig with paths mapping to dist folders of other libraries (like "@my/other-library": ["dist/other-library"]") and I'm running API Extractor for each library on their ready precompiled dist d.ts files.

Note: I asked similar question previously in another issue. But now I'm creating a standalone Feature Request.

Standard questions

Please answer these questions to help us investigate your issue more quickly:

Question Answer
@microsoft/api-extractor version? 7.12.0
Operating system? Mac
API Extractor scenario? reporting (.api.md)
Would you consider contributing a PR? Yes, if only I kenw how to implement it 😉
TypeScript compiler version?
Node.js version (node -v)?
@github-project-automation github-project-automation bot moved this to Needs triage in Bug Triage Feb 26, 2024
@iclanton iclanton moved this from Needs triage to AE/AD in Bug Triage Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: AE/AD
Development

No branches or pull requests

1 participant