8000 [api-extractor] ts.getResolvedModule with TypeScript 5.3 · Issue #4404 · microsoft/rushstack · GitHub
[go: up one dir, main page]

Skip to content
[api-extractor] ts.getResolvedModule with TypeScript 5.3 #4404
Closed
@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Summary

I'm trying to run api-extractor on a repository with TypeScript 5.3 as a dev dependency. It was previously working with TypeScript 5.2.

Repro steps

See typescript-eslint/typescript-eslint#7821:

  1. Check out that PR branch & commit
  2. yarn
  3. yarn build (specifically, the packages/ast-spec task)

Expected result: Successful API extraction / build?

Actual result:

packages/ast-spec $ yarn build

api-extractor 7.38.0  - https://api-extractor.com/

Using configuration from ./api-extractor.json
Analysis will use the bundled TypeScript version 5.3.0-beta

ERROR: ts.getResolvedModule is not a function

packages/ast-spec $

Details

I'm guessing this is because of the (ts as any).getResolvedModule used to access TypeScript compiler internals:

// Compiler internal:
// https://github.com/microsoft/TypeScript/blob/v4.7.2/src/compiler/utilities.ts#L161
return (ts as any).getResolvedModule(sourceFile, moduleNameText, mode);

microsoft/TypeScript#55790 removed that internal API.

Standard questions

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

Question Answer
@microsoft/api-extractor version? Both 3.6.1 and 3.8.0
Operating system? Mac
API Extractor scenario? rollups (.d.ts)
Would you consider contributing a PR? Yes
TypeScript compiler version? 5.3.0-beta
Node.js version (node -v)? 20 (n/a)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThe issue is asking for a new feature or design change

    Type

    No type

    Projects

    Status

    Closed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0