update structure
This commit is contained in:
23
ts/smartsocket.classes.socketfunction.ts
Normal file
23
ts/smartsocket.classes.socketfunction.ts
Normal file
@ -0,0 +1,23 @@
|
||||
import * as plugins from "./smartsocket.plugins";
|
||||
|
||||
// import classes
|
||||
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;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user