From 4f5734fb58011ba2af2c6cd3c0d43fdd3f09edb1 Mon Sep 17 00:00:00 2001 From: Polle Pas Date: Tue, 30 Apr 2024 12:15:50 +0200 Subject: [PATCH] Fix type issues with ontolgies --- browser/lib/src/index.ts | 2 -- browser/lib/src/ontology.ts | 4 +--- browser/lib/tsconfig.json | 2 ++ browser/react/tsconfig.json | 3 ++- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/browser/lib/src/index.ts b/browser/lib/src/index.ts index a262aa29c..e7209ccf2 100644 --- a/browser/lib/src/index.ts +++ b/browser/lib/src/index.ts @@ -33,8 +33,6 @@ import { initOntologies } from './ontologies/index.js'; initOntologies(); -const __INTERNAL_KNOWN_SUBJECTS = new Set(); - export * from './ontologies/core.js'; export * from './ontologies/collections.js'; export * from './ontologies/commits.js'; diff --git a/browser/lib/src/ontology.ts b/browser/lib/src/ontology.ts index 868fed525..07a69ddee 100644 --- a/browser/lib/src/ontology.ts +++ b/browser/lib/src/ontology.ts @@ -43,12 +43,10 @@ type PropsOfClass = { */ export type InferTypeOfValueInTriple< Class extends keyof Classes | never = never, - Prop extends string = string, + Prop = string, Returns = Prop extends keyof PropTypeMapping ? Prop extends Requires ? PropTypeMapping[Prop] - : Prop extends Recommends - ? PropTypeMapping[Prop] | undefined : PropTypeMapping[Prop] | undefined : JSONValue, > = Returns; diff --git a/browser/lib/tsconfig.json b/browser/lib/tsconfig.json index 47062af81..9cbdc948f 100644 --- a/browser/lib/tsconfig.json +++ b/browser/lib/tsconfig.json @@ -4,6 +4,8 @@ "composite": true, "outDir": "./dist", "rootDir": ".", + "module": "NodeNext", + "moduleResolution": "NodeNext", }, "include": [ "./src" diff --git a/browser/react/tsconfig.json b/browser/react/tsconfig.json index 58e255129..efb6b93e8 100644 --- a/browser/react/tsconfig.json +++ b/browser/react/tsconfig.json @@ -10,7 +10,8 @@ "DOM" ], "rootDir": ".", - "jsx": "react" + "jsx": "react", + "module": "NodeNext" }, "include": [ "./src"