[api-extractor] SyntaxKind.SourceFile not supported by API Extractor
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- node.js, typescript
- Domain
- tooling
Research direction
Start by cloning perezgarciam/api-extractor-repro, running npm install and npm start, and confirming the SyntaxKind.SourceFile error with API Extractor 7.57.3 and TypeScript 5.9.3. Trace the reporting path that processes the imported type, compare it with the working Promise<typeof import('./abc').fn> form, and verify that the reproduction no longer fails.
Written by the indexing model from the issue text.
Description
Summary
Running into following the error when running api-extractor
ERROR: Internal Error: The ""../api-extractor-repro/lib/abc"" 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.
Repro steps
Here's a minimal repro https://github.com/perezgarciam/api-extractor-repro
gh repo clone perezgarciam/api-extractor-repro
cd api-extractor-repro
npm install
npm start
Details
Seems that importing the type throws the error as updating the code to the snippet below fixes the problem
const abcImport = import('./abc');
/**
* Asynchronously loads function that returns a number
*/
export const fnAsync: Promise<typeof import('./abc').fn> = abcImport.then((module) => module.fn);
Standard questions
| Question | Answer |
|---|---|
@microsoft/api-extractor version? |
7.57.3 |
| Operating system? | Mac |
| API Extractor scenario? | Reporting |
| Would you consider contributing a PR? | With guidance |
| TypeScript compiler version? | 5.9.3 |
Node.js version (node -v)? |
v24.12.0 |
- Dominant language
- TypeScript
- Stars
- 6.5k
- Forks
- 708
- Avg merge
- 4d 13h
- Merged PRs (30d)
- 62
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/rushstack
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
All issues in microsoft/rushstack
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
receptron/mulmoterminal#2264 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
components-web-app/docs#96 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
simonsobs/tileviewer#114 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100