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

Commit a8540b0

Browse files
kapunahelewongjuleskremer
authored andcommitted
docs(typescript-config): copy edits applying guidelines (#3383)
1 parent 557200b commit a8540b0

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

public/docs/ts/latest/guide/typescript-configuration.jade

+19-15
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,30 @@
11
include ../_util-fns
22

33
:marked
4-
TypeScript is a primary language for Angular application development. It is a dialect of JavaScript with design-time support for type-safety and tooling.
4+
TypeScript is a primary language for Angular application development.
5+
It is a superset of JavaScript with design-time support for type safety and tooling.
56

67
Browsers can't execute TypeScript directly. Typescript must be "transpiled" into JavaScript using the *tsc* compiler,
78
which requires some configuration.
89

910
This page covers some aspects of TypeScript configuration and the TypeScript environment
1011
that are important to Angular developers, including details about the following files:
1112

12-
* [tsconfig.json](#tsconfig) - TypeScript compiler configuration.
13-
* [typings](#typings) - TypesScript declaration files.
13+
* [tsconfig.json](#tsconfig)—TypeScript compiler configuration.
14+
* [typings](#typings)—TypesScript declaration files.
1415

1516
a(id="tsconfig")
1617
.l-main-section
1718
:marked
1819
## *tsconfig.json*
19-
Typically, you add a TypeScript configuration file (`tsconfig.json`) to your project to
20+
Typically, you add a TypeScript configuration file called `tsconfig.json` to your project to
2021
guide the compiler as it generates JavaScript files.
2122
.l-sub-section
2223
:marked
2324
For details about `tsconfig.json`, see the official
2425
[TypeScript wiki](http://www.typescriptlang.org/docs/handbook/tsconfig-json.html).
2526
:marked
26-
We created the following `tsconfig.json` during [Setup](setup.html):
27+
The [Setup](setup.html) guide uses the following `tsconfig.json`:
2728
+makeJson('quickstart/ts/src/tsconfig.1.json', null, 'tsconfig.json')(format=".")
2829
:marked
2930
This file contains options and flags that are essential for Angular applications.
@@ -73,39 +74,42 @@ a(id="typings")
7374
can find them. Angular is one such library.
7475
The `node_modules/@angular/core/` folder of any Angular application contains several `d.ts` files that describe parts of Angular.
7576

76-
**You need do nothing to get *typings* files for library packages that include `d.ts` files—as all Angular packages do.**
77+
**You need do nothing to get *typings* files for library packages that include `d.ts` files.
78+
Angular packages include them already.**
7779

7880
### lib.d.ts
7981

8082
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.
8183

82-
Based on the `--target`, TypeScript adds _additional_ ambient declarations like `Promise` if our target is `es6`.
84+
Based on the `--target`, TypeScript adds _additional_ ambient declarations
85+
like `Promise` if the target is `es6`.
8386

84-
Since the QuickStart is targeting `es5`, we can override the list of declaration files to be included:
87+
Since the QuickStart is targeting `es5`, you can override the
88+
list of declaration files to be included:
8589

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

8993
:marked
90-
Thanks to that, we have all the `es6` typings even when targeting `es5`.
94+
Thanks to that, you have all the `es6` typings even when targeting `es5`.
9195

9296
### Installable typings files
9397
Many libraries—jQuery, Jasmine, and Lodash among them—do *not* include `d.ts` files in their npm packages.
9498
Fortunately, either their authors or community contributors have created separate `d.ts` files for these libraries and
9599
published them in well-known locations.
96100

97-
We can install these typings via `npm` using the
101+
You can install these typings via `npm` using the
98102
[`@types/*` scoped package](http://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html)
99-
and Typescript (starting at 2.0) will automatically recognize them.
103+
and Typescript, starting at 2.0, automatically recognizes them.
100104

101-
For instance, to install typings for `jasmine` we could do `npm install @types/jasmine --save-dev`.
105+
For instance, to install typings for `jasmine` you could do `npm install @types/jasmine --save-dev`.
102106

103107
:marked
104-
QuickStart identified two *typings* (`d.ts`) files:
108+
QuickStart identifies two *typings*, or `d.ts`, files:
105109

106-
* [jasmine](http://jasmine.github.io/) typings for the Jasmine test framework
110+
* [jasmine](http://jasmine.github.io/) typings for the Jasmine test framework.
107111

108112
* [node](https://www.npmjs.com/package/@types/node) for code that references objects in the *nodejs* environment;
109-
You can view an example in the [webpack](./webpack.html) page.
113+
you can view an example in the [webpack](./webpack.html) page.
110114

111115
QuickStart doesn't require these typings but many of the samples do.

0 commit comments

Comments
 (0)