Skip to content

[api-extractor] support bundle files configed with tsconfig.ts'option: paths #3291

Description

@xkn1ght

configed by tsconfig "alias", but treat with external dependency

Summary

already asked in the chat room, comfirmed that it's not supported now.

my tsconfig.json as below

    "baseUrl": "./",
    "paths": {
      "@interface/*": ["src/interface/*"],
    }

Expected result:
expert:

export interface Foo {}

Actual result:

import { Foo } from '@interface/test'
export { Foo }

Details

seems api-extractor ignore those Mark Lilly (@interface) declaration files, treating them as external deps.

I am searching inside the source code, but still don't know which module parse the AST and mark isExternal as true.

PS: Seems pnpm link and rush link doesn't support link monorepo/api-extractor to my demo (outside rushstack monorepo). So I run the dev mode by relative path: node ../../../rushatck/apps/api-extractor/lib/start.js. Is any better way to dev?

Standard questions

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

Question Answer
@microsoft/api-extractor version? ^7.19.5
Operating system? mac
API Extractor scenario? rollups (.d.ts)
Would you consider contributing a PR? Yes
TypeScript compiler version? 4.4.3
Node.js version (node -v)? 14.17.4

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions