hegel icon indicating copy to clipboard operation
hegel copied to clipboard

Documentation/website: Single page cheatsheet

Open Raynos opened this issue 5 years ago • 1 comments

The type system for python has a nice cheatsheet ( https://mypy.readthedocs.io/en/latest/cheat_sheet.html ).

I've copied this in the past ( https://github.com/Raynos/jsig/blob/master/docs/cheatsheet.md ).

Such a cheatsheet is a great feature for the website

  • Shows a list of types available
  • Shows the behavior of type inference with no annotations
  • Shows examples of adding type annotations
  • Shows examples of refinement
  • Shows example of casting syntax
  • Shows examples of debugging ( reveal_type / typeof x;
  • Shows examples of common places where a type annotation is needed and a user might "expect" inference to just work, e.g. const x = [] etc

It's an easy to share link that gives a quick refresher on how to use Hegel.

Raynos avatar May 24 '20 16:05 Raynos

Oh, nice. I will add it to Hegel. Thank you a lot for the suggestion ^_^

JSMonk avatar May 24 '20 17:05 JSMonk