UNPKG

@webfaas/webfaas-core

Version:

WebFaaS Framework - Core

37 lines (36 loc) 1.31 kB
/// <reference types="node" /> import * as vm from "vm"; /** * SandBox */ export declare class SandBoxProcess { argv: string[]; env: any; hrtime: NodeJS.HRTime; memoryUsage: () => NodeJS.MemoryUsage; cpuUsage: (previousValue?: NodeJS.CpuUsage | undefined) => NodeJS.CpuUsage; nextTick: (callback: Function, ...args: any[]) => void; pid: number; platform: NodeJS.Platform; cwd: () => string; } /** * SandBox Object */ export declare class SandBox { constructor(); global: any; process: SandBoxProcess; clearImmediate: ((immediateId: NodeJS.Immediate) => void) & typeof clearImmediate; clearInterval: ((intervalId: NodeJS.Timeout) => void) & typeof clearInterval; clearTimeout: ((timeoutId: NodeJS.Timeout) => void) & typeof clearTimeout; setImmediate: ((callback: (...args: any[]) => void, ...args: any[]) => NodeJS.Immediate) & typeof setImmediate; setInterval: ((callback: (...args: any[]) => void, ms: number, ...args: any[]) => NodeJS.Timeout) & typeof setInterval; setTimeout: ((callback: (...args: any[]) => void, ms: number, ...args: any[]) => NodeJS.Timeout) & typeof setTimeout; Buffer: typeof Buffer; console: Console; /** * Build a Sandbox context */ static SandBoxBuilderContext(): vm.Context; }