Skip to Content

@revideo/2d


@revideo/2d / decorators / parser

Function: parser()

parser<T>(value): PropertyDecorator

Defined in: 2d/src/lib/decorators/signal.ts:225 

Create a signal parser decorator.

Type Parameters

T

T

Parameters

value

(value) => T

The wrapper class for the property.

Returns

PropertyDecorator

Remarks

This decorator specifies the parser of a property. Instead of returning the raw value, its passed as the first parameter to the parser and the resulting value is returned.

If the wrapper class has a method called lerp it will be set as the default interpolation function for the property.

Must be specified before the signal decorator.

Example

class Example { \@wrapper(Vector2) \@property() public declare offset: Signal<Vector2, this>; }
© 2026 Haven Technologies, Inc.
Function: parser() – Revideo