Skip to content

Conversation

SarahIsWeird
Copy link
Contributor

What the title says.

function(context, args) {
  class Foo extends Object {
    constructor() {
      let _14t6uzrkvpl_THIS_ = super()
      _14t6uzrkvpl_THIS_.bar = 1
    }
    baz(a = super.valueOf().bar) {
      return a
    }
  }
  return new Foo().baz()
}

I did check this in-game as well, and it works :)

@SarahIsWeird
Copy link
Contributor Author

Oopsie, the script output above is generated from this:

export default (context: Context, args?: unknown) => {
    class Foo {
        declare bar: number;

        constructor() {
            this.bar = 1;
        }

        baz(a = this.bar): number {
            return a;
        }
    }

    return (new Foo()).baz();
}

@samualtnorman samualtnorman merged commit 70f29fa into samualtnorman:main Feb 18, 2025
1 check passed
@samualtnorman
Copy link
Owner

ty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants