Skip to content

Start of handbook style pages #124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Nov 14, 2019
Merged

Start of handbook style pages #124

merged 11 commits into from
Nov 14, 2019

Conversation

orta
Copy link
Contributor

@orta orta commented Nov 11, 2019

Screen Shot 2019-11-10 at 7 59 20 PM

Has great keyboard navigation too.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 11, 2019

Messages
📖

Deployed to a PR branch - tsconfig old handbook

Got false positives?

Make changes to the global settings spellcheck.json in /artsy/peril-settings.

Typos for useDefineForClassFields.md

Line Typo
6 re it had a different runtime behavior but the same syntax. This fla
6 switches to the ECMA runtime behavior.

Typos for generateCpuProfile.md

Line Typo
6 nce to have TypeScript emit a v8 CPU profile during the compil

Typos for disableSourceOfProjectReferenceRedirect.md

Line Typo
6 vides a way to go back to the pre-3.7 behavior where d.ts files w
6 way to go back to the pre-3.7 behavior where d.ts files were used to
6 to the pre-3.7 behavior where d.ts files were used to as the bou

Typos for tsconfig.json.md

Line Typo
12 ## Using tsconfig.json
14 * By invoking tsc with no input files, in which
15 * By invoking tsc with no input files and a `--
123 This config file will include all packa
153 n by those in the inheriting config file.
156 exclude from the inheriting config file overwrite those from t
156 verwrite* those from the base config file.
198 enerate all files for a given tsconfig.json upon saving.
209 m-typescript#compile-on-save) plugin.

Typos for TypeScript in 5 minutes.md

Line Typo
12 * Via npm (the Node.js package manager)
12 * Via npm (the Node.js package manager)
13 ng TypeScript's Visual Studio plugins
96 describes objects that have a firstName and lastName field.
96 cts that have a firstName and lastName field.

Typos for React.md

Line Typo
10 * linting with [TSLint](https://github.com/palantir/
12 * state management with [Redux](https://github.com/reactjs/r
16 me that you're already using [Node.js](https://nodejs.org/) with [n
16 s](https://nodejs.org/) with [npm](https://www.npmjs.com/).
36 [react-scripts-ts](https://www.npmjs.com/packag
55 stores the settings that our linter, [TSLint](https://github.com/
55 he settings that our linter, [TSLint](https://github.com/palantir/
151 t takes a Props object, and destructures it.
180 For our application's lifecycle, we will revisit how applicat
180 ons manage general state with Redux in a bit.
233 reate-react-app uses (namely, Webpack and various loaders) allow us
233 ) allow us to just import the stylesheets we're interested in.
254 ion includes a library called jsdom to allow us to simulate the D
254 the DOM and test its runtime behavior without a browser.
255 yme is similar, but builds on jsdom and makes it easier to make c
317 a useful library for creating composable views.
321 community uses libraries like Redux and MobX.
321 uses libraries like Redux and MobX.
323 [Redux](http://redux.js.org) relies
327 [MobX](https://mobx.js.org/) relies
331 There are various merits and tradeoffs to both.
332 Generally Redux tends to see more widespread
332 torial, we'll focus on adding Redux;
336 ou [familiarize yourself with Redux through its documentation](ht
340 It doesn't make sense to add Redux unless the state of our appli
346 ## Installing Redux
348 To add Redux, we'll first install redux
354 nstall @types/redux because Redux already comes with its own de
358 the shape of the state which Redux will store.
388 s in an easily accessible and refactorable way.
422 to look into libraries like [redux-actions](https://www.npmjs.com/packag
457 Consider looking into Jest's [toEqual](https://facebook.github.io/j
461 When writing with Redux, we will often write componen
464 re about this concept on [Dan Abramov's article *Presentational and C
513 s the connect function from react-redux.
600 src/containers/Helloand use **react-redux's**Provider` to wire up our pro
624 ample, if you'd like to add a Webpack plugin, it might be necessary
624 f you'd like to add a Webpack plugin, it might be necessary to tak
642 till want to learn more about Redux, you can [check out the offic
643 The same goes [for MobX](https://mobx.js.org/).
645 know a little bit more about Webpack.
646 ou can check out our [React & Webpack walkthrough here](./React%20&
646 heck out our [React & Webpack walkthrough here](./React%20&%20Webpack.m
649 probably the most popular for Redux projects, and is often used i
649 ten used in conjunction with [react-router-redux](https://github.com/reactjs/r

Typos for React & Webpack.md

Line Typo
6 t](https://reactjs.org/) and [webpack](https://webpack.js.org/).
10 me that you're already using [Node.js](https://nodejs.org/) with [n
10 s](https://nodejs.org/) with [npm](https://www.npmjs.com/).
31 the TypeScript compiler, then webpack, and end up in a main.js fi
43 Webpack will eventually generate the
47 e'll turn this folder into an npm package.
57 First ensure Webpack is installed.
63 Webpack is a tool that will bundle yo
77 ent-time dependencies on the [ts-loader](https://www.npmjs.com/packag
83 ncies will let TypeScript and webpack play well together.
84 ts-loader helps Webpack compile your Ty
84 ts-loader helps Webpack compile your TypeScript code
85 source-map-loader uses any sourcemap outputs from TypeScript to in
85 uts from TypeScript to inform webpack when generating its own sou
85 ack when generating its own sourcemaps.
88 Please note that ts-loader is not the only loader for ty
189 React and React-DOM's npm packages include standalo
189 React and React-DOM's npm packages include standalone `
189 ct-DOM's npm packages include standalone .js files that you can incl
191 Facebook makes CDN-hosted versions of React available,
193 # Create a webpack configuration file
245 the "namespace pattern", and webpack allows us to continue leverag
246 entry for "react": "React", webpack will work its magic to make a
248 learn more about configuring webpack [here](https://webpack.js.org
258 open up index.html in your favorite browser and everything should

Typos for Migrating from JavaScript.md

Line Typo
87 with common build tools like Browserify, Babelify, and Uglify.
87 build tools like Browserify, Babelify, and Uglify.
90 ## Webpack
92 Webpack integration is pretty simple.
135 The same goes for [ts-loader](https://github.com/TypeStron
135 another TypeScript loader for Webpack.
138 u can see an example of using Webpack in our [tutorial on React and
138 in our [tutorial on React and Webpack](./React%20&%20Webpack.md).
155 for you, you can tighten that behavior up.
192 If you had the following Node/CommonJS code:
200 or the following RequireJS/AMD code:
229 hat, you'll be able to import lodash with no issues, and get accur

Typos for Gulp.md

Line Typo
6 p://gulpjs.com) and then add [Browserify](http://browserify.org), [ugl
6 isperator.net/uglifyjs/), or [Watchify](https://github.com/substack/
7 ljs.io/) functionality using [Babelify](https://github.com/babel/bab
9 me that you're already using [Node.js](https://nodejs.org/) with [n
9 s](https://nodejs.org/) with [npm](https://www.npmjs.com/).
40 e'll turn this folder into an npm package.
61 ge/gulp-typescript) is a gulp plugin for Typescript.
120 Before we get to Browserify, let's build our code out and
161 le syntax, TypeScript emitted CommonJS modules that Node uses.
162 We'll stick with CommonJS for this tutorial, but you co
164 # Browserify
168 tunately, that's exactly what Browserify does.
169 en better, it lets us use the CommonJS module system used by Node, w
172 First, install browserify, [tsify](https://www.npmjs.co
172 First, install browserify, [tsify](https://www.npmjs.com/packag
173 tsify is a Browserify plugin that,
173 tsify is a Browserify plugin that, like gulp-typesc
173 tsify is a Browserify plugin that, like gulp-typescript, g
174 s us adapt the file output of Browserify back into a format that gulp
212 Now change your gulpfile to the following:
245 lso changed default to call Browserify with the tsify plugin instead
245 ` to call Browserify with the tsify plugin instead of gulp-typesc
245 all Browserify with the tsify plugin instead of gulp-typescript.
253 we specified debug: true to Browserify.
254 This causes tsify to emit source maps inside th
259 # Watchify, Babel, and Uglify
261 we are bundling our code with Browserify and tsify, we can add various
261 our code with Browserify and tsify, we can add various features
261 us features to our build with browserify plugins.
261 to our build with browserify plugins.
263 * Watchify starts gulp and keeps it runn
271 ## Watchify
273 We'll start with Watchify to provide background compila
279 Now change your gulpfile to the following:
321 n('update', bundle);so that **Browserify** will run thebundle` functio
325 r default a name since both Watchify and Gulp need to call it.
347 d to install vinyl-buffer and gulp-sourcemaps to keep sourcemaps working.
347 r and gulp-sourcemaps to keep sourcemaps working.
353 Now change your gulpfile to the following:
391 ourcemaps` exist to make sure sourcemaps keep working.
392 hese calls give us a separate sourcemap file instead of using inline
392 file instead of using inline sourcemaps like before.
402 First install Babelify and the Babel preset for ES20
403 Like Uglify, Babelify mangles code, so we'll need v
403 o we'll need vinyl-buffer and gulp-sourcemaps.
404 By default Babelify will only process files with
404 ts` extension as an option to Babelify.
410 Now change your gulpfile to the following:

Typos for ASP.NET Core.md

Line Typo
8 ## Install ASP.NET Core and TypeScript
10 First, [install ASP.NET Core](https://get.asp.net) if
19 4. For VS2015, choose ASP.NET Web Application > **ASP.NET
19 ASP.NET Web Application** > ASP.NET 5 Empty, and let's uncheck
23 For VS2017, choose **ASP.NET Core Web Application (.NET Co
23 Application (.NET Core)** > ASP.NET Core 1.1 Empty instead.
62 n Dependencies > Manage NuGet Packages > Browse. Sear
97 Type the following code into app.ts.
148 ependencies"` add "gulp" and "del":
157 uld start installing gulp and del as soon as you save the file.
158 If not, right-click package.json and then Restore Packages
229 2. Look in the first localhost folder, then scripts/app.ts
229 ocalhost folder, then scripts/app.ts
235 lude basic TypeScript in your ASP.NET project.
242 Add Angular 2 and SystemJS to dependencies in `package
255 NPM3, we need to list Angular 2's peer dependencies directly as
269 ## Update tsconfig.json
272 or ES2015, since Angular uses core-js for things like Promise.
278 Our tsconfig should now look like this:
344 lib task after you save the gulpfile.
413 When you run the ASP.NET application you should see a
413 application you should see a div that says "Loading..." and th

Typos for TypeScript 3.6.md

Line Typo
53 methods present, and is also iterable.
138 In pre-ES2015 targets, the most faithful em
163 Arrays` is also available in [tslib](https://github.com/Microsoft
169 ments for when Promises are mis-handled.
193 ccess a method before await-ing or .then()-ing a Promise.
193 fore await-ing or .then()-ing a Promise.
217 ## import.meta Support in SystemJS
242 s proposal may have differing behavior from in existing versions of
242 to communicate this different behavior to provide appropriate errors
286 ppropriately capture both the callability and constructability of a cla
286 ture both the callability and constructability of a class-like function.
295 rty build tools like Gulp and Webpack.
307 omatically apply quick fixes, refactorings, and other transformations li
317 he one Node already supports (CommonJS), AMD, System.js, and more!
317 ady supports (CommonJS), AMD, System.js, and more!
330 yground is largely a fork of [Artem Tyurin](https://github.com/ag
330 d is largely a fork of [Artem Tyurin](https://github.com/agentcoop
331 We owe Artem a big thanks for helping out

Typos for TypeScript 3.5.md

Line Typo
71 Previously, a non-disciminated union wouldn't have any exc
95 ay 3rd party libraries, where globals that libraries declare can al
183 peScript 3.5 generalizes this behavior to work on constructor functi

Typos for TypeScript 3.4.md

Line Typo
143 This means that genericity from compose's arguments ha
211 ub> extends from ReadonlyArray< T1 | T2</su
270 e that strips away readonly-ness, and that would convert `read
441 y want to [use an appropriate polyfill](https://github.com/ljharb/gl

Typos for TypeScript 3.3.md

Line Typo
6 ## Improved behavior for calling union types
52 This new behavior only kicks in when at most on
115 That can mean signficantly faster builds under `--build

Typos for TypeScript 3.2.md

Line Typo
28 he last overload will ever be modeled.
68 TypeScript 3.2 also allows destructuring a rest binding from a generic
68 of the other bindings in the destructuring pattern.
80 ## BigInt
82 BigInts are part of an upcoming propo
83 3.2 brings type-checking for BigInts, as well as support for emitt
83 well as support for emitting BigInt literals when targeting `esne
85 BigInt support in TypeScript introdu
85 type called the bigint (all lowercase).
86 function or by writing out a BigInt literal by adding an n to t
145 As we mentioned, BigInt support is only available for
146 y not be obvious, but because BigInts have different behavior for m
146 ecause BigInts have different behavior for mathematical operators li
147 ed to dispatch to the correct behavior depending on the type, and so
149 no immediate plans to provide downleveling support.
150 ure, so you'll be able to use BigInts there when targeting esnext
152 Certain targets may include a polyfill or BigInt-like runtime object
152 ets may include a polyfill or BigInt-like runtime object.
179 sconfig.json` inheritance via Node.js packages

Typos for TypeScript 3.1.md

Line Typo
45 components (formerly known as SFCs).
100 ## Matching behavior
102 e matches is by using Node's [semver ranges](https://github.com/np
121 he order could have different behavior, so the above sample would no

Typos for TypeScript 3.0.md

Line Typo
10 lso introduces a new mode for tsc, the --build flag, that wor
296 we can model React's specific behavior for things like `defaultProps
319 The default-ed properties are inferred from
323 components (formerly known as SFCs) use ES2015 default initializ
340 e "lib" compiler option in tsconfig.json (e.g. use lib="es2015" and
342 ecommended. Previously these .d.ts files had to add forward/dupl

Typos for TypeScript 2.9.md

Line Typo
73 ric literals (such as numeric enum types) and unique symbols.
134 ler option to disable the new behavior.
211 This also works in JSDoc comments to refer to types fr
224 ## Relaxing declaration emit visiblity rules
273 Often in Node.js applications a .json is nee
311 tput device is applicable for colorful text.

Typos for TypeScript 2.8.md

Line Typo
333 ## IIFEs as namespace declarations
385 factory name using @jsx dom pragma.
407 React`) allowing for multiple jsx factories in one compilation.
409 ined with the per-file @jsx pragma, each file can have a differe

Typos for TypeScript 2.7.md

Line Typo
8 .7 adds support for declaring const-named properties on types including
189 ript 2.7, tuples of different arities are no longer assignable to e
190 hanks to a pull request from [Tycho Grouwstra](https://github.com
190 to a pull request from [Tycho Grouwstra](https://github.com/tycho01),
190 tuple types now encode their arity into the type of their respec
191 inct from tuples of different arities.
204 eed to resort to the original behavior in which tuples only enforce
312 or import d from "cjs" from CommonJS modules with `--esModuleInter
314 TypeScript 2.7 updates CommonJS/AMD/UMD module emit to synthe
317 Previously CommonJS/AMD/UMD modules were treated
319 t * as foo from "foo"`) for a CommonJS/AMD/UMD module as equivalent
319 ass or a function. ECMAScript spec stipulates that a namespace r
320 import d from "foo") for a CommonJS/AMD/UMD module as equivalent
320 e("foo").default`.Most of the CommonJS/AMD/UMD modules available tod
320 o import non-ES modules (i.e. CommonJS/AMD/UMD). For instance `impor
324 ) is now correctly flagged as uncallable. Calling it will result in an
325 * Default imports to CommonJS/AMD/UMD are now allowed (e.g.
327 > Note: The new behavior is added under a flag to avoi
380 --pretty now uses colors for file names, diagnostic co

Typos for TypeScript 2.6.md

Line Typo
10 your command line or in your tsconfig.json.
12 ameter positions are checked contravariantly instead of bivariantly.
12 contravariantly instead of bivariantly.
13 out [What are covariance and contravariance?](https://www.stephanboyer.co
16 >`) continue to mostly relate covariantly.
18 mple in which Animal is the supertype of Dog and Cat:
33 the type (x: T) => void is bivariant (i.e. covariant or contrav
33 s bivariant (i.e. covariant or contravariant) for T in def
33 variant_ (i.e. covariant or contravariant) for T in default type chec
33 ault type checking mode, but contravariant for T in strict function t
49 an error. Effectively, T is contravariant in Comparer<T> because it i
56 Effectively, T is bivariant in Comparer<T> because it i
70 oves type inference involving contravariant positions:
85 ferences for T originate in contravariant positions, and we therefore i
86 ere we infer the best common supertype.
90 gn better with the ECMAScript spec.
91 As per the [ECMAScript spec](https://tc39.github.io/ecma2
135 TypeScript 2.6 npm package ships with localized
205 ## Suppress errors in .ts files using '// @ts-ignore' c
205 rrors in .ts files using '// @ts-ignore' comments
207 upport suppressing errors in .js files using // @ts-ignore c
230 e enhancements to watching in tsserver.

Typos for TypeScript 2.5.md

Line Typo
8 Thanks to work done by [@tinganho](https://github.com/tinganho)
32 ## Deduplicated and redirected packages
42 ksflag, which parallels the **behavior** of &#91;the--preserve-symlinks`
42 --preserve-symlinks flag in Node.js](https://nodejs.org/api/cli.h
43 ag also exhibits the opposite behavior to Webpack's `resolve.symlink
43 bits the opposite behavior to Webpack's resolve.symlinks option (i.
43 totrueparallels setting **Webpack's**resolve.symlinkstofalse`
46 to [the documentation on the Node.js website](https://nodejs.org/a

Typos for TypeScript 2.4.md

Line Typo
21 Many bundlers have support for automaticall
23 ## String Enums
25 TypeScript 2.4 now allows enum members to contain string ini
35 at is that string-initialized enums can't be reverse-mapped to ge
35 se-mapped to get the original enum member name.
102 ## Strict contravariance for callback parameters
104 ways compared parameters in a bivariant way.
125 e parameters are checked in a contravariant manner with respect to the cu

Typos for TypeScript 2.3.md

Line Typo
23 orts iteration is said to be "iterable" if it has a `Symbol.iterator
25 perator and the array rest in destructuring assignmnets.
25 e array rest in destructuring assignmnets.
30 lly delegate calls to another iterable through yield *. For exampl
46 uses new type check and emit behavior that attempts to call a `[Sym
50 for..of statements, Array Destructuring, and Spread elements in Array
52 ## Async Iteration
54 ript 2.3 adds support for the async iterators and generators as d
56 ##### Async iterators
58 The Async Iteration introduces an `Asyn
71 An object that supports async iteration is said to be "iter
71 sync iteration is said to be "iterable" if it has a `Symbol.asyncIte
73 ##### Async Generators
75 The [Async Iteration proposal](https://g
75 -async-iteration) introduces "Async Generators", which are async
75 "Async Generators", which are async functions that also can be us
76 Async Generators can also delegate
76 lls via yield* to either an iterable or async iterable:
76 ld*` to either an iterable or async iterable:
76 o either an iterable or async iterable:
90 As with Generators, Async Generators can only be functi
91 Arrow functions cannot be Async Generators. Async Generators
91 s cannot be Async Generators. Async Generators require a valid, g
91 entation (either native or an ES2015-compatible polyfill), in addition to a v
91 ative or an ES2015-compatible polyfill), in addition to a valid `Sym
95 a means of iterating over an iterable.
96 Similarly, the Async Iteration proposal introduces
96 statement to iterate over an async iterable:
96 ment to iterate over an async iterable:
106 ement is only legal within an Async Function or Async Generator.
106 l within an Async Function or Async Generator.
110 in mind that our support for async iterators relies on support f
110 t at runtime. You may need to polyfill Symbol.asyncIterator, which
174 Just un-comment the configuration you like to
174 ike to set to get the desired behavior; we hope the new output simpl
176 ## Errors in .js files with --checkJs
178 oes not report any errors in .js files including using `--allo
185 JSDoc comments can be used to add s
185 to your JavaScript code, see [JSDoc Support documentation](https:
185 e details about the supported JSDoc constructs.

Typos for TypeScript 2.2.md

Line Typo
8 pport for the ECMAScript 2015 mixin class pattern (see [MDN Mixin
8 mixin class pattern (see [MDN Mixin description](https://develope
8 /Classes#Mix-ins) and ["Real" Mixins with JavaScript Classes](http
8 s well as rules for combining mixin construct signatures with reg
12 A mixin constructor type refers to
12 w (...args: any[]) => X` is a mixin constructor type with an inst
14 A mixin class is a class declaratio
14 The following rules apply to mixin class declarations:
16 sion must be constrained to a mixin constructor type.
17 * The constructor of a mixin class (if any) must have a si
19 T with a constraint X, a mixin class `class C extends Base {
20 In other words, a mixin class is represented as an in
20 s an intersection between the mixin class constructor type and th
22 tersection type that contains mixin constructor types, the mixin
22 mixin constructor types, the mixin construct signatures are disc
62 Mixin classes can constrain the typ
103 is inheriting from Error in NodeJS v4 and higher.
103 riting from Error in NodeJS v4 and higher.
156 +, -, ~, ++, or -- unary operator is nullable.
184 Please see [facebook/jsx#57](https://github.com/fa
184 Please see [facebook/jsx#57](https://github.com/facebook/

Typos for TypeScript 2.1.md

Line Typo
148 cript 2.1 brings support for [ESnext Spread and Rest](https://gith
173 that don't get picked up when destructuring an element:
181 ## Downlevel Async Functions
181 ## Downlevel Async Functions
187 hat might involve grabbing [a polyfill](https://github.com/stefanpen
192 ##### tsconfig.json
202 ##### dramaticWelcome.ts
225 should result in the correct behavior on an ES3/ES5 engine.
229 elements, and __awaiter for async functions.
293 the compiler not to transform ES2016-specific features, e.g. ** operator.
295 the compiler not to transform ES2017-specific features like async/await
387 or false and the containing enum for enum literal types.
387 ` and the containing enum for enum literal types.
406 iteral type is inferred for a const location without a type annot
460 change entails a break in the behavior of extending built-in classes
471 en by those in the inheriting config file.
473 exclude from the inheriting config file overwrite those from t
473 verwrite* those from the base config file.

Typos for TypeScript 2.0.md

Line Typo
383 roperty declared with a get accessor and no set accessor is cons
383 a get accessor and no set accessor is considered read-only.
384 * In the type of an enum object, enum members are cons
384 n the type of an enum object, enum members are considered read-o
516 dule resolution enhancements: BaseUrl, Path mapping, rootDirs and t
516 ments: BaseUrl, Path mapping, rootDirs and tracing
518 additional module resolution knops to inform the compiler wher
545 e not directly located under baseUrl.
546 es to files at run-time, see [RequireJs documentation](http://require
546 s/api.html#config-paths) and [SystemJS documentation](https://github
569 Using 'rootDirs', you can inform the compiler
617 ##### declarations.d.ts
632 /master/LoaderPlugins.md) or [SystemJS](https://github.com/systemjs/
660 useful when migrating from an un-typed code base.
686 ##### math-lib.d.ts
686 ##### math-lib.d.ts
816 * dom
817 * webworker
818 * es5
819 * es6 / es2015
819 * es6 / es2015
820 * es2015.core
821 * es2015.collection
822 * es2015.iterable
823 * es2015.promise
824 * es2015.proxy
825 * es2015.reflect
826 * es2015.generator
827 * es2015.symbol
828 * es2015.symbol.wellknown
829 * es2016
830 * es2016.array.include
831 * es2017
832 * es2017.object
833 * es2017.sharedmemory
834 * scripthost
852 cals` flags any unused local (un-exported) declaration like variables,
882 bundling/loading tools like [SystemJS](https://github.com/systemjs/
886 ## Support 'target : es5' with 'module: es6'
886 'target : es5' with 'module: es6'
888 n, target: es5 and 'module: es6' is now supported.
889 This should facilitate using ES2015-based tree shakers like [rollup](ht
889 2015-based tree shakers like [rollup](https://github.com/rollup/ro
894 s is an implementation for a [Stage-3 ECMAScript proposal](https://

Typos for TypeScript 1.8.md

Line Typo
102 ### Case clause fall-throughs
150 be use the [latest version of react.d.ts](https://github.com/Definitel
154 .8 with the latest version of react.d.ts (see above), we've also great
347 Support for default import interop with SystemJS
347 default import interop with SystemJS
349 Module loaders like SystemJS wrap CommonJS modules and exp
349 le loaders like SystemJS wrap CommonJS modules and expose then as a
349 definition files between the SystemJS and CommonJS implementation o
349 iles between the SystemJS and CommonJS implementation of the module
351 ot indicated in the imported .ts or .d.ts. The compiler will i
351 cated in the imported .ts or .d.ts. The compiler will infer the e
414 rict mode as per ES6, but for non-ES6 targets this was not respecte
459 When used in a type narowing position (e.g. if statement
493 ## Official TypeScript NuGet package
495 with TypeScript 1.8, official NuGet packages are available for th
495 er (tsc.exe) as well as the MSBuild integration (`Microsoft.TypeS
499 * [Microsoft.TypeScript.Compiler](https://www.nuget.org/packag
500 * [Microsoft.TypeScript.MSBuild](https://www.nuget.org/packag
502 Also, a nightly NuGet package to match the [nightly
502 package to match the [nightly npm package](http://blogs.msdn.co
502 htlies.aspx) is available on [myget](https://myget.org):
509 Colors can help discern where a mess
511 option, TypeScript gives more colorful output with context about whe
515 ## Colorization of JSX code in VS 2015
517 X tags are now classified and colorized in Visual Studio 2015.
521 ized by changing the font and color settings for the VB XML col
521 lor settings for the VB XML color and font settings through `To
527 ht want to target ES2015 with CommonJS modules for Node 5, but ES5 w
528 one without having to perform hacky workarounds like placing `tsc
530 The old behavior still remains the same if giv
532 ## Allow comments in tsconfig.json
552 ## Support output to IPC-driven files
564 t into a pretty printer like [pretty-js](https://www.npmjs.com/packag
573 This includes ASP.NET v4 projects, *Console Applica
573 This includes ASP.NET v4 projects, *Console Applicatio

Typos for TypeScript 1.7.md

Line Typo
6 support in ES6 targets (Node v4+)
8 for ES6 generators, e.g. Node v4 and above.
14 nted out one at a time with a 400ms delay:
39 For more information see [Async Functions](http://blogs.msdn.
44 features you want in specific runtimes.
143 in describing libraries (e.g. Ember.js) that use mixin-style pattern
143 ries (e.g. Ember.js) that use mixin-style patterns to describe inherita
174 ## Improved checking for destructuring object literal
176 eScript 1.7 makes checking of destructuring patterns with an object liter
214 TypeScript 1.7 removes the ES5-specific use of reduceRight from the

Typos for TypeScript 1.6.md

Line Typo
27 To use JSX-support with React you should use the
27 act you should use the [React typings](https://github.com/borisyank
27 ped/tree/master/react). These typings define the JSX namespace so
46 #### Using other JSX framworks
115 Local class, interface, enum, and type alias declarations
331 Async functions are expected to inv
332 plished through the use of an ES6-compatible Promise implementation, and
334 An async function is a function or me
334 await` should be treated as a unary expression instead of an iden
335 An Async Function must provide a retu
376 module names when targeting 'commonjs'.
378 include information about its typings and TypeScript compiler will
423 exclude property support in tsconfig.json
425 A tsconfig.json file that doesn't specify a f
425 e implicitly references all *.ts files in all subdirectories)
426 lative to the location of the tsconfig.json file.
442 xclude` list does not support wilcards. It must simply be a list of
447 to be stored in your initial tsconfig.json on creation.

Typos for TypeScript 1.5.md

Line Typo
84 e see the [ES6 module support spec](https://github.com/Microsoft
86 ## Destructuring in declarations and assignmen
88 cript 1.5 adds support to ES6 destructuring declarations and assignments.
92 A destructuring declaration introduces one or
100 Destructuring declarations also works for e
106 Similarly, destructuring can be used in function para
120 Destructuring patterns can also be used in
121 es can be written as a single destructuring assignment:
157 #### Const
217 augment the descriptor to be writable: false and enumerable: false.
252 a variable to hold on to the neighbor-map so that we can initialize it.
271 > tsc --module umd
271 > tsc --module umd
275 > tsc --module system
277 ## Unicode codepoint escapes in strings
279 users to represent a Unicode codepoint using just a single escape.
283 that you'd have to escape the codepoint as "\uD842\uDFB7".
286 With ES6’s codepoint escapes, you can cleanly repr
292 e considerable work done by [@ivogabe](https://github.com/ivogabe),
318 informs the compiler about a non-TS module dependency that needs
321 ssing an optional name for an amd-dependency:
340 The tsconfig.json file specifies the root files
342 * By invoking tsc with no input files, in which
342 the compiler searches for the tsconfig.json file starting in the current
343 * By invoking tsc with no input files and a -pr
343 h of a directory containing a tsconfig.json file.
357 See the [tsconfig.json wiki page](https://github.com
372 The TypeSript compiler emits a few helpers
374 lace, or override the default behavior, use --noEmitHelpers to ins
379 e flag allows overriding this behavior and specifying the new line c

Typos for TypeScript 1.4.md

Line Typo
10 unning a program that takes a commandline as either a string, a `stri
63 u can now specify the desired behavior at both the function declarat
131 When compiling to pre-ES6 targets, the string is decomp
193 nst enum` (completely inlined enums)
195 Enums are very useful, but some pro
195 ply inlining all instances of enum members with their numeric eq
208 eScript will also now compute enum values when possible:
221 ## -noEmitOnError commandline option
223 The default behavior for the TypeScript compiler i
223 pt compiler is to still emit .js files if there were type erro
223 s the compiler from emitting .js code if there were any errors
225 This is now the default for MSBuild projects; this allows MSBuild
225 MSBuild projects; this allows MSBuild incremental build to work as
229 the resulting modules like a bundlers (e.g. r.js).

Typos for TypeScript 1.1.md

Line Typo
8 compiler is typically around 4x faster than any previous rele

Typos for Overview.md

Line Typo
57 methods present, and is also iterable.
142 In pre-ES2015 targets, the most faithful em
167 Arrays` is also available in [tslib](https://github.com/Microsoft
173 ments for when Promises are mis-handled.
197 ccess a method before await-ing or .then()-ing a Promise.
197 fore await-ing or .then()-ing a Promise.
221 ## import.meta Support in SystemJS
246 s proposal may have differing behavior from in existing versions of
246 to communicate this different behavior to provide appropriate errors
290 ppropriately capture both the callability and constructability of a cla
290 ture both the callability and constructability of a class-like function.
299 rty build tools like Gulp and Webpack.
311 omatically apply quick fixes, refactorings, and other transformations li
321 he one Node already supports (CommonJS), AMD, System.js, and more!
321 ady supports (CommonJS), AMD, System.js, and more!
332 yground is largely a fork of [Artem Tyurin](https://github.com/ag
332 d is largely a fork of [Artem Tyurin](https://github.com/agentcoop
333 We owe Artem a big thanks for helping out
414 Previously, a non-disciminated union wouldn't have any exc
438 ay 3rd party libraries, where globals that libraries declare can al
526 peScript 3.5 generalizes this behavior to work on constructor functi
717 This means that genericity from compose's arguments ha
844 e that strips away readonly-ness, and that would convert `read
1015 y want to [use an appropriate polyfill](https://github.com/ljharb/gl
1021 ## Improved behavior for calling union types
1067 This new behavior only kicks in when at most on
1130 That can mean signficantly faster builds under `--build
1158 he last overload will ever be modeled.
1198 TypeScript 3.2 also allows destructuring a rest binding from a generic
1198 of the other bindings in the destructuring pattern.
1210 ## BigInt
1212 BigInts are part of an upcoming propo
1213 3.2 brings type-checking for BigInts, as well as support for emitt
1213 well as support for emitting BigInt literals when targeting `esne
1215 BigInt support in TypeScript introdu
1215 type called the bigint (all lowercase).
1216 function or by writing out a BigInt literal by adding an n to t
1275 As we mentioned, BigInt support is only available for
1276 y not be obvious, but because BigInts have different behavior for m
1276 ecause BigInts have different behavior for mathematical operators li
1277 ed to dispatch to the correct behavior depending on the type, and so
1279 no immediate plans to provide downleveling support.
1280 ure, so you'll be able to use BigInts there when targeting esnext
1282 Certain targets may include a polyfill or BigInt-like runtime object
1282 ets may include a polyfill or BigInt-like runtime object.
1309 sconfig.json` inheritance via Node.js packages
1379 arations and const-declared functons, simply by assigning to prope
1398 Additionaly, this approach for property d
1398 tateless function components (SFCs).
1426 ypeScript features while also accomodating users on the older versions a
1427 alled typesVersions to help accomodate these scenarios.
1453 ### Matching behavior
1455 e matches is by using Node's [semver ranges](https://github.com/np
1474 he order could have different behavior, so the above sample would no
1775 we can model React's specific behavior for things like `defaultProps
1798 The default-ed properties are inferred from
1802 tateless function components (SFCs) use ES2015 default initializ
1802 2015 default initializers for SFCs:
1819 e "lib" compiler option in tsconfig.json (e.g. use lib="es2015" and
1821 ecommended. Previously these .d.ts files had to add forward/dupl
1902 ric literals (such as numeric enum types) and unique symbols.
1962 ler option to disable the new behavior.
2039 This also works in JSDoc comments to refer to types fr
2052 ## Relaxing declaration emit visiblity rules
2101 Often in Node.js applications a .json is nee
2139 tput device is applicable for colorful text.
2480 ### IIFEs as namespace declarations
2532 factory name using @jsx dom paragma.
2554 React`) allowing for multiple jsx factories in one compilation.
2556 ined with the per-file @jsx pragma, each file can have a differe
2566 .7 adds support for declaring const-named properties on types including
2747 ript 2.7, tuples of different arities are no longer assignable to e
2748 hanks to a pull request from [Tycho Grouwstra](https://github.com
2748 to a pull request from [Tycho Grouwstra](https://github.com/tycho01),
2748 tuple types now encode their arity into the type of their respec
2749 inct from tuples of different arities.
2762 eed to resort to the original behavior in which tuples only enforce
2870 or import d from "cjs" form CommonJS modules with `--esModuleInter
2872 TypeScript 2.7 updates CommonJS/AMD/UMD module emit to synthe
2875 Previously CommonJS/AMD/UMD modules were treated
2877 t * as foo from "foo"`) for a CommonJS/AMD/UMD module as equivalent
2879 ECMAScript spec stipulates that a namespace r
2881 import d from "foo") for a CommonJS/AMD/UMD module as equivalent
2882 Most of the CommonJS/AMD/UMD modules available tod
2882 o import non-ES modules (i.e. CommonJS/AMD/UMD). For instance `impor
2885 ) is now correctly flagged as uncallabale. Calling it will result in an
2886 * Default imports to CommonJS/AMD/UMD are now allowed (e.g.
2888 > Note: The new behavior is added under a flag to avoi
2941 --pretty now uses colors for file names, diagnostic co
2951 your command line or in your tsconfig.json.
2953 ameter positions are checked contravariantly instead of bivariantly.
2953 contravariantly instead of bivariantly.
2954 out [What are covariance and contravariance?](https://www.stephanboyer.co
2957 >`) continue to mostly relate covariantly.
2959 mple in which Animal is the supertype of Dog and Cat:
2974 the type (x: T) => void is bivariant (i.e. covariant or contrav
2974 s bivariant (i.e. covariant or contravariant) for T in def
2974 variant_ (i.e. covariant or contravariant) for T in default type chec
2974 ault type checking mode, but contravariant for T in strict function t
2990 an error. Effectively, T is contravariant in Comparer<T> because it i
2997 Effectively, T is bivariant in Comparer<T> because it i
3011 oves type inference involving contravariant positions:
3026 ferences for T originate in contravariant positions, and we therefore i
3027 ere we infer the best common supertype.
3068 gn better with the ECMAScript spec.
3069 As per the [ECMAScript spec](https://tc39.github.io/ecma2
3113 TypeScript 2.6 npm package ships with localized
3183 ## Suppress errors in .ts files using '// @ts-ignore' c
3183 rrors in .ts files using '// @ts-ignore' comments
3185 upport suppressing errors in .js files using // @ts-ignore c
3208 e enhancements to watching in tsserver.
3247 Thanks to work done by [@tinganho](https://github.com/tinganho)
3271 ## Deduplicated and redirected packages
3281 ksflag, which parallels the **behavior** of &#91;the--preserve-symlinks`
3281 --preserve-symlinks flag in Node.js](https://nodejs.org/api/cli.h
3282 ag also exhibits the opposite behavior to Webpack's `resolve.symlink
3282 bits the opposite behavior to Webpack's resolve.symlinks option (i.
3282 totrueparallels setting **Webpack's**resolve.symlinkstofalse`
3285 to [the documentation on the Node.js website](https://nodejs.org/a
3304 Many bundlers have support for automaticall
3306 ## String Enums
3308 TypeScript 2.4 now allows enum members to contain string ini
3318 at is that string-initialized enums can't be reverse-mapped to ge
3318 se-mapped to get the original enum member name.
3386 ## Strict contravariance for callback parameters
3388 ways compared parameters in a bivariant way.
3409 e parameters are checked in a contravariant manner with respect to the cu
3472 orts iteration is said to be "iterable" if it has a `Symbol.iterator
3474 perator and the array rest in destructuring assignmnets.
3474 e array rest in destructuring assignmnets.
3479 lly delegate calls to another iterable through yield *. For exampl
3495 uses new type check and emit behavior that attempts to call a `[Sym
3499 for..of statements, Array Destructuring, and Spread elements in Array
3502 ## Async Iteration
3504 ript 2.3 adds support for the async iterators and generators as d
3507 #### Async iterators
3509 The Async Iteration introduces an `Asyn
3521 An object that supports async iteration is said to be "iter
3521 sync iteration is said to be "iterable" if it has a `Symbol.asyncIte
3524 #### Async Generators
3526 The [Async Iteration proposal](https://g
3526 -async-iteration) introduces "Async Generators", which are async
3526 "Async Generators", which are async functions that also can be us
3526 partial computation results. Async Generators can also delegate
3526 lls via yield* to either an iterable or async iterable:
3526 ld*` to either an iterable or async iterable:
3526 o either an iterable or async iterable:
3540 As with Generators, Async Generators can only be functi
3540 ls. Arrow functions cannot be Async Generators. Async Generators
3540 s cannot be Async Generators. Async Generators require a valid, g
3540 entation (either native or an ES2015-compatible polyfill), in addition to a v
3540 ative or an ES2015-compatible polyfill), in addition to a valid `Sym
3544 a means of iterating over an iterable.
3545 Similarly, the Async Iteration proposal introduces
3545 statement to iterate over an async iterable:
3545 ment to iterate over an async iterable:
3555 ement is only legal within an Async Function or Async Generator.
3555 l within an Async Function or Async Generator.
3559 in mind that our support for async iterators relies on support f
3560 You may need to polyfill Symbol.asyncIterator, which
3617 criptions commented out. Just un-comment the configuration you like to
3617 ike to set to get the desired behavior; we hope the new output simpl
3619 ## Errors in .js files with --checkJs
3621 oes not report any errors in .js files including using `--allo
3625 ged as errors in .js files. JSDoc comments can be used to add s
3625 to your JavaScript code, see [JSDoc Support documentation](https:
3625 e details about the supported JSDoc constructs.
3633 pport for the ECMAScript 2015 mixin class pattern (see [MDN Mixin
3633 mixin class pattern (see [MDN Mixin description](https://develope
3633 /Classes#Mix-ins) and ["Real" Mixins with JavaScript Classes](http
3633 s well as rules for combining mixin construct signatures with reg
3637 - A mixin constructor type refers to
3637 w (...args: any[]) => X` is a mixin constructor type with an inst
3639 - A mixin class is a class declaratio
3639 The following rules apply to mixin class declarations:
3641 sion must be constrained to a mixin constructor type.
3642 * The constructor of a mixin class (if any) must have a si
3644 T with a constraint X, a mixin class `class C extends Base {
3644 eof C & T`. In other words, a mixin class is represented as an in
3644 s an intersection between the mixin class constructor type and th
3646 tersection type that contains mixin constructor types, the mixin
3646 mixin constructor types, the mixin construct signatures are disc
3685 Mixin classes can constrain the typ
3722 is inheriting from Error in NodeJS v4 and higher.
3722 riting from Error in NodeJS v4 and higher.
3774 +, -, ~, ++, or -- unary operator is nullable.
3799 element children. Please see [facebook/jsx#57](https://github.com/fa
3799 hildren. Please see [facebook/jsx#57](https://github.com/facebook/
3904 with Mapped types, **PartialPerson can be written as a generalized transformation on the type Person as:**
4007 libflag to something like"dom", "es2015"or"dom", "es201
4007 ag to something like "dom", "**es2015**" or `"dom", "es2015.promise"
4007 g like "dom", "es2015" or "**dom**", "es2015.promise", "es5"
4007 "dom", "es2015" or "dom", "**es2015.promise**", "es5"
4007 or "dom", "es2015.promise", "**es5**"
4046 or external helpers library (**tslib)**
4048 of helper functions such as **__extends for inheritance,** __assign for spread operato
4097 re module "foo" { ... }ornode_modules/@types/foo`) still
4097 module "foo" { ... }ornode**_**modules/@types/foo`) still tak
4097 dule "foo" { ... }ornode_modules/@types/foo`) still takes
4097 le "foo" { ... }ornode_modules/@types/foo`) still takes p
4097 .. }ornode_modules/@types/foo`) still takes priority if it exists.
4108 ## Support for --target **ES2016, --ta**rget ES2017 and `--target ESN
4108 --target ES2016, --target **ES2017 and -**-target ESNext
4108 -target ES2017and--target ESNext`
4110 e new target values --target **ES2016, --ta**rget ES2017 and `--target ESN
4110 --target ES2016, --target **ES2017 and -**-target ESNext.
4110 -target ES2017and--target ESNext`.
4114 Similarly, --target **ES2017 will instruct th**e compiler not to transform ES
4116 --target **ESNext targets latest support**ed [ES proposed features](http
4158 considered an implicit any&#91;]** vari**able.
4159 However, each subsequent x.push(value)
4159 x.unshift(value) or x&#91;n] = **value operation evolves** the type of the variable in a
4201 boolean literal types (e.g. "**abc**", 1, and true) were prev
4201 literal types (e.g. "abc", **1, and true) were previously inferred only in the presence of an explicit type annotation.**
4202 Starting with TypeScript 2.1, literal types are always inferred for const variables and readonly properties.
4204 red for a const variable or readonly property without a type annotation is the type of the literal initi
4204 without a type annotation is the type of the literal initializer.
4336 2. Writes "use strict";** directive atop every generated file.**
4356 So, whereas T and `T
4356 checking mode, and only `T
4356 e relationship of T to `T
4436 the ==, !=, ===, or !==** operator to **compare to null or `undefine
4436 orundefined, as in x != **null** or x === undefined`.
4436 , as in x != null or x === **undefined.**
4437 effects on subject variable types accurately reflect JavaScript semantics (e.g. doub
4477 The && operator adds **null and/or **undefined to the type of the
4477 operator adds null and/or u**ndefined to the type of the right operand **depending on which are present
4502 pecifically, the operation x!** produces a v**alue of the type of x with `
4503 e assertions of the forms <T>**x** and x as T, the ! non-nul
4503 ms <T>x and x as T, the !** non-null as**sertion operator is simply rem
4520 l other types), and the ! non-null assertion expression operator is permitted but has no effect in regular type checking
4631 xpression of the form x.p == **v, **x.p === v, x.p != v, or `x
4631 the form x.p == v, x.p === **v, **x.p != v, or x.p !== v, wh
4631 p == v, x.p === v, x.p != **v, **or x.p !== v, where p` and
4631 = v, x.p != v, or x.p !== v, where pandv` are a property and an expression of a string literal type or a union of string literal types.
4762 ## Specifying the type of **this for functions**
4788 this: **void means that addClickListener expects onclick to be a f**unction that does not require
4788 expectsonclickto be a fu**ncti**on that does not require ath
4842 tensions are included (e.g. .**ts, .tsx, and .d.ts **by default with .js and `.js
4844 o including all TypeScript (.**ts, .d.ts** and .tsx) files in the con
4844 clude" property. JS files (.jsand.jsx) are also included if allow
4847 rectory specified using the "**outDir**" compiler option are always
4851 ty defaults to excluding the **node_modules, bower_components, and jspm_packages **directories when not specified
4874 Now imports to "**moduleA**" would be looked up in `./mo
4874 ld be looked up in ./modules/**moduleA**
4885 using "paths" property in **tsconfig.json** files.
4889 ance, an import to a module "**jquery**" would be translated at runt
4889 be translated at runtime to `"node_modules/jquery/dist/jquery.slim.min.j
4889 at runtime to "node_modules/**jquery**/dist/jquery.slim.min.js".
4889 time to "node_modules/jquery/**dist**/jquery.slim.min.js".
4889 to "node_modules/jquery/dist/**jquery.slim.min.js**".
4904 ### Virtual Directories with **rootDirs**
4904 al Directories with rootDirs****
4928 "**rootDirs**" specify a list of roots w
4929 o following our example, the **tsconfig.json** file should look like:
4929 example, the tsconfig.json file should look like:
4988 gs that match "*!text" or "**json**!*".
4997 es can be easily declared as **any.**
5064 ty above is of type `number
5064 is of type `(() => number)
5145 were only limited to target: **ES6.**
5147 s today), just include --lib **es2015.collection**,es2015.promise.
5147 lude --lib es2015.collection,**es2015.promise**.
5148 n a node project using --lib **es5**,es6.
5148 node project using --lib es5,**es6.**
5156 * es2015.core
5218 n import as import d from "./**moduleA.js**", the compiler looked up the
5218 looked up the definition of "**moduleA.js**" in ./moduleA.js.ts or `./
5218 ition of "moduleA.js" in ./**moduleA.js.ts** or ./moduleA.js.d.ts.
5218 leA.js"in./moduleA.js.ts**or./moduleA.j**s.d.ts`.
5221 will look up definition of "**moduleA.js**" in ./moduleA.ts or `./mo
5221 tion of "moduleA.js" in ./**moduleA.ts** or ./moduleA.d.ts.
5221 duleA.js"in ./moduleA.ts**or./moduleA.d.ts**`.
5225 id flag combination, target: **es5 and 'module: es6' is now s**upported.
5225 5` and 'module: es6' is now supported.
5225 'module: es6' is now supported.
5434 re ref and key or extend **React.Props**
5443 f the form declare global { }**.**
5488 from modules using a declare **global declarations:**
5549 ring
5549 reduce the types to string&#91;]** and **T, thus inferring string[]
5549 T, thus inferring string&#91;]** for T.**
5583 in conjunction with --module **amd or --**module system will concatenat
5583 h --module amd or --module **system will concatenate all modules in the compilation into a single output file containin**g multiple module closures.
5583 single output file containing multiple module closures.
5583 output file containing multiple module closures.
5583 e containing multiple module closures.
5583 ining multiple module closures**.**
5585 A module name will be computed for each module
5585 A module name will** be** computed for each module base
5686 emitted with a "use strict";** prol**ogue
5686 with a "use strict"; prologue
5688 Modules were always parsed in** strict **mode as per ES6, but for non-E
5688 ere always parsed in strict mode as per ES6, but for non-ES6 targets this was not respecte
5702 factory Name>along with--jsx react` allows for using a dif
5702 tory Name>along with--jsx **reactallows for using a different JSX** factory from the defaultRea
5732 this is **T is now valid return type annotation for methods in classes and interf**aces.
5732 ethods in classes and interfaces.
5795 nd color settings for the VB **XML color and font settings th**rough Tools->Options->`Env
5795 s->Environment->Fonts and Colors` page.
5797 ## The --project (**-p) flag can now take **any file path
5797 ct (-p`) flag can now take any file path
5799 The --project command line option originally could on
5799 The --project command line option originally could only take paths to a folder containing a tsconfig.json.
5898 ## Support for --target **ES6 with --module**
5948 A user could express 2 * 5 + **1 as**
6009 ation-operator): ** and **=**. The operators will be transformed in the output to ES3/ES5 using Math.pow.**
6121 eas an intersection type A & **B represents an entity that is both of type A and type B.**
6456 annotation of the form x is **T, where x is a declared p**arameter in the signature, and
6490 Run tsc --**init in a direct**ory to create an initial `tsco
6490 Run tsc --init in a director**y to create an initial **tsconfig.json in this directo
6532 export *** can be used to** re-export all exports of anot
6532 export * can be used to re**-export all ex**ports of another module. This
6532 be used to re-export all expor**ts of another **module. This is useful for cre
6532 ort all exports of another module. This is useful for creating modules that aggregate the exports of several o
6532 ating modules that aggregate the exports of several other modules.
6756 to escape the codepoint as "\**uD842**\uDFB7". This has the major d
6756 ape the codepoint as "\uD842\**uDFB7**". This has the major downsid
6758 ings with a single escape: "\**u**{20bb7}". TypeScript will emi
6758 gs with a single escape: "\u{**20bb7**}". TypeScript will emit the
6758 t the string in ES3/ES5 as "\**uD842**\uDFB7".
6758 string in ES3/ES5 as "\uD842\**uDFB7**".
6788 /// <**amd-dependency** path="x" /> informs the comp
6790 The new amd-dependency **name property allows passing **an optional name for an amd-de
6790 me` property allows passing an** optional name for an **amd-dependency:
6790 sing an optional name for an amd-dependency:
6790 optional name for an amd-dependency:
6792 ```ts
6793 /// <amd-dependency path="legacy/moduleA" name=
6793 /// <amd-dependency path="legacy/moduleA" name="moduleA
6793 ///
6793 <amd-dependency path="legacy/moduleA" name="moduleA"/>
6793 y path="legacy/moduleA" name="moduleA"/>
6842 n Windows based systems and \**n on *nix based systems. --newLine command line flag a**llows overriding this behavior
6842 -newLine` command line flag allows overriding this behavior and speci
6842 ommand line flag allows overriding this behavior and specifying the new line character t
6854 either a string, a string&#91;]** or a function that returns **a string. You can now write:
6952 eting ECMAScript 6 (--target **ES6).**
6962 eting ECMAScript 6 (--target **ES6).**
7035 ## const **enum (co**mpletely inlined enums)
7036 c equivalents. The new const **enum declaration works just like a regular enu**m for type safety, but erases
7036 orks just like a regular enum** for type s**afety, but erases completely a
7072 The new amd-module **name tag allows passing an optional module name to the compiler**:

Typos for Templates.md

Line Typo
6 * [global-modifying-module.d.ts](./templates/global-modifying
7 * [global-plugin.d.ts](./templates/global-plug
7 * [global-plugin.d.ts](./templates/global-plugin.d.
8 * [global.d.ts](./templates/global.d.ts.md)
9 * [module-class.d.ts](./templates/module-class.d.t
10 * [module-function.d.ts](./templates/module-function.
11 * [module-plugin.d.ts](./templates/module-plug
11 * [module-plugin.d.ts](./templates/module-plugin.d.
12 * [module.d.ts](./templates/module.d.ts.md)

Typos for Publishing.md

Line Typo
6 , it is time to publish it to npm.
7 ish your declaration files to npm:
9 1. bundling with your npm package, or
10 ps://www.npmjs.com/~types) on npm.
12 pt then the first approach is favored.
18 ncluding declarations in your npm package
40 l dependencies are managed by npm.
42 authored a package that used Browserify and TypeScript.
60 ts declaration files with its npm packages, so we needed to dep
93 * Do depend on the npm type declaration package if i
97 published automatically from [DefinitelyTyped](https://github.com/Definitel

Typos for Library Structures.md

Line Typo
29 r example, if you were using [jQuery](https://jquery.com/), the `$
73 * CommonJS/Node.js-style imports of the
73 * CommonJS/Node.js-style imports of the form `va
90 mple, express only works in Node.js and must be loaded using the
90 and must be loaded using the CommonJS require function.
92 2015, ECMAScript 6, and ES6), CommonJS, and RequireJS have similar n
92 pt 6, and ES6), CommonJS, and RequireJS have similar notions of *impo
93 In JavaScript CommonJS (Node.js), for example, you w
93 In JavaScript CommonJS (Node.js), for example, you would writ
135 Many popular Node.js libraries are in the module f
140 y popular libraries, such as [Moment.js](http://momentjs.com/), are w
141 For example, in Node.js or using RequireJS, you would
141 example, in Node.js or using RequireJS, you would write:
173 often demonstrate a "Using in Node.js" example showing require,
179 Examples include [jQuery](https://jquery.com/), [Momen
179 Query](https://jquery.com/), [Moment.js](http://momentjs.com/), [loda
179 t.js](http://momentjs.com/), [lodash](https://lodash.com/), and ma
208 ## Module Plugin or UMD Plugin
208 ## Module Plugin or UMD Plugin
210 A module plugin changes the shape of another
211 For example, in Moment.js, moment-range adds a new `r
219 ## Global Plugin
221 A global plugin is global code that changes
226 ### Identifying global plugins
228 Global plugins are generally easy to identif
256 al, they're similar to global plugins, but need a require call to
333 low is to only declare types namespaced by whatever global variable
351 # The Impact of ES6 on Module Plugins
353 Some plugins add or modify top-level expor
354 While this is legal in CommonJS and other loaders, ES6 module

Typos for Introduction.md

Line Typo
31 The [Do's and Don'ts](./Do's%20and%20Don'ts.md) se
48 ## Publish to npm
50 your declaration files to an npm package, and shows how to man

Typos for Do's and Don'ts.md

Line Typo
94 that differ only on callback arity:
102 le overload using the maximum arity:

Typos for Deep Dive.md

Line Typo
29 * An enum declaration (`enum E { A, B,
66 ful aspects of this combining behavior.
74 Enum declarations behave similarly
106 s a very good opportunity for destructuring in the consuming code:
181 We could also add a namespaced type to a class:
197 hows all sorts of interesting behavior:

Typos for Consumption.md

Line Typo
11 requires no tools apart from npm.
13 clarations for a library like lodash takes nothing more than the f
19 t is worth noting that if the npm package already includes its
23 m there you’ll be able to use lodash in your TypeScript code with
42 to find the package for your favorite library.
45 > Please see the DefinitelyTyped [contribution guidelines page

Typos for By Example.md

Line Typo
127 > 3 - color: Optional string, e.g. '#ff00
127 olor: Optional string, e.g. '#ff00ff'
186 > You can provide LogOptions to .log(...) and alert opti

Typos for Variable Declarations.md

Line Typo
9 to avoid some of the common "gotchas" that users run into in JavaS
146 intimately familiar with this behavior, but if you're surprised, you
365 ns have drastically different behavior when declared as part of a lo
440 # Destructuring
442 eature that TypeScript has is destructuring.
446 ## Array destructuring
448 The simplest form of destructuring is array destructuring assign
448 orm of destructuring is array destructuring assignment:
465 Destructuring works with already-declared v
505 ## Tuple destructuring
507 Tuples may be destructured like arrays; the destructurin
507 destructured like arrays; the destructuring variables get the types of th
515 It's an error to destructure a tuple beyond the range of i
521 As with arrays, you can destructure the rest of the tuple with `.
535 ## Object destructuring
537 You can also destructure objects:
551 Like array destructuring, you can have assignment with
586 o be written after the entire destructuring:
607 Destructuring also works in function declar
617 d getting defaults right with destructuring can be tricky.
629 or optional properties on the destructured property instead of the main
641 Use destructuring with care.
642 es, anything but the simplest destructuring expression is confusing.
643 ially true with deeply nested destructuring, which gets really hard to
644 Try to keep destructuring expressions small and simple.
645 ys write the assignments that destructuring would generate yourself.
649 d operator is the opposite of destructuring.
659 This gives bothPlus the value `[0, 1, 2, 3, 4, 5]

Typos for Type Inference.md

Line Typo
74 pt knows that uiEvent is a [UIEvent](https://developer.mozilla.or
74 /Web/API/UIEvent), and not a [MouseEvent](https://developer.mozilla.or

Typos for Type Compatibility.md

Line Typo
8 Script is based on structural subtyping.
34 ere TypeScript allows unsound behavior were carefully considered, an
115 ## Function Parameter Bivariance
173 # Enums
175 Enums are compatible with numbers,
175 d numbers are compatible with enums. Enum values from different e
175 rs are compatible with enums. Enum values from different enum ty
175 s. Enum values from different enum types are considered incompat
265 term defined in the language spec.
272 ormation, see the [TypeScript spec](https://github.com/Microsoft

Typos for Type Checking JavaScript Files.md

Line Typo
15 ## JSDoc types are used for type infor
18 , they can be specified using JSDoc the same way that type annota
22 JSDoc annotations adorning a declar
32 nd the full list of supported JSDoc patterns [below](#supported-j
61 ation in the constructor with JSDoc to specify the type.
81 Before ES2015, Javascript used constructor functions in
96 ## CommonJS modules are supported
98 e, Typescript understands the CommonJS module format.
112 The module support in Javascript is much more syntactically fo
127 And, for pre-ES2015 code, it can be used to simul
178 ike other special JS checking behaviors, this behavior can be changed
178 l JS checking behaviors, this behavior can be changed by specifying
178 an be changed by specifying a JSDoc type for the variable. For ex
206 optionality on parameters in pre-ES2015 Javascript, all function para
206 y on parameters in pre-ES2015 Javascript, all function parameters in `
223 JSDoc annotated functions are exclu
224 Use JSDoc optional parameter syntax to
240 ## Var-args parameter declaration inferre
242 plicitly considered to have a var-arg parameter (i.e. `(...arg: any
242 (...arg: any[]) => any`). Use JSDoc var-arg syntax to specify the
242 g: any[]) => any`). Use JSDoc var-arg syntax to specify the type of
257 ng generic type parameters in Javascript, an unspecified type paramete
274 Use JSDoc @augments to specify the ty
289 ### In JSDoc references
291 unspecified type argument in JSDoc defaults to any:
318 # Supported JSDoc
320 urrently supported when using JSDoc annotations to provide type i
335 e meaning of the tag given at usejsdoc.org.
340 peScript declaration, or in a JSDoc "@typedef" tag).
340 declaration, or in a JSDoc "@typedef" tag).
341 any Typescript type, and most JSDoc types.
399 atures, using either standard JSDoc syntax or Typescript syntax.
462 specific and differs from the JSDoc standard:
678 When Javascript classes extend a generic base
694 nlike most object literals in Javascript, it does not allow other memb
705 However, unlike Typescript's enums, @enum can have any type:
824 Unlike JSDoc's type system, Typescript only
825 There is no explicit non-nullability -- if strictNullChecks is on,
825 xplicit non-nullability -- if strictNullChecks is on, then number is not n

Typos for Triple-Slash Directives.md

Line Typo
34 ve to the containing file, if unrooted.
67 e "lib" compiler option in tsconfig.json (e.g. use lib="es2015" and
69 ecommended. Previously these .d.ts files had to add forward/dupl
92 he resulting modules, such as bundlers (e.g. r.js).
96 ##### amdModule.ts
106 ##### amdModule.js
123 informs the compiler about a non-TS module dependency that needs
125 ssing an optional name for an amd-dependency:

Typos for Symbols.md

Line Typo
57 o represent internal language behaviors.
63 alled by the semantics of the instanceof operator.
67 ened to its array elements by Array.prototype.concat.

Typos for Project References.md

Line Typo
34 ork with if you used a single tsconfig file:
38 mplementation files required typechecking the tests again, even though
39 nging just the tests required typechecking the implementation again, eve
41 You could use multiple tsconfig files to solve some of thos
44 oking tsc twice incurs more startup time overhead
45 tsc -w` can't run on multiple config files at once
64 sconfig.json` file, or to the config file itself (which may have a
72 greatly improve the speed of typechecking and compiling, reduce memory
122 rking on a behind-the-scenes .d.ts generation process that shoul
139 rovide tsc -b with multiple config file paths (e.g. `tsc -b src
140 like tsc -p, specifying the config file name itself is unnecessa
142 ## tsc -b Commandline
144 You can specify any number of config files:
152 ing the files you pass on the commandline - tsc will re-order them if
170 # MSBuild
172 If you have an msbuild project, you can enable build
178 to your proj file. This will enable automa
180 should be managed using your tsconfig file.
182 Some teams have set up msbuild-based workflows wherein tsconfig fi
182 build-based workflows wherein tsconfig files have the same *implicit
201 and add references to these config files to match the intended l
204 ## Structuring for outFiles

Typos for Nightly Builds.md

Line Typo
6 ed by midnight PST to NPM and NuGet.
9 ## Using npm
15 ## Using NuGet with MSBuild
15 ## Using NuGet with MSBuild
17 igure your project to use the NuGet packages.
18 Please see [Configuring MSBuild projects to use NuGet](https:
18 uring MSBuild projects to use NuGet](https://github.com/Microsoft
20 e nightlies are available on [**www.myget.org**](https://www.myget.org/galler
25 : Tools as above, as well as **MSBuild** tasks and targets (Microsoft
30 o install the package through npm.
31 You can either install the npm package globally or to a loca
43 information is available at [VSCode documentation](https://code.v
53 available at the [TypeScript Plugin for Sublime Text installation
57 version of the VS TypeScript plugin.
59 tly does not include the full plugin setup, but we are working on
61 1. Download the [VSDevMode.ps1](https://github.com/Microsoft
65 2. From a PowerShell command window, run:
79 ### IntelliJ IDEA (Mac)
82 ersion: If you installed with npm: `/usr/local/lib/node_modules
84 ### IntelliJ IDEA (Windows)
87 ersion: If you installed with npm: `C:\Users\USERNAME\AppData\R

Typos for Namespaces.md

Line Typo
13 [Namespacing](#namespacing)
14 * [Namespaced Validators](#namespaced-valid
41 a user's input on a form in a webpage or check the format of an ext
83 # Namespacing
91 ion details, so they are left unexported and will not be visible to co
94 ## Namespaced Validators
148 ##### Validation.ts
158 ##### LettersOnlyValidator.ts
172 ##### ZipCodeValidator.ts
186 ##### Test.ts
225 to use <script> tags on our webpage to load each emitted file in
227 ##### MyTestPage.html (excerpt)
278 ##### D3.d.ts (simplified excerpt)

Typos for Namespaces and Modules.md

Line Typo
33 y on a module loader (such as CommonJs/Require.js).
33 dule loader (such as CommonJs/Require.js).
37 s also worth noting that, for Node.js applications, modules are the
46 ## /// <reference>-ing a module
74 ## Needless Namespacing
100 contents, the general idea of namespacing is to provide logical groupin

Typos for Modules.md

Line Typo
22 oaders used in JavaScript are Node.js's loader for [CommonJS](https
22 ipt are Node.js's loader for [CommonJS](https://en.wikipedia.org/wik
22 ki/CommonJS) modules and the [RequireJS](http://requirejs.org/) loade
33 ##### StringValidator.ts
41 ##### ZipCodeValidator.ts
74 ##### ParseIntBasedZipCodeValidator.ts
89 ##### AllValidators.ts
144 For instance, a library like jQuery might have a default export o
146 ##### [JQuery.d.ts](https://github.com/Definitel
153 ##### App.ts
164 ##### ZipCodeValidator.ts
175 ##### Test.ts
185 ##### StaticZipCodeValidator.ts
195 ##### Test.ts
210 ##### OneTwoThree.ts
216 ##### Log.ts
226 Both CommonJS and AMD generally have the co
229 act as a replacement for this behavior; however, the two are incompa
230 t =` to model the traditional CommonJS and AMD workflow.
233 face, namespace, function, or enum.
237 ##### ZipCodeValidator.ts
249 ##### Test.ts
268 generate appropriate code for Node.js ([CommonJS](http://wiki.commo
268 ppropriate code for Node.js ([CommonJS](http://wiki.commonjs.org/wik
268 commonjs.org/wiki/CommonJS)), require.js ([AMD](https://github.com/amd
268 tps://github.com/umdjs/umd), [SystemJS](https://github.com/systemjs/
273 ##### SimpleModule.ts
280 ##### AMD / RequireJS SimpleModule.js
280 ##### AMD / RequireJS SimpleModule.js
288 ##### CommonJS / Node SimpleModule.js
288 ##### CommonJS / Node SimpleModule.js
295 ##### UMD SimpleModule.js
311 ##### System SimpleModule.js
329 ative ECMAScript 2015 modules SimpleModule.js
340 rget on the command line. For Node.js, use --module commonjs;
341 for require.js, use --module amd. For exam
350 ##### Validation.ts
358 ##### LettersOnlyValidator.ts
372 ##### ZipCodeValidator.ts
386 ##### Test.ts
426 ### Dynamic Module Loading in Node.js
440 le: Dynamic Module Loading in require.js
455 le: Dynamic Module Loading in System.js
481 In Node.js, most tasks are accomplished
486 ##### node.d.ts (simplified excerpt)
518 ##### declarations.d.ts
533 Some module loaders such as [SystemJS](https://github.com/systemjs/
565 ##### math-lib.d.ts
565 ##### math-lib.d.ts
599 Unless it increases expressivity or intent in a clearly useful
608 #### MyClass.ts
616 #### MyFunc.ts
622 #### Consumer.ts
635 #### MyThings.ts
646 #### Consumer.ts
656 #### MyLargeModule.ts
665 #### Consumer.ts
675 extensions, similar to how JQuery extensions work.
682 #### Calculator.ts
760 #### TestCalculator.ts
772 #### ProgrammerCalculator.ts
803 Here is a test for our ProgrammerCalculator class:
805 #### TestProgrammerCalculator.ts
821 d all the collection types in System.Collections.

Typos for Module Resolution.md

Line Typo
84 rategy attempts to mimic the [Node.js](https://nodejs.org/) module
85 The full Node.js resolution algorithm is outli
85 ion algorithm is outlined in [Node.js module documentation](https:/
87 #### How Node.js resolves modules
89 portant to shed some light on Node.js modules.
90 Traditionally, imports in Node.js are performed by calling a fu
91 The behavior Node.js takes will differ dep
91 The behavior Node.js takes will differ depending o
95 Node.js resolves that import in the f
100 In our example, if Node.js found the file `/root/src/mod
100 "lib/mainModule.js" }, then **Node.js** will refer to /root/src/modu
105 u can read more about this in Node.js documentation on [file module
127 Notice that Node.js jumped up a directory in step
129 ead more about the process in Node.js documentation on [loading mod
133 TypeScript will mimic the Node.js run-time resolution strategy
147 Recall that Node.js looked for a file named `modu
149 lative import will follow the Node.js resolution logic, first looki
180 lly no more complex than what Node.js itself is doing.
203 Value of baseUrl is determined as either:
205 * value of baseUrl command line argument (if gi
206 * value of baseUrl property in 'tsconfig.json'
206 lue of baseUrl property in 'tsconfig.json' (if given path is relat
206 aseUrl* property in 'tsconfig.json' (if given path is relative,
206 ted based on the location of 'tsconfig.json')
206 on the location of 'tsconfig.json')
208 e not impacted by setting the baseUrl, as they are always resolved
210 an find more documentation on baseUrl in [RequireJS](http://require
210 documentation on baseUrl in [RequireJS](http://requirejs.org/docs/ap
210 api.html#config-baseUrl) and [SystemJS](https://github.com/systemjs/
214 e not directly located under baseUrl.
216 es to files at run-time, see [RequireJs documentation](http://require
216 s/api.html#config-paths) and [SystemJS documentation](https://github
234 "in the above example, then **jquery** should be mapped to"../node
276 import 'folder1/file2':
276 import 'folder1/file2':
279 ative name - combine it with baseUrl -> `projectRoot/folder1/file
282 import 'folder2/file3':
282 import 'folder2/file3':
285 ative name - combine it with baseUrl -> `projectRoot/folder2/file
288 ative name - combine it with baseUrl -> `projectRoot/generated/fo
296 Using 'rootDirs', you can inform the compiler
335 may include any number of ad hoc, arbitrary directory names, r
335 n and project specific loader plugins in a type safe way.
412 dule 'typescript' from 'src/app.ts'. ========
412 'typescript' from 'src/app.ts'. ========
416 nd is not specified, using 'NodeJs'.
418 * Loading of types from npm packages
420 > 'package.json' has 'types' field './lib
420 has 'types' field './lib/typescript.d.ts' that references 'node_module
420 script.d.ts' that references 'node_modules/typescript/lib/typescript.d.t
420 'node_modules/typescript/lib/typescript.d.ts'.
424 successfully resolved to 'node_modules/typescript/lib/typescript.d.t
424 'node_modules/typescript/lib/typescript.d.ts'. ========
436 #### app.ts

Typos for Mixins.md

Line Typo
10 [Mixin sample](#mixin-sample)
18 be familiar with the idea of mixins or traits for languages like
20 # Mixin sample
23 ow, we show how you can model mixins in TypeScript.
79 classes that will act as our mixins.
105 le the combination of the two mixins.
118 e types behind Disposable and Activatable into the SmartObject type rat
118 able and Activatable into the SmartObject type rather than the implemen
119 hat we want to avoid by using mixins.
121 Finally, we mix our mixins into the class implementation
128 the properties of each of the mixins and copy them over to the tar
128 hem over to the target of the mixins, filling out the stand-in pro

Typos for JSX.md

Line Typo
59 corresponding option in your [tsconfig.json](./tsconfig.json.md) file.
82 x` files, and is identical in behavior to the angle-bracket type ass
96 element always begins with a lowercase letter, and a value-based ele
96 element always begins with an uppercase letter.
338 attributes type* where child JSXExpressions are taken to be inserted in
367 erride the default type from, eg the [React typings](https://g
367 ault type from, eg the [React typings](https://github.com/Definitel
434 act you should use the [React typings](https://github.com/Definitel
435 These typings define the JSX namespace ap
457 , or an inline @jsx comment pragma to set it on a per-file basis
459 The comment pragma version may be used like so (

Typos for JSDoc Supported Types.md

Line Typo
7 when using JSDoc annotations to provide type i
22 meaning of the tag given at [jsdoc.app](https://jsdoc.app).
27 peScript declaration, or in a JSDoc "@typedef" tag).
27 declaration, or in a JSDoc "@typedef" tag).
28 any Typescript type, and most JSDoc types.
86 atures, using either standard JSDoc syntax or Typescript syntax.
149 specific and differs from the JSDoc standard:
416 When Javascript classes extend a generic base
433 nlike most object literals in Javascript, it does not allow other memb
444 However, unlike Typescript's enums, @enum can have any type:
573 Unlike JSDoc's type system, Typescript only
574 There is no explicit non-nullability -- if strictNullChecks is on,
574 xplicit non-nullability -- if strictNullChecks is on, then number is not n
579 cript ignores any unsupported JSDoc tags.

Typos for Iterators and Generators.md

Line Typo
6 # Iterables
8 An object is deemed iterable if it has an implementation f
14 for..of loops over an iterable object, invoking the `Symbol.
44 ainly interested in values of iterable objects. Built-in objects lik
63 When targeting an ES5 or ES3-compliant engine, iterators are only al
87 When targeting an ECMAScipt 2015-compliant engine, the co
87 When targeting an ECMAScipt 2015-compliant engine, the compiler will gen

Typos for Interfaces.md

Line Typo
9 "duck typing" or "structural subtyping".
106 # Readonly properties
345 ecause the index signature is readonly.
525 When interacting with 3rd-party JavaScript, you may need to u

Typos for Integrating with Build Tools.md

Line Typo
9 * [Browserify](#browserify)
13 * [Jspm](#jspm)
14 * [Webpack](#webpack)
15 * [MSBuild](#msbuild)
16 * [NuGet](#nuget)
26 ### .babelrc
39 ### package.json
55 # Browserify
82 More details: [smrq/tsify](https://github.com/smr
82 More details: [smrq/tsify](https://github.com/smrq/tsif
118 More details: [frankwallis/duo-typescript](https://githu
128 ### Basic Gruntfile.js
242 to include locally installed **Microsoft.TypeScript.Default.props (at the top) and Microsoft.TypeScript.targets (at the botto**m) files:
278 be found at [Package Manager Dialog](http://docs.nuget.org/Consum
278 nd [using nightly builds with NuGet](https://github.com/Microsoft

Typos for Generics.md

Line Typo
54 `, it's also just as precise (ie, it doesn't lose any informat
198 ot possible to create generic enums and namespaces.

Typos for Functions.md

Line Typo
230 avaScript, though, first read Yehuda Katz's [Understanding JavaScr
231 Yehuda's article explains the inner wo

Typos for Enums.md

Line Typo
6 # Enums
8 Enums allow us to define a set of n
9 Using enums can make it easier to documen
10 both numeric and string-based enums.
12 ## Numeric enums
14 first start off with numeric enums, which are probably more fami
15 An enum can be defined using the `enu
26 Above, we have a numeric enum where Up is initialized wit
42 This auto-incrementing behavior is useful for cases where we
42 from other values in the same enum.
44 Using an enum is simple: just access any me
44 mber as a property off of the enum itself, and declare types usi
44 e types using the name of the enum:
59 Numeric enums can be mixed in [computed and
60 The short story is, enums without initializers either n
60 or have to come after numeric enums initialized with numeric cons
60 c constants or other constant enum members.
70 ## String enums
72 String enums are a similar concept, but ha
73 In a string enum, each member has to be consta
73 teral, or with another string enum member.
84 While string enums don't have auto-incrementing
84 don't have auto-incrementing behavior, string enums have the benefi
84 incrementing behavior, string enums have the benefit that they "s
85 he runtime value of a numeric enum, the value is often opaque -
85 time) can often help), string enums allow you to give a meaningfu
85 ndependent of the name of the enum member itself.
87 ## Heterogeneous enums
89 Technically enums can be mixed with string and
98 ntage of JavaScript's runtime behavior in a clever way, it's advised
102 Each enum member has a value associated
103 An enum member is considered constant
105 It is the first member in the enum and it has no initializer, in
112 initializer and the preceding enum member was a numeric consta
113 case the value of the current enum member will be the value of t
113 be the value of the preceding enum member plus one.
125 * The enum member is initialized with a
125 s initialized with a constant enum expression.
126 A constant enum expression is a subset of Typ
127 An expression is a constant enum expression if it is:
129 1. a literal enum expression (basically a strin
130 o previously defined constant enum member (which can originate f
130 an originate from a different enum)
131 3. a parenthesized constant enum expression
132 4. one of the +, -, ~ unary operators applied to constant
132 operators applied to constant enum expression
133 inary operators with constant enum expressions as operands
135 mpile time error for constant enum expressions to be evaluated t
137 In all other cases enum member is considered computed
151 ## Union enums and enum member types
151 ## Union enums and enum member types
153 a special subset of constant enum members that aren't calculate
153 at aren't calculated: literal enum members.
154 A literal enum member is a constant enum mem
154 ral enum member is a constant enum member with no initialized va
158 * a unary minus applied to any numeric
160 When all members in an enum have literal enum values, som
160 mbers in an enum have literal enum values, some special semantic
162 The first is that enum members also become types as
163 n only have the value of an enum member:
187 The other change is that enum types themselves effectively
187 vely become a union of each enum member.
188 ed to know is that with union enums, the type system is able to l
188 t of values that exist in the enum itself.
210 ## Enums at runtime
212 Enums are real objects that exist a
213 For example, the following enum
232 ## Enums at compile time
234 Even though Enums are real objects that exist a
234 et a Type that represents all Enum keys as strings.
260 ty names for members, numeric enums members also get a *reverse m
260 get a reverse mapping from enum values to enum names.
260 mapping* from enum values to enum names.
282 In this generated code, an enum is compiled into an object th
283 References to other enum members are always emitted as
285 Keep in mind that string enum members do not get a revers
287 ### const enums
289 In most cases, enums are a perfectly valid solutio
291 al indirection when accessing enum values, it's possible to use
291 it's possible to use const enums.
292 Const enums are defined using the `
292 Const enums are defined using the const
292 g the const modifier on our enums:
301 Const enums can only use constant e
301 Const enums can only use constant enum ex
301 t enums can only use constant enum expressions and unlike regula
301 xpressions and unlike regular enums they are completely removed d
302 Const enum members are inlined at u
302 Const enum members are inlined at use si
303 This is possible since const enums cannot have computed me
303 This is possible since const enums cannot have computed members.
322 ## Ambient enums
324 Ambient enums are used to describe the shap
324 the shape of already existing enum types.
334 tween ambient and non-ambient enums is that, in regular enums, me
334 ent enums is that, in regular enums, members that don't have an i
334 red constant if its preceding enum member is considered constant
335 In contrast, an ambient (and non-const) enum member that does not ha
335 t, an ambient (and non-const) enum member that does not have ini

Typos for Decorators.md

Line Typo
22 tsconfig.json:
35 method](#method-decorators), [accessor](#accessor-decorators), [prop
127 tors*, followed by Method, Accessor, or Property Decorators ar
128 tors*, followed by Method, Accessor, or Property Decorators ar
240 ## Accessor Decorators
242 An Accessor Decorator is declared just b
242 r* is declared just before an accessor declaration.
243 The accessor decorator is applied to the *
243 Property Descriptor for the accessor and can be used to observe, m
243 bserve, modify, or replace an accessor's definitions.
244 An accessor decorator cannot be used in a
246 ting both the get and set accessor for a single member.
247 must be applied to the first accessor specified in document order.
248 ines both the get and set accessor, not each declaration separat
250 The expression for the accessor decorator will be called as a
258 If the accessor decorator returns a value, it
262 following is an example of an accessor decorator (@configurable) a
416 etadata` library which adds a polyfill for an [experimental metadata
420 can install this library via npm:
435 tsconfig.json:

Typos for Declaration Merging.md

Line Typo
28
156 only visible in the original (un-merged) namespace. This means that a
176 function that shares the same un-merged namespace can see the symbol.
177 l` namespace can not see this un-exported member.
179 with Classes, Functions, and Enums
218 espaces can be used to extend enums with static members:
249 cking class merging, see the [Mixins in TypeScript](./Mixins.md) s
328 l augmentations have the same behavior and limits as module augmenta

Typos for Configuring Watch.md

Line Typo
12 g intervals for source files, config files and missing files
14 on/deletion. Note that few OS eg. linux has limit on number of
14 eletion. Note that few OS eg. linux has limit on number of watche
33 watches that can be created, eg. linux and we could exhaust i
33 ches that can be created, eg. linux and we could exhaust it prett
33 .watch` to watch directories (eg. source directories included
33 ource directories included by config file, directories in which mo
35 hFile` to watch source files, config files and missing files (miss

Typos for Compiler Options.md

Line Typo
11 es not affect code emit, just typechecking.
12
23
23 emap for each corresponding '.d.ts' file.
26
26 bles in for..of, spread and destructuring when targeting ES5 or ES3.
28
30 wSyntheticDefaultImports` for typesystem compatibility.
38 Emit the source alongside the sourcemaps within a single file; require
40 ransform-function) or [@babel/plugin-transform-typescript](https://babeljs.io/docs/en/b
48 different location than the .js files. The location specified
48 ified will be embedded in the sourceMap to direct the debugger where
49 endency depth to search under node_modules and load JavaScript files. On
51 resolved. Either "Node" for Node.js/io.js style resolution, or `"
51 . Either "Node" for Node.js/io.js style resolution, or `"Classi
52 "crlf" (windows) or "lf" (unix)."
57
71
71
71 tions in generated code. See [const enums documentation](https://
71 in generated code. See [const enums documentation](https://github
74 ize errors and messages using color and context.
75 tsconfig.json` file.
See [tsconfig.json](./tsconfig.json.md) document
81 h the other input options and config files, show the final implied
81 files, show the final implied config file in the output.
85 ified will be embedded in the sourceMap to direct the debugger where
88
96 ns to include. See [@types, --typeRoots and --types](./tsconfig.json.
97 initions from. See [@types, --typeRoots and --types](./tsconfig.json.
107 Setting compiler options in [MSBuild projects](./Compiler%20Option

Typos for Compiler Options in MSBuild.md

Line Typo
8 ptions can be specified using MSBuild properties within an MSBuild
8 MSBuild properties within an MSBuild project.
28
30
31 DefaultImports`
32 leCode`
33 els`
34
35
36
37
38 `
39
40
41
42 etadata`
43 nOnly`
44 p`
45 yncFunctions`
46 corators`
47 tCasingInFileNames`
48
49
50 p`
51
52
53 s`
54
55
56
57
58
59
60
61
62
63 on`
64
65
66
67
68 asesInSwitch`
69
70 rns`
71 `
72 trict`
73 cChecks`
74 `
75 ters`
76
77
78
79
80
81
82 nums`
83 ks`
84
85
86 `
87 `
88
89
90
91 Check`
92
93
94
95 Types`
96 ks`
97 Initialization`
98
99 ropertyErrors`
100 itAnyIndexErrors`
101
102
103
104
105
106 MSBuild only option
106 ion*
111 uthoritative mappings between MSBuild XML tags and tsc compiler o
113 ## ToolsVersion
122 ## TypeScriptCompileBlocked

Typos for Classes.md

Line Typo
67 ase classes are often called superclasses.
128 hat each member be explicitly labeled public to be visible.
253 # Readonly modifier
255 You can make properties readonly by using the readonly keywo
256 Readonly properties must be initialize
272 example, we had to declare a readonly member name and a construct
342 o prove to ourselves that our accessor is now checking the length of
347 Downleveling to ECMAScript 3 is not suppor

Typos for Basic Types.md

Line Typo
13 The most basic datatype is the simple true/false valu
34 ng programs in JavaScript for webpages and servers alike is working
35 ng` to refer to these textual datatypes.
44 re surrounded by the backtick/backquote (`) character, and embe
105 # Enum
107 dition to the standard set of datatypes from JavaScript is the enum
108 As in languages like C#, an enum is a way of giving more frien
115 By default, enums begin numbering their members
124 lly set all the values in the enum:
131 A handy feature of enums is that you can also go from
131 the name of that value in the enum.
132 that mapped to in the Color enum above, we could look up the c
295 You may've noticed that so far, we've be

Typos for Advanced Types.md

Line Typo
30 [Enum Member Types](#enum-member-ty
55 e intersection types used for mixins and other concepts that don't
55 n the classic object-oriented mold.
57 le that shows how to create a mixin:
179 Union types are useful for modeling situations when values can ov
309 , let's borrow our industrial string-padder example from earlier:
361 The inventor of null, Tony Hoare, calls this his ["billion dol
543 hese features together to get enum-like behavior with strings.
543 res together to get enum-like behavior with strings.
607 # Enum Member Types
609 mentioned in [our section on enums](./Enums.md#union-enums-and-e
609 enums-and-enum-member-types), enum members have types when every
611 pes", we're referring to both enum member types as well as numer
892 Or we might want a readonly version:
982 example, if Person.name was readonly, Partial<Person>.name would
982 artial.name` would be readonly and optional.

Lighthouse Scores

/
Performance Accessibility Best Practices SEO Progressive Web App
0.82 0.9 0.93 0.7 1
/tsconfig
Performance Accessibility Best Practices SEO Progressive Web App
0.94 0.9 1 0.8 0.96
/docs/handbook/integrating-with-build-tools.html
Performance Accessibility Best Practices SEO Progressive Web App
0.96 0.9 1 0.77 0.96

Snapshots updated

backstop_default_Index_0_document_0_phone.png
Before After
backstop_default_Index_0_document_1_tablet.png
Before After
backstop_default_Index_0_document_2_computer.png
Before After
backstop_default_Old_Handbook_Example_0_viewport_0_phone.png
Before After
backstop_default_Old_Handbook_Example_0_viewport_1_tablet.png
Before After
backstop_default_Old_Handbook_Example_0_viewport_2_computer.png
Before After
backstop_default_TSConfig_Example_0_viewport_0_phone.png
Before After
backstop_default_TSConfig_Example_0_viewport_1_tablet.png
Before After
backstop_default_TSConfig_Example_0_viewport_2_computer.png
Before After

Generated by 🚫 dangerJS against 382406f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant