MCPcopy Create free account
hub / github.com/aiscript-dev/aiscript / get

Method get

src/interpreter/scope.ts:59–71  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

57 */
58 @autobind
59 public get(name: string): Value {
60 for (const layer of this.layerdStates) {
61 if (layer.has(name)) {
62 const state = layer.get(name)!.value;
63 this.log('read', { var: name, val: state });
64 return state;
65 }
66 }
67
68 throw new AiScriptRuntimeError(
69 `No such variable '${name}' in scope '${this.name}'`,
70 { scope: this.layerdStates });
71 }
72
73 /**
74 * 名前空間名を取得します。

Callers

nothing calls this directly

Calls 2

logMethod · 0.95
getMethod · 0.65

Tested by

no test coverage detected