Skip to content

Module Compatible

Adaptive cross-transform decorator helpers. You provide separate legacy and modern implementations, and the compatible layer detects which TypeScript decorator transform produced the runtime arguments and dispatches to the correct implementation automatically. Consumers of your decorator don't need to care which transform they're using — it works under both experimentalDecorators and the Stage 3 standard.

Import this module from @litert/decorator/compatible.

Import

ts
import * as Decorators from '@litert/decorator/compatible';

Sub-Modules

Sub-ModuleDescription
ClassesClass decorator helpers.
GeneralDecoratorsDecorator helpers that can apply to multiple element kinds (methods, properties, getters, setters, or accessors) depending on usage.
MethodsMember method decorator helpers.
PropertiesMember property or field decorator helpers.
AccessorsMember accessor decorator helpers.
GettersMember getter decorator helpers.
SettersMember setter decorator helpers.
StaticMethodsStatic method decorator helpers.
StaticPropertiesStatic property or static field decorator helpers.
StaticAccessorsStatic accessor decorator helpers.
StaticGettersStatic getter decorator helpers.
StaticSettersStatic setter decorator helpers.

Functions

FunctionDescription
getMetadataContainerGet the metadata container of a class by its constructor. This API is for modern decorators only — use reflect-metadata for legacy decorators.

Typings

See Typings for top-level TypeScript helper contracts.