Represents a unique identifier for an extension, defined by a symbol.
The ExtensionKey class provides a way to create and manage keys for extensions that are associated with a specific type, ensuring type safety and uniqueness.
ExtensionKey
import { ExtensionKey } from "taxum/core/http";type MyExtensionValue = { foo: string };const MY_EXTENSION = new ExtensionKey<MyExtensionValue>("My extension"); Copy
import { ExtensionKey } from "taxum/core/http";type MyExtensionValue = { foo: string };const MY_EXTENSION = new ExtensionKey<MyExtensionValue>("My extension");
Optional
Readonly
Represents a unique identifier for an extension, defined by a symbol.
The
ExtensionKey
class provides a way to create and manage keys for extensions that are associated with a specific type, ensuring type safety and uniqueness.Example