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

This is minor but I'm reporting it to make my PR reference an issue. The Tree type defines a node of a tree which must have two Tree chidren. This...

In the `Functions` page, in the `this and arrow functions` section, we can read: ``` In JavaScript, this is a variable that’s set when a function is called. ``` This...

I know it's easy to start with `npm install -g typescript` but it gets hairy when multiple developers are doing that on different versions of typescript. This SO post clarifies...

```ts pluck(taxi, ['year', 'unknown']); / ``` There is a random `/`. ``` (`object['42'`]) ``` Backtick should be after the `]` so that the code is highlighted properly. > As an...

Can you make this book available in Epub (or mobi) format?

Hosting
Accepting PRs

In the [section on type aliases](https://www.typescriptlang.org/docs/handbook/advanced-types.html#type-aliases), the comment and example about them [erroring on the right side of the declaration](https://www.typescriptlang.org/docs/handbook/advanced-types.html#using-the-in-operator%23:~:text=However%2C%20it%E2%80%99s%20not%20possible%20for%20a%20type%20alias%20to%20appear%20anywhere%20else%20on%20the%20right%20side%20of%20the%20declaration%3A) is no longer accurate since TypeScript v3.7. ([Playground](https://www.typescriptlang.org/play/index.html?ts=3.7.5#code/PTAEFEA8EMFsAcA2BTUAzATge1qALgBaoAmWAxgM4CwAUHgJ7yoCaAlgNbIWgC8oAghgzR6AHjacKAPgDcoEKGRCsGUAAoAdljygKrDWVQBmAHQB2AJS1aZLBoo68XPAC5QErr1ABtALpyFAHcVdgogA)) Another example...

The JSDoc types do not include an example of importing a type with a generic. e.g. this is the correct way: ``` /** * @template T * @typedef {import("../types").ThunkAction} ThunkAction...

The following snippet from the handbook doesn't compile anymore: ```ts function applyMixins(derivedCtor: any, baseCtors: any[]) { baseCtors.forEach(baseCtor => { Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => { Object.defineProperty(derivedCtor.prototype, name, Object.getOwnPropertyDescriptor(baseCtor.prototype, name)); }); }); } ```...

The `in` operator [documentation](https://github.com/microsoft/TypeScript-Handbook/blob/master/pages/Advanced%20Types.md#using-the-in-operator) says the following: > the "true" branch narrows to types which have an **optional or required** property n, and the "false" branch narrows to types which...

The typeof operator, as used in type queries rather than Javascript, isn't documented, other than as used in documentation of other things, like type guards. Because it is overloaded from...