MCPcopy Create free account
hub / github.com/microsoft/vscode-cpptools / constructor

Method constructor

Extension/src/Utility/Sandbox/sandbox.ts:48–66  ·  view source on GitHub ↗
(initializeContext: Record<string, any> = {})

Source from the content-addressed store, hash-verified

46 context: Context;
47
48 constructor(initializeContext: Record<string, any> = {}) {
49 this.context = createContext({
50 exports: {},
51 ...initializeContext,
52 console: {
53 log: console.log,
54 error: console.error,
55 debug: console.debug,
56 info: console.info,
57 warn: console.warn,
58 verbose: verbose
59 },
60 JSON: {
61 stringify: (obj: any) => stringify(obj),
62 parse: (str: string) => JSON.parse(str)
63 }
64
65 });
66 }
67
68 protected require(module: string) {
69 return require(module);

Callers

nothing calls this directly

Calls 1

stringifyFunction · 0.90

Tested by

no test coverage detected