Skip to content

[api-extractor] Internal Error symbol has a ts.SyntaxKind.SourceFile declaration which is not (yet?) supported by API Extractor #4963

@lukasIO

Description

@lukasIO

Summary

When exporting a type within a namespace in a package, in a dependent package api-extractor runs fail with symbol has a ts.SyntaxKind.SourceFile declaration which is not (yet?) supported by API Extractor.

Repro steps

https://github.com/lukasIO/api-extractor-namespace-type-bug

The README has the repro steps.
What breaks api-extractor is seemingly utils.FooType here

Expected result:
api extractor runs without errors

Actual result:

ERROR: Internal Error: The ""./foo/utils/index"" symbol has a ts.SyntaxKind.SourceFile declaration which is not (yet?) supported by API Extractor

You have encountered a software defect. Please consider reporting the issue to the maintainers of this application.

Details

Standard questions

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

Question Answer
@microsoft/api-extractor version? 7.47.9
Operating system? Mac
API Extractor scenario? reporting
Would you consider contributing a PR? Yes
TypeScript compiler version? 5.4.2
Node.js version (node -v)? 20.9.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions