(self: ContextImpl<any>)
| 576 | |
| 577 | // Copies without caching a flattened map on `self`. |
| 578 | const copyMap = (self: ContextImpl<any>): Map<string, any> => { |
| 579 | const map = new Map(self._flat ?? self.base) |
| 580 | if (!self._flat) applyOverlays(map, self.overlay) |
| 581 | return map |
| 582 | } |
| 583 | |
| 584 | const withFlat = <B>(self: Context<any>, f: (map: Map<string, any>) => void): Context<B> => { |
| 585 | const map = copyMap(self as ContextImpl<any>) |
no test coverage detected