Skip to content

Stability Blockquotes #8

@avivkeller

Description

@avivkeller

doc-kit recognises a specific blockquote syntax for Stability Index notices.

TypeDoc preserves the following tags on reflections, which map cleanly to stability levels:

TypeDoc tag Stability index
@deprecated 0 — Deprecated
@experimental or @beta 1 — Experimental
(no tag) 2 — Stable (default; do not emit a blockquote)
@legacy 3 — Legacy

The description text of the stability notice should be:

  • For @deprecated: the tag's description text if present (e.g. Deprecated: Use X instead.), otherwise just Deprecated
  • For @experimental / @beta: Experimental (with tag description appended if present)
  • For @legacy: Legacy (with tag description appended if present)

For a reflection annotated with:

/**
 * @deprecated Use `compiler.hooks.done` instead.
 */
run(callback?: CallbackFunction): void;

The theme should output:

#### `compiler.run([callback])`

> Stability: 0 - Deprecated: Use `compiler.hooks.done` instead.

* `callback` {Function}
* Returns: {void}

For a reflection annotated with @experimental and no description:

#### `compiler.snapshot()`

> Stability: 1 - Experimental

* Returns: {void}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions