typescript-book icon indicating copy to clipboard operation
typescript-book copied to clipboard

:books: The definitive guide to TypeScript and possibly the best TypeScript book :book:. Free and Open Source 🌹

Results 117 typescript-book issues
Sort by recently updated
recently updated
newest added

`null` and `undefined` are not bottom types. They are "unit" or null types. The only bottom type in typescript is `never`.

Maybe you like this little improvement we use in certain projects. P.S.: Thanks for typescript-book :-)

The example in https://basarat.gitbook.io/typescript/type-system/type-compatibility#types-of-arguments > This can be confusing for people coming from other languages who would expect the following to error but will not in TypeScript: ```ts /** Type...

If this React `React.lazy` RFC lands will change the naming convention to be `Buttons.tsx` (instead of `buttons.tsx`) and sunset the default exports issues, probably move into a blog post with...

The section [where the global module declaration explained](https://basarat.gitbook.io/typescript/project/modules/external-modules#overturning-dynamic-lookup-just-for-types) there is an example like that: ``` // global.d.ts declare module 'foo' { // Some variable declarations export var bar: number; /*sample*/...

## File: Utilities In book: ![截屏2020-05-09 16 08 28](https://user-images.githubusercontent.com/20441896/81468017-549d9680-920f-11ea-9f76-ae534ea12fc4.png) But in [source code](https://github.com/microsoft/TypeScript/blob/master/src/compiler/utilities.ts#L5249): ![截屏2020-05-09 16 10 34](https://user-images.githubusercontent.com/20441896/81468049-a0e8d680-920f-11ea-9736-a6f374fccca2.png) ![截屏2020-05-09 16 11 36](https://user-images.githubusercontent.com/20441896/81468068-c675e000-920f-11ea-9c8d-1552166efd1d.png) Is that a misunderstanding or is the book outdated?

Because you can use it on the command line to `--init`: ```ts npx tsc --init --rootDir src outDir lib ```

Again cover the basic: - `keyof` - Lookup `T[K]` - Mapped - Conditional (and infer) And then cover the ones in `lib.d.ts` Pick / Readonly / Exclude / Return type...

In [this article](https://spin.atomicobject.com/2018/01/15/typescript-flexible-nominal-typing/), as a introduction to another thing, the author shows another kind of patch to use nominal types: ```ts interface PersonIdBrand { _type: "Person"; } type PersonId =...