smartsocket/ts/smartsocket.classes.socketfunction.ts

24 lines
591 B
TypeScript
Raw Normal View History

2016-08-07 13:37:52 +00:00
import * as plugins from "./smartsocket.plugins";
// import classes
2016-08-07 16:59:39 +00:00
import { Stringmap } from "lik";
2016-08-07 13:37:52 +00:00
import { SocketRole } from "./smartsocket.classes.socketrole";
export interface SocketFunctionOptions {
name: string;
func: any;
roles: SocketRole[]; // all roles that are allowed to execute a SocketFunction
};
export class SocketFunction {
name: string;
func: any;
roles: SocketRole[];
constructor(optionsArg: SocketFunctionOptions) {
this.name = optionsArg.name;
this.func = optionsArg.func;
this.roles = optionsArg.roles;
};
}