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

Method fromJsonData

lib/clientstate.ts:81–118  ·  view source on GitHub ↗
(jsondata: any)

Source from the content-addressed store, hash-verified

79 }
80
81 fromJsonData(jsondata: any) {
82 if (jsondata._internalid !== undefined) {
83 this._internalid = jsondata._internalid;
84 }
85
86 if (jsondata.id !== undefined) {
87 this.id = jsondata.id;
88 } else if (jsondata.compilerId === undefined) {
89 this.id = '';
90 } else {
91 this.id = jsondata.compilerId;
92 }
93
94 this.options = jsondata.options;
95 this.filters = new ClientStateCompilerOptions(jsondata.filters);
96 if (jsondata.libs === undefined) {
97 this.libs = [];
98 } else {
99 this.libs = jsondata.libs;
100 }
101 if (jsondata.specialoutputs === undefined) {
102 this.specialoutputs = [];
103 } else {
104 this.specialoutputs = jsondata.specialoutputs;
105 }
106
107 if (jsondata.tools === undefined) {
108 this.tools = [];
109 } else {
110 this.tools = jsondata.tools;
111 }
112
113 if (jsondata.overrides === undefined) {
114 this.overrides = [];
115 } else {
116 this.overrides = jsondata.overrides;
117 }
118 }
119}
120
121export class ClientStateExecutor {

Callers 1

constructorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected