type branchRefsT = { branchToRef : Record < string , string > ; refToBranches : Record < string , string [ ] > ; } ; let branchRefs = undefined ; type revListT = Record < string , string [ ] > ; let parentsRevList = undefined ; let childrenRevList = undefined ; let repoRootPath = undefined ; class Cache { public getRepoRootPath ( ) { return repoRootPath ; } public getBranchToRef ( ) { return branchRefs ?. branchToRef ; } public getRefToBranches ( ) { return branchRefs ?. refToBranches ; } public getParentsRevList ( ) { return parentsRevList ; } public getChildrenRevList ( ) { return childrenRevList ; } clearAll ( ) { branchRefs = undefined ; parentsRevList = undefined ; childrenRevList = undefined ; } clearBranchRefs ( ) { branchRefs = undefined ; } setParentsRevList ( newRevList ) { parentsRevList = newRevList ; } setChildrenRevList ( newRevList ) { childrenRevList = newRevList ; } setBranchRefs ( newBranchRefs ) { branchRefs = newBranchRefs ; } setRepoRootPath ( newRepoRootPath ) { repoRootPath = newRepoRootPath ; } } const cache = new Cache ( ) ; export default cache ;