/// /// /// import * as vm from 'vm'; export interface ContextConfiguration { appId: string; appName: string; appVersion: string; environmentUrl: string; token: string; tenantId?: string; devProxyUrl: string; userDetails: UserDetails; } export interface UserDetails { id: string; name: string; email: string; } export interface RuntimeContext { /** The Node.js `vm` context */ vmContext: vm.Context; /** * This function should be called from outside when an unhandled promise rejection was detected * @returns `false` if `preventDefault` was called, otherwise `true` */ reportUnhandledRejection: (reason: any, promise: Promise) => boolean; } /** Creates a new VM context */ export declare function createContext(cwd: string, urlPathname: string, config?: ContextConfiguration): RuntimeContext;