diff --git a/package.json b/package.json index e87b246..d3fc92b 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "license": "MIT", "main": "./lib/CLI.js", "typings": "./lib/index.d.ts", - "version": "2.0.0-alpha-8", + "version": "2.0.0-alpha-9", "dependencies": { "chalk": "^2.3.0" }, diff --git a/src/Core/Actions/Typings.ts b/src/Core/Actions/Typings.ts index 5bab593..db07445 100644 --- a/src/Core/Actions/Typings.ts +++ b/src/Core/Actions/Typings.ts @@ -38,7 +38,14 @@ class Script extends UpdateScript { } const tsconfig = await project.json('tsconfig.json') - tsconfig.compilerOptions.types = await this.gatherTypeDefinitions(project) + const declarations: string[] = [] + + await Promise.all(project.children.map(async child => { + const dependencies = await this.gatherTypeDefinitions(project) + dependencies.forEach(dependency => declarations.push(dependency)) + })) + + tsconfig.compilerOptions.types = declarations.sort() if (this.testing) { this.log.task('tsconfig', JSON.stringify(tsconfig, null, 2))