UNPKG

@rocket.chat/apps-engine

Version:

The engine code for the Rocket.Chat Apps which manages, runs, translates, coordinates and all of that.

29 lines (28 loc) 1.3 kB
import * as timers from 'timers'; import type { IAppsEngineRuntimeOptions } from './AppsEngineRuntime'; import { AppsEngineRuntime } from './AppsEngineRuntime'; import type { App } from '../../definition/App'; export declare class AppsEngineNodeRuntime extends AppsEngineRuntime { private readonly app; private readonly customRequire; static defaultRuntimeOptions: { timeout: number; }; static defaultContext: { Buffer: BufferConstructor; console: Console; process: {}; exports: {}; clearImmediate: typeof timers.clearImmediate; clearInterval: typeof timers.clearInterval; clearTimeout: typeof timers.clearTimeout; promises: typeof timers.promises; setImmediate: typeof timers.setImmediate; setInterval: typeof timers.setInterval; setTimeout: typeof timers.setTimeout; }; static runCode(code: string, sandbox?: Record<string, any>, options?: IAppsEngineRuntimeOptions): Promise<any>; static runCodeSync(code: string, sandbox?: Record<string, any>, options?: IAppsEngineRuntimeOptions): any; constructor(app: App, customRequire: (mod: string) => any); runInSandbox(code: string, sandbox?: Record<string, any>, options?: IAppsEngineRuntimeOptions): Promise<any>; }