Skip to main content

decorators

import {...} from "@motion-canvas/core/lib/decorators";

Property decorators.

Functions

decorate

public decoratefn: Callback...decorators: MethodDecorator[]: void

Parameters


lazy

public lazyfactory: public (): PropertyDecorator

Create a lazy decorator.

A property marked as lazy will not be initialized until it's requested for the first time. Lazy properties are read-only.

Must be used for any static properties that require the DOM API to be initialized.

Parameters

  • factory: public ()

    A function that returns the value of this property.


threadable

public threadablecustomName?: string: MethodDecorator

Parameters