Skip to content

LibraryInitParams

Parameters for Library.init.

These are purely cosmetic values the host injects once at initialization, so the library itself carries no knowledge of who hosts it.

Import:

import type { LibraryInitParams } from '@mnaoumov/typescript-lib/library';

Signature:

export interface LibraryInitParams

Properties

PropertyTypeDescription
debugGuideUrl?stringThe URL of the guide explaining how to turn debug messages on and off, named in the library's debug messages. Without one, the messages name no guide.
debugNamespace?stringThe namespace the library's own debuggers live under. Defaults to DEFAULT_DEBUG_NAMESPACE. A host that publishes its own debug namespace to its users passes it here, so their filters keep matching.
debugNamespaceAliases?readonly string[]Earlier names of debugNamespace, so a filter written for one of them keeps showing the library's debug messages after the host renames its namespace. Each message still prints once: under debugNamespace when a filter enables it, otherwise under the first alias a filter enables. Defaults to none.
debugPrefixNamespacestringThe namespace prefix prepended to the library's debug namespaces (e.g. ${pluginId}:).
shouldPrintStackTracebooleanWhether debug logging should append a rich DevTools stack trace.