From bfab5a695b7cf13f8c0fdb9504508f73437997da Mon Sep 17 00:00:00 2001 From: Avi Vahl Date: Wed, 22 Mar 2017 20:39:32 +0200 Subject: [PATCH] Update generation script to TypeScript 2.2 also match the new lib: [ 'es6' ] instead of target: [ 'es6' ] --- lodash/scripts/generate-modules.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lodash/scripts/generate-modules.ts b/lodash/scripts/generate-modules.ts index 395bb7ab4d..7f34e7c78e 100644 --- a/lodash/scripts/generate-modules.ts +++ b/lodash/scripts/generate-modules.ts @@ -23,7 +23,7 @@ async function main() { // Generate local module const localDir = path.join("..", module); ensureDir(localDir); - fs.writeFileSync(path.join(localDir, "index.d.ts"), `import { ${module} } from "../index";\nexport = ${module};`); + fs.writeFileSync(path.join(localDir, "index.d.ts"), `// TypeScript Version: 2.2\nimport { ${module} } from "../index";\nexport = ${module};`); // Generate non-local module if (!notOnNpm.has(module)) { @@ -54,7 +54,7 @@ async function globalDefinitionText(moduleName: string): Promise { // Project: http://lodash.com/ // Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.2 import { ${moduleName} } from "lodash"; export = ${moduleName}; @@ -68,7 +68,9 @@ function tsconfig() { ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false,