Troubleshooting Handbook: Utilities

these are all built in, see source in es5.d.ts:

  • ConstructorParameters: a tuple of class constructor's parameter types
  • Exclude: exclude a type from another type
  • Extract: select a subtype that is assignable to another type
  • InstanceType: the instance type you get from a newing a class constructor
  • NonNullable: exclude null and undefined from a type
  • Parameters: a tuple of a function's parameter types
  • Partial: Make all properties in an object optional
  • Readonly: Make all properties in an object readonly
  • ReadonlyArray: Make an immutable array of the given type
  • Pick: A subtype of an object type with a subset of its keys
  • Record: A map from a key type to a value type
  • Required: Make all properties in an object required
  • ReturnType A function's return type

This section needs writing, but you can probably find a good starting point with Wes Bos' ESLint config (which comes with a YouTube intro).