From 52da3750017b19da198b9f49ccf3a535801222c6 Mon Sep 17 00:00:00 2001 From: Dennis Kigen Date: Fri, 22 Nov 2024 13:51:29 +0300 Subject: [PATCH] (chore) Tweak tsconfig lib targets This PR tweaks the base TypeScript config to allow for better module resolution and better support for modern JavaScript features. Specifically, it removes extraneous lib targets. `dom`, `dom.iterable`, and `esnext` are sufficient. `es2018`, `es2020`, `es2021`, and `es2022` are cumulative - each one includes all the previous ones. `esnext` includes all current and proposed ECMAScript features. --- tsconfig.json | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 1a1d14288..beb092595 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,15 +5,8 @@ "jsx": "react", "lib": [ "dom", - "es5", - "scripthost", - "es2015", - "es2015.promise", - "es2016.array.include", - "es2018", - "es2020", - "es2021", - "es2022" + "dom.iterable", + "esnext" ], "module": "esnext", "moduleResolution": "node", @@ -21,11 +14,11 @@ "paths": { "@openmrs/*": ["./node_modules/@openmrs/*"], "__mocks__": ["./__mocks__"], - "tools": ["./tools"], + "tools": ["./tools"] }, "resolveJsonModule": true, "skipLibCheck": true, "strictNullChecks": true, - "target": "esnext", + "target": "esnext" } }