(this: IterableCollections, callback: Function, thisArg?: unknown)
| 142 | : target.has(key) || target.has(rawKey) |
| 143 | }, |
| 144 | forEach(this: IterableCollections, callback: Function, thisArg?: unknown) { |
| 145 | const observed = this |
| 146 | const target = observed[ReactiveFlags.RAW] |
| 147 | const rawTarget = toRaw(target) |
| 148 | const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive |
| 149 | !readonly && track(rawTarget, TrackOpTypes.ITERATE, ITERATE_KEY) |
| 150 | return target.forEach((value: unknown, key: unknown) => { |
| 151 | // important: make sure the callback is |
| 152 | // 1. invoked with the reactive map as `this` and 3rd arg |
| 153 | // 2. the value received should be a corresponding reactive/readonly. |
| 154 | return callback.call(thisArg, wrap(value), wrap(key), observed) |
| 155 | }) |
| 156 | }, |
| 157 | } |
| 158 | |
| 159 | extend( |
no test coverage detected