From e74042ecb8f029ab6ff8ceeb01e699f794271ebe Mon Sep 17 00:00:00 2001 From: JBWatenbergScality <75977494+JBWatenbergScality@users.noreply.github.com> Date: Tue, 2 Feb 2021 11:28:29 +0100 Subject: [PATCH] fix: Typescript build by adding static types dependency list By default typescript tries to build any given types available in its build scope but that brings some issue when the consumer project import types dependencies because tsc would then try to compile them as well whereas they should remains out of the build scope of the library. In order to solve this I've statically listed all types dependencies of this project in the types attribute of ts config file. --- tsconfig.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index 13cdfdebaf..fe553afc31 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -13,9 +13,10 @@ "rootDir": "src", "strict": true, "forceConsistentCasingInFileNames": true, - "importHelpers": true + "importHelpers": true, // enable this when it works with tslint, or we switch to prettier // "declarationMap": true + "types": ["js-yaml", "node", "request", "underscore", "ws", "byline", "chai", "chai-as-promised", "mocha", "mock-fs", "stream-buffers"] }, "exclude": [ "node_modules",