arcticpackage
Version:
A library for making Arctic packages in typescript.
25 lines (19 loc) • 553 B
text/typescript
import { Callable } from './Callable';
import CallableFunction from './CallableFunction';
import Instance from './Instance';
export default class ArcticFunction extends CallableFunction {
private method: Callable;
constructor(name: string, method: Callable) {
super(name);
this.method = method;
}
bind(instance: Instance): CallableFunction {
return this;
}
get arity() {
return this.method.arity;
}
call(args: any[]) {
return this.method.call(args);
}
}