MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / constructor

Method constructor

lib/clientstate.ts:133–144  ·  view source on GitHub ↗
(jsondata?: any)

Source from the content-addressed store, hash-verified

131 overrides: any[] = [];
132
133 constructor(jsondata?: any) {
134 if (jsondata) {
135 // hack so TS doesn't think this.compiler is accessed before assignment below
136 this.compiler = undefined as any as ClientStateCompiler;
137 this.fromJsonData(jsondata);
138 } else {
139 this.compiler = new ClientStateCompiler();
140 this.wrap = false;
141 }
142
143 delete this.compiler._internalid;
144 }
145
146 fromJsonData(jsondata: any) {
147 if (jsondata.compilerVisible !== undefined) this.compilerVisible = jsondata.compilerVisible;

Callers

nothing calls this directly

Calls 1

fromJsonDataMethod · 0.95

Tested by

no test coverage detected