TypeScript-Handbook icon indicating copy to clipboard operation
TypeScript-Handbook copied to clipboard

Deprecated, please use the TypeScript-Website repo instead

Results 100 TypeScript-Handbook issues
Sort by recently updated
recently updated
newest added

_From @penglinjiang on December 28, 2017 6:47_ **TypeScript Version:** 2.6.2 When i study the document about "modules" in "https://www.typescriptlang.org/docs/handbook/modules.html" in chapter "Optional Module Loading and Other Advanced Loading Scenarios",i found...

Courtesy of @bterlson http://www.typescriptlang.org/docs/handbook/iterators-and-generators.html This section doesn't mention generators at all. Should the section be renamed? Should the content expand to say something about generators? I'd say the latter.

New Topic
Update

From https://www.typescriptlang.org/docs/handbook/modules.html#export--and-import--require: > When importing a module using export =, TypeScript-specific import module = require("module") must be used to import the module. The *must* is not always true -- one...

Hello, i learning the typescript tutorial and the example with inheritance is confusing but not exist a example using the method of mother class directily without defined other method with...

Editing

The [declaration merging page](https://github.com/Microsoft/TypeScript-Handbook/blob/master/pages/Declaration%20Merging.md) describes a system that I would expect to work like this: ```ts // node_modules/@types/package/index.d.ts interface Foo { example(): void; } // main.ts Foo.prototype.myNewMethod = () =>...

due to if(0) being interpreted as false, the optional properties samples checking if(config.width) parameter will fail if a 0 value is supplied: ``` interface SquareConfig { color?: string; width?: number;...

Update

According to: https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines `6. Do not use "_" as a prefix for private properties.` The getter/setter example here: https://github.com/Microsoft/TypeScript-Handbook/blob/master/pages/Classes.md ..is not examplary.

For example: ``` class Point { constructor(public x: number, public y: number) {} where(){ return console.log(this.x,this.y); } } class Person { constructor(public name: string) {} who(){ return console.log(this.name); } }...

```bash qwabra$ tsc -v Version 2.3.4 qwabra$ node app /Users/qwabra/Desktop/ref/app.js:23 set: function (value) { this._p0 = value; }, ^ TypeError: Cannot set property '_p0' of undefined ``` ## Fix function...

Ref: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/12394#issuecomment-298825183 These are declared as modules and should be imported, not referenced.