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

Class PropReference

src/interpreter/reference.ts:78–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78class PropReference implements Reference {
79 constructor(private target: Map<string, Value>, private index: string) {
80 this.type = 'reference';
81 }
82
83 type: 'reference';
84
85 get(): Value {
86 return this.target.get(this.index) ?? NULL;
87 }
88
89 set(value: Value): void {
90 this.target.set(this.index, value);
91 }
92}
93
94class ArrReference implements Reference {
95 constructor(private items: readonly Reference[]) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected