UNPKG

lavamoat-core

Version:
30 lines 1.03 kB
export type ScuttleOpts = { /** * - Whether scuttling is enabled or not. */ enabled: boolean; /** * - List of properties to exclude from scuttling. */ exceptions: Array<string | RegExp>; /** * - Name of the scuttler function to use which is expected to be found as a * property on the global object (e.g. if scuttlerName is 'x', scuttler function is obtained from globalThis['x']). */ scuttlerName: string; }; export type GlobalRef = { /** * - Reference to the global object. */ globalThis?: Record<string, any> | undefined; }; /** * Applies scuttling, with the default set of options, including using Snow if passed in as scuttlerFunc. * Scuttle globalThis right after we used it to create the root package compartment. * * @param {GlobalRef} globalRef - Reference to the global object. * @param {ScuttleOpts} opts - Scuttling options. */ export function scuttle(globalRef: GlobalRef, opts: ScuttleOpts): void; //# sourceMappingURL=scuttle.d.ts.map