( tracked: TrackedPrecompiler, cache: AnswerCache, key: string, // given the snapshot it names, which a scan reads again once it can't be reproduced onSnapshot?: (snapshot: string) => void )
| 836 | |
| 837 | // an answer stored for what a key names whose snapshot still holds |
| 838 | const cachedAnswerOf = ( |
| 839 | tracked: TrackedPrecompiler, |
| 840 | cache: AnswerCache, |
| 841 | key: string, |
| 842 | // given the snapshot it names, which a scan reads again once it can't be reproduced |
| 843 | onSnapshot?: (snapshot: string) => void |
| 844 | ): unknown => |
| 845 | cache.get(key, snapshot => { |
| 846 | onSnapshot?.(snapshot) |
| 847 | return (tracked.holds ??= createSnapshotCheck( |
| 848 | cache, |
| 849 | tracked.host, |
| 850 | tracked.resolveInBundler |
| 851 | ))(snapshot, tracked.given) |
| 852 | }) |
| 853 | |
| 854 | // an answer outlives the build where nothing but what it read and resolved |
| 855 | // decided it |
no test coverage detected