From 16dfe3c63fd1608111c119780e8c64d5ceba3ebd Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Fri, 20 May 2016 16:06:52 -0700 Subject: [PATCH] build: consolidate tsc to ease migration to @types/ based typings delivery I actually tried to use @types/* directly but came across several issues which prevented me from switching over: - https://github.com/Microsoft/TypeScript/issues/8715 - https://github.com/Microsoft/TypeScript/issues/8723 --- build.sh | 7 ++- gulpfile.js | 2 +- modules/@angular/common/tsconfig-es5.json | 5 +- .../@angular/compiler/tsconfig-es2015.json | 1 - modules/@angular/compiler/tsconfig-es5.json | 5 +- .../compiler_cli/integrationtest/typings.d.ts | 4 +- .../@angular/compiler_cli/tsconfig-es5.json | 4 +- modules/@angular/core/test/typings.d.ts | 6 --- modules/@angular/core/tsconfig-es5.json | 6 +-- modules/@angular/http/tsconfig-es5.json | 4 +- modules/@angular/manual_typings/globals.d.ts | 52 ------------------- .../platform-browser/tsconfig-es2015.json | 6 +-- .../platform-browser/tsconfig-es5.json | 10 ++-- .../platform-server/tsconfig-es2015.json | 2 +- .../platform-server/tsconfig-es5.json | 6 +-- .../router-deprecated/tsconfig-es5.json | 4 +- modules/@angular/router/tsconfig-es5.json | 4 +- modules/@angular/typings.d.ts | 8 --- modules/@angular/upgrade/tsconfig-es5.json | 4 +- modules/angular1_router/tsd.json | 12 ----- modules/tsconfig.json | 1 + modules/types.d.ts | 8 +++ scripts/ci-lite/install.sh | 4 +- tools/broccoli/broccoli-dartfmt.ts | 7 ++- tools/broccoli/broccoli-dest-copy.ts | 3 -- tools/broccoli/broccoli-filter.d.ts | 2 - tools/broccoli/broccoli-flatten.spec.ts | 3 -- tools/broccoli/broccoli-merge-trees.spec.ts | 3 -- tools/broccoli/broccoli-tree-stabilizer.ts | 3 -- tools/broccoli/broccoli-ts2dart.ts | 3 -- tools/broccoli/broccoli-typescript.ts | 2 - tools/broccoli/broccoli-writer.d.ts | 2 - tools/broccoli/broccoli.d.ts | 3 -- tools/broccoli/diffing-broccoli-plugin.ts | 2 - tools/broccoli/multi_copy.ts | 2 - tools/broccoli/tree-differ.spec.ts | 3 -- tools/broccoli/tree-differ.ts | 2 - tools/broccoli/trees/dart_tree.ts | 1 - .../tsconfig-output_emitter_codegen.json | 5 +- tools/tsc-watch/tsc_watch.ts | 6 +-- tools/tsconfig.json | 1 + tools/tsd.json | 21 -------- tools/types.d.ts | 5 ++ modules/@angular/tsd.json => tsd.json | 12 ++--- typing_spec/basic_spec.dart | 0 typing_spec/router_spec.dart | 0 46 files changed, 56 insertions(+), 200 deletions(-) delete mode 100644 modules/@angular/core/test/typings.d.ts delete mode 100644 modules/@angular/manual_typings/globals.d.ts delete mode 100644 modules/@angular/typings.d.ts delete mode 100644 modules/angular1_router/tsd.json create mode 100644 modules/types.d.ts delete mode 100644 tools/tsd.json create mode 100644 tools/types.d.ts rename modules/@angular/tsd.json => tsd.json (90%) delete mode 100644 typing_spec/basic_spec.dart delete mode 100644 typing_spec/router_spec.dart diff --git a/build.sh b/build.sh index 8c8ea6c288..6124e07667 100755 --- a/build.sh +++ b/build.sh @@ -107,11 +107,10 @@ do $(npm bin)/tsc \ --out ${UMD_ES5_PATH} \ --target es5 \ + --lib "es6,dom" \ --allowJs \ - ${UMD_ES6_PATH} \ - modules/\@angular/manual_typings/globals.d.ts \ - modules/\@angular/typings/es6-collections/es6-collections.d.ts \ - modules/\@angular/typings/es6-promise/es6-promise.d.ts + ${UMD_ES6_PATH} + rm ${UMD_ES6_PATH} cat ./modules/@angular/license-banner.txt > ${UMD_ES5_PATH}.tmp diff --git a/gulpfile.js b/gulpfile.js index 4deb8ea86b..5a61f24284 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -325,7 +325,7 @@ gulp.task('enforce-format', function() { }); }); -gulp.task('lint', ['build.tools'], function() { +gulp.task('lint', function() { var tslint = require('gulp-tslint'); // Built-in rules are at // https://github.com/palantir/tslint#supported-rules diff --git a/modules/@angular/common/tsconfig-es5.json b/modules/@angular/common/tsconfig-es5.json index a65803d910..b11904fff7 100644 --- a/modules/@angular/common/tsconfig-es5.json +++ b/modules/@angular/common/tsconfig-es5.json @@ -17,15 +17,12 @@ "rootDir": ".", "sourceMap": true, "inlineSources": true, + "lib": ["es6", "dom"], "target": "es5" }, "files": [ "index.ts", "testing.ts", - "../typings/es6-collections/es6-collections.d.ts", - "../typings/es6-promise/es6-promise.d.ts", - "../manual_typings/globals.d.ts", "../../../node_modules/zone.js/dist/zone.js.d.ts" - ] } diff --git a/modules/@angular/compiler/tsconfig-es2015.json b/modules/@angular/compiler/tsconfig-es2015.json index 7c4556e43c..04d3b21b88 100644 --- a/modules/@angular/compiler/tsconfig-es2015.json +++ b/modules/@angular/compiler/tsconfig-es2015.json @@ -24,6 +24,5 @@ "index.ts", "testing.ts", "../../../node_modules/zone.js/dist/zone.js.d.ts" - ] } diff --git a/modules/@angular/compiler/tsconfig-es5.json b/modules/@angular/compiler/tsconfig-es5.json index 8206e18f9a..b71e05fd7e 100644 --- a/modules/@angular/compiler/tsconfig-es5.json +++ b/modules/@angular/compiler/tsconfig-es5.json @@ -18,15 +18,12 @@ "rootDir": ".", "sourceMap": true, "inlineSources": true, + "lib": ["es6", "dom"], "target": "es5" }, "files": [ "index.ts", "testing.ts", - "../typings/es6-collections/es6-collections.d.ts", - "../typings/es6-promise/es6-promise.d.ts", - "../manual_typings/globals.d.ts", "../../../node_modules/zone.js/dist/zone.js.d.ts" - ] } diff --git a/modules/@angular/compiler_cli/integrationtest/typings.d.ts b/modules/@angular/compiler_cli/integrationtest/typings.d.ts index b99e33358e..76c2259d50 100644 --- a/modules/@angular/compiler_cli/integrationtest/typings.d.ts +++ b/modules/@angular/compiler_cli/integrationtest/typings.d.ts @@ -1,2 +1,2 @@ -/// -/// +/// +/// diff --git a/modules/@angular/compiler_cli/tsconfig-es5.json b/modules/@angular/compiler_cli/tsconfig-es5.json index 3d7410e560..096e147659 100644 --- a/modules/@angular/compiler_cli/tsconfig-es5.json +++ b/modules/@angular/compiler_cli/tsconfig-es5.json @@ -27,8 +27,8 @@ "files": [ "index.ts", "src/main.ts", - "../typings/node/node.d.ts", - "../typings/jasmine/jasmine.d.ts", + "../../../typings/node/node.d.ts", + "../../../typings/jasmine/jasmine.d.ts", "../../../node_modules/zone.js/dist/zone.js.d.ts" ] } diff --git a/modules/@angular/core/test/typings.d.ts b/modules/@angular/core/test/typings.d.ts deleted file mode 100644 index 5fb8ef643a..0000000000 --- a/modules/@angular/core/test/typings.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/// -/// -/// -/// -/// -/// diff --git a/modules/@angular/core/tsconfig-es5.json b/modules/@angular/core/tsconfig-es5.json index b5b2a8594c..005d4fb26c 100644 --- a/modules/@angular/core/tsconfig-es5.json +++ b/modules/@angular/core/tsconfig-es5.json @@ -17,15 +17,13 @@ "rootDir": ".", "sourceMap": true, "inlineSources": true, + "lib": ["es6", "dom"], "target": "es5" }, "files": [ "index.ts", "testing.ts", - "../typings/es6-collections/es6-collections.d.ts", - "../typings/es6-promise/es6-promise.d.ts", - "../typings/jasmine/jasmine.d.ts", - "../manual_typings/globals.d.ts", + "../../../typings/jasmine/jasmine.d.ts", "../../../node_modules/zone.js/dist/zone.js.d.ts" ] } diff --git a/modules/@angular/http/tsconfig-es5.json b/modules/@angular/http/tsconfig-es5.json index dcd9d7da97..009d0eea2d 100644 --- a/modules/@angular/http/tsconfig-es5.json +++ b/modules/@angular/http/tsconfig-es5.json @@ -17,14 +17,12 @@ "rootDir": ".", "sourceMap": true, "inlineSources": true, + "lib": ["es6", "dom"], "target": "es5" }, "files": [ "index.ts", "testing.ts", - "../typings/es6-collections/es6-collections.d.ts", - "../typings/es6-promise/es6-promise.d.ts", - "../manual_typings/globals.d.ts", "../../../node_modules/zone.js/dist/zone.js.d.ts" ] } diff --git a/modules/@angular/manual_typings/globals.d.ts b/modules/@angular/manual_typings/globals.d.ts deleted file mode 100644 index 9ae16c2288..0000000000 --- a/modules/@angular/manual_typings/globals.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Subset of es6-shim typings. - * Angular should not require use of ES6 runtime but some API usages are already present. - * See https://github.com/angular/angular/issues/5242 - * TODO(alexeagle): remove methods below which may not be present in targeted browser - */ - -declare type PromiseConstructor = typeof Promise; - -interface String { - /** - * Returns true if the sequence of elements of searchString converted to a String is the - * same as the corresponding elements of this object (converted to a String) starting at - * position. Otherwise returns false. - */ - startsWith(searchString: string, position?: number): boolean; - - /** - * Returns true if the sequence of elements of searchString converted to a String is the - * same as the corresponding elements of this object (converted to a String) starting at - * endPosition – length(this). Otherwise returns false. - */ - endsWith(searchString: string, endPosition?: number): boolean; -} -interface Array { - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: T, index: number, obj: Array) => boolean, thisArg?: any): T; - /** - * Returns the this object after filling the section identified by start and end with value - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: T, start?: number, end?: number): T[]; -} -interface NumberConstructor { - /** - * Returns true if the value passed is an integer, false otherwise. - * @param number A numeric value. - */ - isInteger(number: number): boolean; -} diff --git a/modules/@angular/platform-browser/tsconfig-es2015.json b/modules/@angular/platform-browser/tsconfig-es2015.json index 55813d490e..a7a951bc10 100644 --- a/modules/@angular/platform-browser/tsconfig-es2015.json +++ b/modules/@angular/platform-browser/tsconfig-es2015.json @@ -28,9 +28,9 @@ "files": [ "index.ts", "testing.ts", - "../typings/jasmine/jasmine.d.ts", - "../typings/hammerjs/hammerjs.d.ts", - "../typings/angular-protractor/angular-protractor.d.ts", + "../../../typings/jasmine/jasmine.d.ts", + "../../../typings/hammerjs/hammerjs.d.ts", + "../../../typings/angular-protractor/angular-protractor.d.ts", "../../../node_modules/zone.js/dist/zone.js.d.ts" ] } diff --git a/modules/@angular/platform-browser/tsconfig-es5.json b/modules/@angular/platform-browser/tsconfig-es5.json index 7d1bdef27f..a6a09b6c0a 100644 --- a/modules/@angular/platform-browser/tsconfig-es5.json +++ b/modules/@angular/platform-browser/tsconfig-es5.json @@ -23,17 +23,15 @@ "rootDir": ".", "sourceMap": true, "inlineSources": true, + "lib": ["es6", "dom"], "target": "es5" }, "files": [ "index.ts", "testing.ts", - "../typings/es6-collections/es6-collections.d.ts", - "../typings/es6-promise/es6-promise.d.ts", - "../manual_typings/globals.d.ts", - "../typings/hammerjs/hammerjs.d.ts", - "../typings/angular-protractor/angular-protractor.d.ts", - "../typings/jasmine/jasmine.d.ts", + "../../../typings/hammerjs/hammerjs.d.ts", + "../../../typings/angular-protractor/angular-protractor.d.ts", + "../../../typings/jasmine/jasmine.d.ts", "../../../node_modules/zone.js/dist/zone.js.d.ts" ] } diff --git a/modules/@angular/platform-server/tsconfig-es2015.json b/modules/@angular/platform-server/tsconfig-es2015.json index b5d4ac6e15..ef47a14264 100644 --- a/modules/@angular/platform-server/tsconfig-es2015.json +++ b/modules/@angular/platform-server/tsconfig-es2015.json @@ -24,7 +24,7 @@ }, "files": [ "index.ts", - "../typings/node/node.d.ts", + "../../../typings/node/node.d.ts", "../../../node_modules/zone.js/dist/zone.js.d.ts" ] } diff --git a/modules/@angular/platform-server/tsconfig-es5.json b/modules/@angular/platform-server/tsconfig-es5.json index 07e2083c34..6caa4112ae 100644 --- a/modules/@angular/platform-server/tsconfig-es5.json +++ b/modules/@angular/platform-server/tsconfig-es5.json @@ -20,14 +20,12 @@ "rootDir": ".", "sourceMap": true, "inlineSources": true, + "lib": ["es6", "dom"], "target": "es5" }, "files": [ "index.ts", - "../typings/es6-collections/es6-collections.d.ts", - "../typings/es6-promise/es6-promise.d.ts", - "../typings/node/node.d.ts", - "../manual_typings/globals.d.ts", + "../../../typings/node/node.d.ts", "../../../node_modules/zone.js/dist/zone.js.d.ts" ] } diff --git a/modules/@angular/router-deprecated/tsconfig-es5.json b/modules/@angular/router-deprecated/tsconfig-es5.json index e7481fd848..2ffc89573e 100644 --- a/modules/@angular/router-deprecated/tsconfig-es5.json +++ b/modules/@angular/router-deprecated/tsconfig-es5.json @@ -19,14 +19,12 @@ "rootDir": ".", "sourceMap": true, "inlineSources": true, + "lib": ["es6", "dom"], "target": "es5" }, "files": [ "index.ts", "testing.ts", - "../typings/es6-collections/es6-collections.d.ts", - "../typings/es6-promise/es6-promise.d.ts", - "../manual_typings/globals.d.ts", "../../../node_modules/zone.js/dist/zone.js.d.ts" ] } diff --git a/modules/@angular/router/tsconfig-es5.json b/modules/@angular/router/tsconfig-es5.json index 53c047fdb7..569be600e0 100644 --- a/modules/@angular/router/tsconfig-es5.json +++ b/modules/@angular/router/tsconfig-es5.json @@ -20,14 +20,12 @@ "rootDir": ".", "sourceMap": true, "inlineSources": true, + "lib": ["es6", "dom"], "target": "es5" }, "files": [ "index.ts", "testing.ts", - "../typings/es6-collections/es6-collections.d.ts", - "../typings/es6-promise/es6-promise.d.ts", - "../manual_typings/globals.d.ts", "../../../node_modules/zone.js/dist/zone.js.d.ts" ] } diff --git a/modules/@angular/typings.d.ts b/modules/@angular/typings.d.ts deleted file mode 100644 index 2c225474d6..0000000000 --- a/modules/@angular/typings.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/// -/// -/// -/// -/// -/// -/// -/// diff --git a/modules/@angular/upgrade/tsconfig-es5.json b/modules/@angular/upgrade/tsconfig-es5.json index eb81583fb0..180a612c46 100644 --- a/modules/@angular/upgrade/tsconfig-es5.json +++ b/modules/@angular/upgrade/tsconfig-es5.json @@ -20,13 +20,11 @@ "rootDir": ".", "sourceMap": true, "inlineSources": true, + "lib": ["es6", "dom"], "target": "es5" }, "files": [ "index.ts", - "../typings/es6-collections/es6-collections.d.ts", - "../typings/es6-promise/es6-promise.d.ts", - "../manual_typings/globals.d.ts", "../../../node_modules/zone.js/dist/zone.js.d.ts" ] } diff --git a/modules/angular1_router/tsd.json b/modules/angular1_router/tsd.json deleted file mode 100644 index c3a826654c..0000000000 --- a/modules/angular1_router/tsd.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "version": "v4", - "repo": "DefinitelyTyped/DefinitelyTyped", - "ref": "master", - "path": "typings", - "bundle": "typings/tsd.d.ts", - "installed": { - "angularjs/angular.d.ts": { - "commit": "6eebd5e90a1cbd6b47b0705ba72dbcd5baf846f3" - } - } -} diff --git a/modules/tsconfig.json b/modules/tsconfig.json index 140b633440..689bc9ef17 100644 --- a/modules/tsconfig.json +++ b/modules/tsconfig.json @@ -18,6 +18,7 @@ }, "rootDir": ".", "inlineSourceMap": true, + "lib": ["es6", "dom"], "target": "es5" }, "exclude": [ diff --git a/modules/types.d.ts b/modules/types.d.ts new file mode 100644 index 0000000000..bab9088b4d --- /dev/null +++ b/modules/types.d.ts @@ -0,0 +1,8 @@ +// This file contains all ambient imports needed to compile the modules/ source code + +/// +/// +/// +/// +/// +/// diff --git a/scripts/ci-lite/install.sh b/scripts/ci-lite/install.sh index 14019a0065..eaf15759b2 100755 --- a/scripts/ci-lite/install.sh +++ b/scripts/ci-lite/install.sh @@ -61,9 +61,7 @@ if [[ ${TRAVIS} ]]; then echo ${TSDRC} > ~/.tsdrc fi -$(npm bin)/tsd reinstall --overwrite --clean --config modules/@angular/tsd.json -$(npm bin)/tsd reinstall --overwrite --clean --config tools/tsd.json -$(npm bin)/tsd reinstall --overwrite --config modules/angular1_router/tsd.json +$(npm bin)/tsd reinstall --overwrite --clean --config ./tsd.json echo 'travis_fold:end:install.typings' diff --git a/tools/broccoli/broccoli-dartfmt.ts b/tools/broccoli/broccoli-dartfmt.ts index 39556f5ea8..759c5f68d8 100644 --- a/tools/broccoli/broccoli-dartfmt.ts +++ b/tools/broccoli/broccoli-dartfmt.ts @@ -1,5 +1,3 @@ -/// -/// import fse = require('fs-extra'); import path = require('path'); import {wrapDiffingPlugin, DiffingBroccoliPlugin, DiffResult} from './diffing-broccoli-plugin'; @@ -62,8 +60,9 @@ class DartFormatter implements DiffingBroccoliPlugin { } let execute = (args: string[]) => { - if (args.length < 2) return Promise.resolve(); - return new Promise((resolve, reject) => { + if (args.length < 2) + return Promise.resolve(); + return new Promise((resolve, reject) => { exec(this.DARTFMT + ' ' + args.join(' '), (err: Error, stdout: string, stderr: string) => { if (this.verbose) { console.log(stdout); diff --git a/tools/broccoli/broccoli-dest-copy.ts b/tools/broccoli/broccoli-dest-copy.ts index d401f28bec..f82b749e3f 100644 --- a/tools/broccoli/broccoli-dest-copy.ts +++ b/tools/broccoli/broccoli-dest-copy.ts @@ -1,6 +1,3 @@ -/// -/// - import fs = require('fs'); import fse = require('fs-extra'); import path = require('path'); diff --git a/tools/broccoli/broccoli-filter.d.ts b/tools/broccoli/broccoli-filter.d.ts index 3a04ebea2a..496b1fc5a7 100644 --- a/tools/broccoli/broccoli-filter.d.ts +++ b/tools/broccoli/broccoli-filter.d.ts @@ -1,5 +1,3 @@ -/// - interface FilterOptions { extensions?: string[] } diff --git a/tools/broccoli/broccoli-flatten.spec.ts b/tools/broccoli/broccoli-flatten.spec.ts index aab7b9a24a..778bef553a 100644 --- a/tools/broccoli/broccoli-flatten.spec.ts +++ b/tools/broccoli/broccoli-flatten.spec.ts @@ -1,6 +1,3 @@ -/// -/// - let mockfs = require('mock-fs'); import fs = require('fs'); import path = require('path'); diff --git a/tools/broccoli/broccoli-merge-trees.spec.ts b/tools/broccoli/broccoli-merge-trees.spec.ts index 91eac48d3a..5e090ad50d 100644 --- a/tools/broccoli/broccoli-merge-trees.spec.ts +++ b/tools/broccoli/broccoli-merge-trees.spec.ts @@ -1,6 +1,3 @@ -/// -/// - let mockfs = require('mock-fs'); import fs = require('fs'); import {TreeDiffer, DiffResult} from './tree-differ'; diff --git a/tools/broccoli/broccoli-tree-stabilizer.ts b/tools/broccoli/broccoli-tree-stabilizer.ts index b00fa0e551..3d2444bf11 100644 --- a/tools/broccoli/broccoli-tree-stabilizer.ts +++ b/tools/broccoli/broccoli-tree-stabilizer.ts @@ -1,6 +1,3 @@ -/// -/// - import fs = require('fs'); let symlinkOrCopy = require('symlink-or-copy'); diff --git a/tools/broccoli/broccoli-ts2dart.ts b/tools/broccoli/broccoli-ts2dart.ts index 8053fd9f09..18ece4647e 100644 --- a/tools/broccoli/broccoli-ts2dart.ts +++ b/tools/broccoli/broccoli-ts2dart.ts @@ -1,6 +1,3 @@ -/// -/// - import fs = require('fs'); import fse = require('fs-extra'); import path = require('path'); diff --git a/tools/broccoli/broccoli-typescript.ts b/tools/broccoli/broccoli-typescript.ts index 031d7b675c..777b7384b3 100644 --- a/tools/broccoli/broccoli-typescript.ts +++ b/tools/broccoli/broccoli-typescript.ts @@ -1,5 +1,3 @@ -/// - import fs = require('fs'); import fse = require('fs-extra'); import path = require('path'); diff --git a/tools/broccoli/broccoli-writer.d.ts b/tools/broccoli/broccoli-writer.d.ts index 0eb9fd8509..1878d247c1 100644 --- a/tools/broccoli/broccoli-writer.d.ts +++ b/tools/broccoli/broccoli-writer.d.ts @@ -1,5 +1,3 @@ -/// - declare module "broccoli-writer" { class Writer { write(readTree: (tree: BroccoliTree) => Promise, destDir: string): Promise; diff --git a/tools/broccoli/broccoli.d.ts b/tools/broccoli/broccoli.d.ts index d058488c82..f7d3dfdf71 100644 --- a/tools/broccoli/broccoli.d.ts +++ b/tools/broccoli/broccoli.d.ts @@ -1,6 +1,3 @@ -/// - - interface BroccoliTree { /** * Contains the fs path for the input tree when the plugin takes only one input tree. diff --git a/tools/broccoli/diffing-broccoli-plugin.ts b/tools/broccoli/diffing-broccoli-plugin.ts index a74b937c88..d095ecdc02 100644 --- a/tools/broccoli/diffing-broccoli-plugin.ts +++ b/tools/broccoli/diffing-broccoli-plugin.ts @@ -1,6 +1,4 @@ /// -/// -/// import fs = require('fs'); import fse = require('fs-extra'); diff --git a/tools/broccoli/multi_copy.ts b/tools/broccoli/multi_copy.ts index cb4c85a46a..8cc77e441d 100644 --- a/tools/broccoli/multi_copy.ts +++ b/tools/broccoli/multi_copy.ts @@ -1,5 +1,3 @@ -/// -/// /// import Writer = require('broccoli-writer'); diff --git a/tools/broccoli/tree-differ.spec.ts b/tools/broccoli/tree-differ.spec.ts index bd1c1b7abc..27c9719366 100644 --- a/tools/broccoli/tree-differ.spec.ts +++ b/tools/broccoli/tree-differ.spec.ts @@ -1,6 +1,3 @@ -/// -/// - let mockfs = require('mock-fs'); import fs = require('fs'); import path = require('path'); diff --git a/tools/broccoli/tree-differ.ts b/tools/broccoli/tree-differ.ts index f95e29a561..0a4f929f46 100644 --- a/tools/broccoli/tree-differ.ts +++ b/tools/broccoli/tree-differ.ts @@ -1,5 +1,3 @@ -/// - import fs = require('fs'); import path = require('path'); diff --git a/tools/broccoli/trees/dart_tree.ts b/tools/broccoli/trees/dart_tree.ts index 94190b8b4e..efda064caf 100644 --- a/tools/broccoli/trees/dart_tree.ts +++ b/tools/broccoli/trees/dart_tree.ts @@ -1,4 +1,3 @@ -/// 'use strict'; import {MultiCopy} from './../multi_copy'; diff --git a/tools/cjs-jasmine/tsconfig-output_emitter_codegen.json b/tools/cjs-jasmine/tsconfig-output_emitter_codegen.json index 9ef39405c7..12264c6b2c 100644 --- a/tools/cjs-jasmine/tsconfig-output_emitter_codegen.json +++ b/tools/cjs-jasmine/tsconfig-output_emitter_codegen.json @@ -15,12 +15,11 @@ "rootDir": "../../dist/all/@angular", "sourceMap": true, "sourceRoot": ".", + "lib": ["es6", "dom"], "target": "es5" }, "files": [ - "../../modules/@angular/typings/es6-collections/es6-collections.d.ts", - "../../modules/@angular/typings/es6-promise/es6-promise.d.ts", - "../../modules/@angular/typings/node/node.d.ts", + "../../typings/node/node.d.ts", "../../dist/all/@angular/compiler/test/output/output_emitter_codegen_typed.ts", "../../dist/all/@angular/compiler/test/output/output_emitter_codegen_untyped.ts", "../../dist/all/@angular/compiler/test/offline_compiler_codegen_untyped.ts", diff --git a/tools/tsc-watch/tsc_watch.ts b/tools/tsc-watch/tsc_watch.ts index 4fb7f8ba8f..e046039ce8 100644 --- a/tools/tsc-watch/tsc_watch.ts +++ b/tools/tsc-watch/tsc_watch.ts @@ -50,8 +50,8 @@ export class TscWatch { this.onStartCmds.forEach((cmd) => this.runCmd(cmd, null, () => null, () => null)); } - private runCmd(argsOrCmd: string[] | Command, env?: {[k: string]: string}, - stdOut = pipeStdOut, stdErr = pipeStdErr): Promise + private runCmd(argsOrCmd: string[] | Command, env?: {[k: string]: string}, + stdOut = pipeStdOut, stdErr = pipeStdErr): Promise { if (typeof argsOrCmd == 'function') { return (argsOrCmd as Command)(stdErr, stdOut); @@ -117,7 +117,7 @@ export class TscWatch { } triggerCmds() { - var cmdPromise: Promise = Promise.resolve(); + var cmdPromise: Promise = Promise.resolve(0); this.onChangeCmds.forEach((cmd: string[] | Command) => {cmdPromise = cmdPromise.then(() => { return this.runCmd(cmd); })}); diff --git a/tools/tsconfig.json b/tools/tsconfig.json index 90836a275e..948841ae97 100644 --- a/tools/tsconfig.json +++ b/tools/tsconfig.json @@ -13,6 +13,7 @@ "rootDir": ".", "sourceMap": true, "inlineSources": true, + "lib": ["es6", "dom"], "target": "es5" }, "exclude": [ diff --git a/tools/tsd.json b/tools/tsd.json deleted file mode 100644 index d3de3c7bdd..0000000000 --- a/tools/tsd.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "version": "v4", - "repo": "DefinitelyTyped/DefinitelyTyped", - "ref": "master", - "path": "typings", - "bundle": "typings/tsd.d.ts", - "installed": { - "fs-extra/fs-extra.d.ts": { - "commit": "6eebd5e90a1cbd6b47b0705ba72dbcd5baf846f3" - }, - "node/node.d.ts": { - "commit": "6eebd5e90a1cbd6b47b0705ba72dbcd5baf846f3" - }, - "es6-promise/es6-promise.d.ts": { - "commit": "6eebd5e90a1cbd6b47b0705ba72dbcd5baf846f3" - }, - "jasmine/jasmine.d.ts": { - "commit": "6eebd5e90a1cbd6b47b0705ba72dbcd5baf846f3" - } - } -} diff --git a/tools/types.d.ts b/tools/types.d.ts new file mode 100644 index 0000000000..411875d6d4 --- /dev/null +++ b/tools/types.d.ts @@ -0,0 +1,5 @@ +// This file contains all ambient imports needed to compile the tools source code + +/// +/// +/// diff --git a/modules/@angular/tsd.json b/tsd.json similarity index 90% rename from modules/@angular/tsd.json rename to tsd.json index 5c497290f2..70514d0f45 100644 --- a/modules/@angular/tsd.json +++ b/tsd.json @@ -5,19 +5,16 @@ "path": "typings", "bundle": "typings/tsd.d.ts", "installed": { - "es6-promise/es6-promise.d.ts": { + "fs-extra/fs-extra.d.ts": { "commit": "6eebd5e90a1cbd6b47b0705ba72dbcd5baf846f3" }, - "es6-collections/es6-collections.d.ts": { - "commit": "6eebd5e90a1cbd6b47b0705ba72dbcd5baf846f3" - }, - "hammerjs/hammerjs.d.ts": { + "node/node.d.ts": { "commit": "6eebd5e90a1cbd6b47b0705ba72dbcd5baf846f3" }, "jasmine/jasmine.d.ts": { "commit": "6eebd5e90a1cbd6b47b0705ba72dbcd5baf846f3" }, - "node/node.d.ts": { + "hammerjs/hammerjs.d.ts": { "commit": "6eebd5e90a1cbd6b47b0705ba72dbcd5baf846f3" }, "selenium-webdriver/selenium-webdriver.d.ts": { @@ -25,6 +22,9 @@ }, "angular-protractor/angular-protractor.d.ts": { "commit": "6eebd5e90a1cbd6b47b0705ba72dbcd5baf846f3" + }, + "angularjs/angular.d.ts": { + "commit": "6eebd5e90a1cbd6b47b0705ba72dbcd5baf846f3" } } } diff --git a/typing_spec/basic_spec.dart b/typing_spec/basic_spec.dart deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/typing_spec/router_spec.dart b/typing_spec/router_spec.dart deleted file mode 100644 index e69de29bb2..0000000000