Skip to content

Full local paths included when inheriting from Node types #800

Closed
@jameswilddev

Description

@jameswilddev

Define the following types:

/**
 * Defines types which can be round-tripped by `JSON.parse` and
 * `JSON.stringify`.
 */
export type Json = string | number | boolean | JsonObject | JsonArray | null;

/**
 * This is a helper type required by [[Json]].
 */
export interface JsonObject {
  /**
   * The properties defined.
   */
  readonly [x: string]: Json;
}

/**
 * This is a helper type required by [[Json]].
 */
export interface JsonArray extends ReadonlyArray<Json> { }

The documentation for JsonArray will include everything defined in ReadonlyArray (this is correct), with the full path to the user's local install of TypeScript (this is not expected), as below:

c

This may have been reported previously in #169 but whether this is the same problem is not clear.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions