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-Module | Description |
|---|---|
Classes | Class decorator helpers. |
GeneralDecorators | Decorator helpers that can apply to multiple element kinds (methods, properties, getters, setters, or accessors) depending on usage. |
Methods | Member method decorator helpers. |
Properties | Member property or field decorator helpers. |
Accessors | Member accessor decorator helpers. |
Getters | Member getter decorator helpers. |
Setters | Member setter decorator helpers. |
StaticMethods | Static method decorator helpers. |
StaticProperties | Static property or static field decorator helpers. |
StaticAccessors | Static accessor decorator helpers. |
StaticGetters | Static getter decorator helpers. |
StaticSetters | Static setter decorator helpers. |
Functions
| Function | Description |
|---|---|
getMetadataContainer | Get 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.