TypeScript 3.7 Utility Types | Printable PDF Cheat Sheet

Last Updated on April 26, 2022 by David

Learning modern TypeScript is not easy, especially when the Language Specification was last updated in Jan 2016. This is eventually going to be remedied with a brand-new version of the handbook, but the pace it is being written is glacial. Much of the current official documentation and general blog based information is outdated too.

To add to this horror, well-meaning people seem to have confused the meaning of the words ‘cheat sheet’ with ‘pages of vaguely related information in an unprintable format’. Maybe younger developers have never encountered a ‘printer’ device before? A decrepit antique that feeds on the corpses of dead trees and splits out thin slices of white ‘analogue information’ that requires physical space to store.

I am of the opinion that a nicely formatted and printed cheat sheet is a fantastic aid to learning, so here is one I made for all the TypeScript 3.7 utility types.

I took the official handbook .md file and brought it up to date by adding the Paramaters<T> and ConstructorParamters<T> types using examples from the awesome Marius Schulz Blog.. I then added page breaks with <div style="page-break-after: always;"></div>, and rendered it using PanDoc > HTML > Chromium PDF export. Hope you like it!

** Update, myself and another contributor sent in pull requests that were accepted. The official utility types page of the documentation has now been updated… but you still want this PDF for nicely formatted printing.

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *