( tracked: TrackedPrecompiler, cache: AnswerCache, key: string, answer: unknown )
| 854 | // an answer outlives the build where nothing but what it read and resolved |
| 855 | // decided it |
| 856 | const store = ( |
| 857 | tracked: TrackedPrecompiler, |
| 858 | cache: AnswerCache, |
| 859 | key: string, |
| 860 | answer: unknown |
| 861 | ): boolean => { |
| 862 | const snapshot = snapshotOf(tracked, cache) |
| 863 | if (snapshot === undefined) return false |
| 864 | cache.set(key, answer, snapshot) |
| 865 | return true |
| 866 | } |
| 867 | |
| 868 | // what an answer stored now names as what it read, if it can outlive the build |
| 869 | const snapshotOf = ( |
no test coverage detected