arcticpackage
Version:
A library for making Arctic packages in typescript.
20 lines (15 loc) • 475 B
text/typescript
import { Callable } from "./Callable";
import Instance from "./Instance";
import util from 'util';
export default abstract class CallableFunction implements Callable {
readonly name: string;
constructor(name: string) {
this.name = name;
}
abstract bind(instance: Instance): CallableFunction;
abstract arity: number;
abstract call(args: any[]): any;
[util.inspect.custom]() {
return `<function ${this.name}>`;
}
}