Typedoc is not following symlink correctly

This issue has been tracked since 2023-01-11.

Search terms

symlink, pnpm, typescript

Expected Behavior

I expect to see the link node_modules/typescript/lib/lib.dom.d.ts:1578 produced

Actual Behavior

I'm seeing node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.dom.d.ts:1578 produced.

Steps to reproduce the bug

In a pnpm project.

Using a type definition like this:

export interface ExtraResponseInit extends Omit<ResponseInit, 'headers'> {
  /**
   * These headers will be sent to the user response
   * along with the response headers from the origin.
   */
  headers?: HeadersInit;
  /**
   * Fields to rewrite for the upstream request.
   */
  request?: ModifiedRequest;
}

The resulting typedoc prints this:

# Interface: ExtraResponseInit

## Hierarchy

- `Omit`<[`ResponseInit`](node_modules/typescript), `"headers"`\>

  ↳ **`ExtraResponseInit`**

## Table of contents

### Properties

- [headers](ExtraResponseInit.md#headers)
- [request](ExtraResponseInit.md#request)
- [status](ExtraResponseInit.md#status)
- [statusText](ExtraResponseInit.md#statustext)

## Properties

### headers

• `Optional` **headers**: `HeadersInit`

These headers will be sent to the user response
along with the response headers from the origin.

#### Defined in

[packages/edge/src/middleware-helpers.ts:31](https://github.com/vercel/vercel/blob/main/packages/edge/src/middleware-helpers.ts#L31)

---

### request

• `Optional` **request**: [`ModifiedRequest`](ModifiedRequest.md)

Fields to rewrite for the upstream request.

#### Defined in

[packages/edge/src/middleware-helpers.ts:35](https://github.com/vercel/vercel/blob/main/packages/edge/src/middleware-helpers.ts#L35)

---

### status

• `Optional` **status**: `number`

#### Inherited from

Omit.status

#### Defined in

node_modules/.pnpm/[email protected]4.7.4/node_modules/typescript/lib/lib.dom.d.ts:1578

---

### statusText

• `Optional` **statusText**: `string`

#### Inherited from

Omit.statusText

#### Defined in

node_modules/.pnpm/[email protected]4.7.4/node_modules/typescript/lib/lib.dom.d.ts:1579

I can't figure out how to fix the links so that they don't print the pnpm symlink piece.

Environment

  • Typedoc version: 0.23.24
  • TypeScript version: 4.7.4
  • Node.js version: 16
  • OS: mac
Ethan-Arrowood wrote this answer on 2023-01-21

From vercel/vercel#9198

If you want to try running locally, clone repo, checkout migrate/yarn-to-pnpm branch, then run pnpm install, cd package/edge, pnpm build:docs

More Details About Repo
Owner Name TypeStrong
Repo Name typedoc
Full Name TypeStrong/typedoc
Language TypeScript
Created Date 2014-05-24
Updated Date 2023-03-19
Star Count 6487
Watcher Count 68
Fork Count 639
Issue Count 48

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date