@rbxts/bind
TypeScript icon, indicating that this package has built-in type declarations

1.1.4 • Public • Published

@rbxts/bind

Utilities for binding functions to RBXScriptSignals (or similar) with a simple decorator, similar to @rbxts/proton's @Lifecycle decorator.

import { BindMethod, Bind } from "@rbxts/bind"
import { RunService } from "@rbxts/services"

export class WorldGeneration {
    @BindMethod(RunService.Heartbeat)
    public OnHeartbeat(DeltaTime: number) {
        // ...
    }

    constructor() {
        Bind.Activate(this)
    }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @rbxts/bind

Weekly Downloads

0

Version

1.1.4

License

MIT

Unpacked Size

3.96 kB

Total Files

4

Last publish

Collaborators

  • typechecked