Decorator for making getters in a Mutable class enumerable. This ensures that the getters are included in mutators and are subsequently displayed in the editor.
Usage: Apply this decorator to both the getter method and the class to make it effective.
Example:
@ƒ.enumerate // apply the decorator to the class.
export class SomeScript extends ƒ.ComponentScript {
#size: number = 1;
@ƒ.enumerate // apply the decorator to the getter
public get size(): number {
return this.#size;
}
// define a setter to allow writing, or omit it to leave the property read-only
public set size(_size: number) {
this.#size = _size;
}
}
Decorator for making getters in a Mutable class enumerable. This ensures that the getters are included in mutators and are subsequently displayed in the editor.
Usage: Apply this decorator to both the getter method and the class to make it effective.
Example: