| 92 | } |
| 93 | |
| 94 | class ArrReference implements Reference { |
| 95 | constructor(private items: readonly Reference[]) { |
| 96 | this.type = 'reference'; |
| 97 | } |
| 98 | |
| 99 | type: 'reference'; |
| 100 | |
| 101 | get(): Value { |
| 102 | return ARR(this.items.map((item) => item.get())); |
| 103 | } |
| 104 | |
| 105 | set(value: Value): void { |
| 106 | assertArray(value); |
| 107 | for (const [index, item] of this.items.entries()) { |
| 108 | item.set(value.value[index] ?? NULL); |
| 109 | } |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | class ObjReference implements Reference { |
| 114 | constructor(private entries: ReadonlyMap<string, Reference>) { |
nothing calls this directly
no outgoing calls
no test coverage detected