diff --git a/package-lock.json b/package-lock.json index 6a286a0..b8ad301 100644 --- a/package-lock.json +++ b/package-lock.json @@ -68,7 +68,7 @@ "jest-environment-jsdom": "^29.7.0", "ts-jest": "^29.0.3", "ts-node": "^10.9.1", - "typescript": "^4.8.4" + "typescript": "^5.4.5" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -13301,16 +13301,16 @@ } }, "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "node_modules/unbox-primitive": { diff --git a/package.json b/package.json index dc8d3b5..e3c18fb 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "jest-environment-jsdom": "^29.7.0", "ts-jest": "^29.0.3", "ts-node": "^10.9.1", - "typescript": "^4.8.4" + "typescript": "^5.4.5" }, "browserslist": { "production": [ diff --git a/src/session/PurposeCache.ts b/src/session/PurposeCache.ts index f59ae8c..9ef843d 100644 --- a/src/session/PurposeCache.ts +++ b/src/session/PurposeCache.ts @@ -45,6 +45,9 @@ export async function addToCache(url: string, cache: PurposeCache) { ) { // eslint-disable-next-line no-param-reassign (cache[subject.value] ??= {})[ + // if the predicate.value is not a key of the map object this won't be executed, + // as it is already checked in the if expression + // @ts-ignore map[predicate.value] as "purposeLabel" | "definition" ] ??= object.value; }