MCPcopy Create free account
hub / github.com/apache/fory / declareVar

Method declareVar

javascript/packages/core/lib/gen/scope.ts:41–45  ·  view source on GitHub ↗
(name: string, stmt: string)

Source from the content-addressed store, hash-verified

39 }
40
41 declareVar(name: string, stmt: string) {
42 name = this.uniqueName(name);
43 this.varDeclares.set(name, stmt);
44 return name;
45 }
46
47 assertNameNotDuplicate(name: string) {
48 for (const item of this.declares.values()) {

Callers 2

constructorMethod · 0.80
constructorMethod · 0.80

Calls 2

uniqueNameMethod · 0.95
setMethod · 0.45

Tested by

no test coverage detected