Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

chore: use tsconfig lib #2840

Merged
merged 1 commit into from
Nov 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,7 @@
"type": "git",
"url": "https://github.com/angular/angular.io.git"
},
"licenses": [
{
"type": "MIT",
"url": "https://github.com/angular/angular.io/blob/master/LICENSE"
}
],
"license": "MIT",
"bugs": {
"url": ""
},
Expand Down
7 changes: 1 addition & 6 deletions public/docs/_examples/_boilerplate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,7 @@
},
"keywords": [],
"author": "",
"licenses": [
{
"type": "MIT",
"url": "https://github.com/angular/angular.io/blob/master/LICENSE"
}
],
"license": "MIT",
"dependencies": {},
"devDependencies": {},
"repository": {}
Expand Down
2 changes: 1 addition & 1 deletion public/docs/_examples/_boilerplate/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"lib": ["es2015", "dom"],
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true,
"typeRoots": [
Expand Down
2 changes: 1 addition & 1 deletion public/docs/_examples/cb-aot-compiler/ts/tsconfig-aot.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"lib": ["es2015", "dom"],
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true
},
Expand Down
10 changes: 2 additions & 8 deletions public/docs/_examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@
},
"keywords": [],
"author": "",
"licenses": [
{
"type": "MIT",
"url": "https://github.com/angular/angular.io/blob/master/LICENSE"
}
],
"license": "MIT",
"dependencies": {
"@angular/common": "~2.2.0",
"@angular/compiler": "~2.2.0",
Expand All @@ -27,7 +22,7 @@
"@angular/router": "~3.2.0",
"@angular/upgrade": "~2.2.0",

"angular-in-memory-web-api": "~0.1.15",
"angular-in-memory-web-api": "~0.1.16",

"core-js": "^2.4.1",
"reflect-metadata": "^0.1.8",
Expand All @@ -46,7 +41,6 @@
"@types/angular-resource": "^1.5.6",
"@types/angular-route": "^1.3.2",
"@types/angular-sanitize": "^1.3.3",
"@types/core-js": "^0.9.34",
"@types/jasmine": "~2.5.36",
"@types/node": "^6.0.45",
"@types/selenium-webdriver": "^2.53.32",
Expand Down
7 changes: 1 addition & 6 deletions public/docs/_examples/quickstart/js/package.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@
"start": "npm run lite",
"lite": "lite-server"
},
"licenses": [
{
"type": "MIT",
"url": "https://github.com/angular/angular.io/blob/master/LICENSE"
}
],
"license": "MIT",
"dependencies": {
"@angular/common": "~2.2.0",
"@angular/compiler": "~2.2.0",
Expand Down
7 changes: 1 addition & 6 deletions public/docs/_examples/quickstart/ts/package.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@
"tsc": "tsc",
"tsc:w": "tsc -w"
},
"licenses": [
{
"type": "MIT",
"url": "https://github.com/angular/angular.io/blob/master/LICENSE"
}
],
"license": "MIT",
"dependencies": {
"@angular/common": "~2.2.0",
"@angular/compiler": "~2.2.0",
Expand Down
2 changes: 1 addition & 1 deletion public/docs/_examples/quickstart/ts/tsconfig.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"lib": ["es2015", "dom"],
"noImplicitAny": false
}
}
7 changes: 1 addition & 6 deletions public/docs/_examples/styleguide/package.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@
"lite": "lite-server",
"start": "concurrently \"npm run tsc:w\" \"npm run lite\" "
},
"licenses": [
{
"type": "MIT",
"url": "https://github.com/angular/angular.io/blob/master/LICENSE"
}
],
"license": "MIT",
"dependencies": {
"angular2": "2.0.0-beta.0",
"systemjs": "0.19.6",
Expand Down
2 changes: 1 addition & 1 deletion public/docs/_examples/toh-6/ts/tsconfig-aot.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"lib": ["es2015", "dom"],
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true,
"typeRoots": [
Expand Down
2 changes: 1 addition & 1 deletion public/docs/_examples/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"lib": ["es2015", "dom"],
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true,
"typeRoots": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@
"version": "0.0.0",
"description": "A tutorial application for AngularJS",
"repository": "https://github.com/angular/angular-phonecat",
"licenses": [
{
"type": "MIT",
"url": "https://github.com/angular/angular.io/blob/master/LICENSE"
}
],
"license": "MIT",
"devDependencies": {
"bower": "^1.7.7",
"http-server": "^0.9.0",
Expand Down
8 changes: 1 addition & 7 deletions public/docs/_examples/webpack/ts/package.webpack.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@
"test": "karma start",
"build": "rimraf dist && webpack --config config/webpack.prod.js --progress --profile --bail"
},
"licenses": [
{
"type": "MIT",
"url": "https://github.com/angular/angular.io/blob/master/LICENSE"
}
],
"license": "MIT",
"dependencies": {
"@angular/common": "~2.2.0",
"@angular/compiler": "~2.2.0",
Expand All @@ -27,7 +22,6 @@
"zone.js": "^0.6.25"
},
"devDependencies": {
"@types/core-js": "^0.9.34",
"@types/node": "^6.0.45",
"@types/jasmine": "^2.5.35",
"angular2-template-loader": "^0.4.0",
Expand Down
23 changes: 17 additions & 6 deletions public/docs/ts/latest/guide/typescript-configuration.jade
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,21 @@ a(id="typings")
The `node_modules/@angular/core/` folder of any Angular application contains several `d.ts` files that describe parts of Angular.

**You need do nothing to get *typings* files for library packages that include `d.ts` files—as all Angular packages do.**


### lib.d.ts

TypeScript includes a special declaration file called `lib.d.ts`. This file contains the ambient declarations for various common JavaScript constructs present in JavaScript runtimes and the DOM.

Based on the `--target`, TypeScript adds _additional_ ambient declarations like `Promise` if our target is `es6`.

Since the QuickStart is targeting `es5`, we can override the list of declaration files to be included:

code-example(format=".")
"lib": ["es2015", "dom"]

:marked
Thanks to that, we have all the `es6` typings even when targeting `es5`.

### Installable typings files
Many libraries—jQuery, Jasmine, and Lodash among them—do *not* include `d.ts` files in their npm packages.
Fortunately, either their authors or community contributors have created separate `d.ts` files for these libraries and
Expand All @@ -86,11 +100,8 @@ a(id="typings")
For instance, to install typings for `jasmine` we could do `npm install @types/jasmine --save-dev`.

:marked
QuickStart identified three *typings* (`d.ts`) files:

* [core-js](https://github.com/zloirock/core-js/blob/master/README.md)
brings ES2015/ES6 capabilities to ES5 browsers

QuickStart identified two *typings* (`d.ts`) files:

* [jasmine](http://jasmine.github.io/) typings for the Jasmine test framework

* [node](https://www.npmjs.com/package/@types/node) for code that references objects in the *nodejs* environment;
Expand Down