Interface: LifecycleDecorator()<Method>
Defined in: src/wirestate-core/metadata/metadata-single-method-decorator.ts:21
Method decorator returned by the single-method lifecycle hooks: @OnActivation, @OnDeactivation, @OnProvision, and @OnDeprovision.
Remarks
The decorated method must accept the arguments its phase delivers and nothing more, so a hook declaring a parameter the runtime never passes is rejected at compile time. Activation hooks receive no arguments. Provision hooks may declare the ProvisionId of the cycle.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
Method extends (...args: never[]) => unknown | () => unknown | Signature the decorated method must be assignable to. |
Call Signature
LifecycleDecorator<This>(value: (this: This, ...args: Parameters<Method>) => unknown, context: ClassMethodDecoratorContext<This>): void;Defined in: src/wirestate-core/metadata/metadata-single-method-decorator.ts:23
Method decorator returned by the single-method lifecycle hooks: @OnActivation, @OnDeactivation, @OnProvision, and @OnDeprovision.
Type Parameters
| Type Parameter |
|---|
This |
Parameters
| Parameter | Type |
|---|---|
value | (this: This, ...args: Parameters<Method>) => unknown |
context | ClassMethodDecoratorContext<This> |
Returns
void
Remarks
The decorated method must accept the arguments its phase delivers and nothing more, so a hook declaring a parameter the runtime never passes is rejected at compile time. Activation hooks receive no arguments. Provision hooks may declare the ProvisionId of the cycle.
Call Signature
LifecycleDecorator<Actual>(
target: object,
propertyKey: string | symbol,
descriptor: TypedPropertyDescriptor<Actual>): void;Defined in: src/wirestate-core/metadata/metadata-single-method-decorator.ts:26
Method decorator returned by the single-method lifecycle hooks: @OnActivation, @OnDeactivation, @OnProvision, and @OnDeprovision.
Type Parameters
| Type Parameter |
|---|
Actual extends (...args: never[]) => unknown |
Parameters
| Parameter | Type |
|---|---|
target | object |
propertyKey | string | symbol |
descriptor | TypedPropertyDescriptor<Actual> |
Returns
void
Remarks
The decorated method must accept the arguments its phase delivers and nothing more, so a hook declaring a parameter the runtime never passes is rejected at compile time. Activation hooks receive no arguments. Provision hooks may declare the ProvisionId of the cycle.