Skip to content

OOP

class

class ClassName

Declares a class with the given name. Equivalent to class ClassName.

my

my.property

Accesses a property on the current instance. Equivalent to this.property for public properties and this.#property for private properties.

open

open MemberName

Declares a public member with the given name. Equivalent to MemberName.

closed

closed MemberName

Declares a private member with the given name. Equivalent to #MemberName.

stat

stat MemberName

Declares a static member with the given name. Equivalent to static MemberName.

init

init {
    // constructor logic
}
init(arg1, arg2) {
    // use arg1 and arg2
}

Declares a constructor. Equivalent to constructor(args) {}.