Skip to content

Warning: Failed to convert type node with kind #1457

@kaiyoma

Description

@kaiyoma

Expected Behavior

Typedoc should generate docs without any warnings.

Actual Behavior

Typedoc spits out several warnings:

Warning: Failed to convert type node with kind: RestType and text ...unknown[]. Please report a bug.
        .../packages/cv-utils/types/utility.ts:8:10
Warning: Failed to convert type node with kind: RestType and text ...infer _I. Please report a bug.
        .../packages/cv-utils/types/utility.ts:15:81
Warning: Failed to convert type node with kind: RestType and text ...infer I. Please report a bug.
        .../packages/cv-utils/types/utility.ts:23:84
Warning: Failed to convert type node with kind: OptionalType and text unknown?. Please report a bug.
        .../packages/cv-utils/types/utility.ts:31:81
Warning: Failed to convert type node with kind: RestType and text ...infer T. Please report a bug.
        .../packages/cv-utils/types/utility.ts:32:11
Warning: Failed to convert type node with kind: RestType and text ...unknown[]. Please report a bug.
        .../packages/cv-utils/types/utility.ts:8:10
Warning: Failed to convert type node with kind: RestType and text ...infer _I. Please report a bug.
        .../packages/cv-utils/types/utility.ts:15:81
Warning: Failed to convert type node with kind: RestType and text ...infer I. Please report a bug.
        .../packages/cv-utils/types/utility.ts:23:84
Warning: Failed to convert type node with kind: OptionalType and text unknown?. Please report a bug.
        .../packages/cv-utils/types/utility.ts:31:81
Warning: Failed to convert type node with kind: RestType and text ...infer T. Please report a bug.
        .../packages/cv-utils/types/utility.ts:32:11

Steps to reproduce the bug

Here's one example of a utility type that's causing these warnings:

/** Head of an array type. */
export type Head<A extends unknown[] | readonly unknown[]> = Mutable<A> extends [
  infer H,
  ...unknown[]
]
  ? H
  : never;

Environment

  • Typedoc version: 0.20.13
  • TypeScript version: 4.1.3
  • Node.js version: 14.15.0
  • OS: Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions