* Whether this reading may open a function's body here: not if it is already * open on the way in (a helper that calls itself), not if it has been read * somewhere else in this picture, and not past the depth or the size the * reading allows.
(fn: string, path: readonly string[], state: Reading)
| 306 | * reading allows. |
| 307 | */ |
| 308 | function open(fn: string, path: readonly string[], state: Reading): boolean { |
| 309 | if (path.includes(fn) || state.read.has(fn)) return false; |
| 310 | if (path.length >= MAX_INLINE || state.items >= MAX_ITEMS) { |
| 311 | state.truncated++; |
| 312 | return false; |
| 313 | } |
| 314 | state.read.add(fn); |
| 315 | return true; |
| 316 | } |
| 317 | |
| 318 | /** |
| 319 | * Put an item in its block, opening the run it belongs to: work registered to |
no test coverage detected