Skip to content

Typedoc Theme #19

@avivkeller

Description

@avivkeller

Ref: #16.

We need a typedoc theme + pipeline that'll be supported by doc-kit. For information on creating a theme, see https://github.com/typedoc2md/typedoc-plugin-markdown/blob/main/packages/typedoc-plugin-markdown/internal-docs/custom-theme.md and https://typedoc.org/documents/Development.Custom_Themes.html.

This theme should output in a format suitable for doc-kit. That means the theme should output in a format like the Node.js docs:

## Class: `dns.Resolver`

An independent resolver for DNS requests.
## `dns.lookup(hostname[, options], callback)`

* `hostname` {string}
* `options` {integer | Object}
  * `family` {integer|string} The record family. Must be `4`, `6`, or `0`. For
    backward compatibility reasons,`'IPv4'` and `'IPv6'` are interpreted as `4`
    and `6` respectively. The value `0` indicates that either an IPv4 or IPv6
    address is returned. If the value `0` is used with `{ all: true }` (see
    below), either one of or both IPv4 and IPv6 addresses are returned,
    depending on the system's DNS resolver. **Default:** `0`.
  * `hints` {number} One or more [supported `getaddrinfo` flags][]. Multiple
    flags may be passed by bitwise `OR`ing their values.
  * `all` {boolean} When `true`, the callback returns all resolved addresses in
    an array. Otherwise, returns a single address. **Default:** `false`.
  * `order` {string} When `verbatim`, the resolved addresses are return
    unsorted. When `ipv4first`, the resolved addresses are sorted by placing
    IPv4 addresses before IPv6 addresses. When `ipv6first`, the resolved
    addresses are sorted by placing IPv6 addresses before IPv4 addresses.
    **Default:** `verbatim` (addresses are not reordered).
    Default value is configurable using [`dns.setDefaultResultOrder()`][] or
    [`--dns-result-order`][].
  * `verbatim` {boolean} When `true`, the callback receives IPv4 and IPv6
    addresses in the order the DNS resolver returned them. When `false`,
    IPv4 addresses are placed before IPv6 addresses.
    This option will be deprecated in favor of `order`. When both are specified,
    `order` has higher precedence. New code should only use `order`.
    **Default:** `true` (addresses are not reordered). Default value is
    configurable using [`dns.setDefaultResultOrder()`][] or
    [`--dns-result-order`][].
* `callback` {Function}
  * `err` {Error}
  * `address` {string} A string representation of an IPv4 or IPv6 address.
  * `family` {integer} `4` or `6`, denoting the family of `address`, or `0` if
    the address is not an IPv4 or IPv6 address. `0` is a likely indicator of a
    bug in the name resolution service used by the operating system.
## Event: `'change'`

* `eventType` {string} The type of change event that has occurred
* `filename` {string|Buffer} The filename that changed (if relevant/available)

Tip

The Node.js Docs use YAML metadata, which can be done separately as a follow-up. The initial theme just needs to put us in the right direction.

Right now, an implementation of this to be iterated on is available at https://github.com/avivkeller/webpack-doc-kit.

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