Store one geometry entry, replacing stale variants for the same slot.
( file: DiffFile, slot: keyof SectionGeometryCacheSlots, cacheKey: string, geometry: DiffSectionGeometry, )
| 125 | |
| 126 | /** Store one geometry entry, replacing stale variants for the same slot. */ |
| 127 | function setCachedSectionGeometry( |
| 128 | file: DiffFile, |
| 129 | slot: keyof SectionGeometryCacheSlots, |
| 130 | cacheKey: string, |
| 131 | geometry: DiffSectionGeometry, |
| 132 | ) { |
| 133 | const cachedByFile = SECTION_GEOMETRY_CACHE.get(file) ?? {}; |
| 134 | cachedByFile[slot] = { key: cacheKey, geometry }; |
| 135 | SECTION_GEOMETRY_CACHE.set(file, cachedByFile); |
| 136 | } |
| 137 | |
| 138 | interface DiffSectionRowHeightOptions { |
| 139 | layout: Exclude<LayoutMode, "auto">; |
no outgoing calls
no test coverage detected