Strangely enough I think I picked up the most useful information by trying to read Preact's index.d.ts and internal.d.ts which are strictly types and then back-filling with the official documentation to discover "what did I just read there?" - failing that searching for a quick article online.
One key revelation that helped me a bit was that the advanced features are less about declaring types as one might be used to from mainstream languages with a nominal type system but are more about extracting types - and that JavaScript exists in Value Space while TypeScript types exist in Type Space (which unfortunately TS syntax often conflates).
At times searching for information online can be a chore if you don't know the right terminology - terms like Non-null assertion operator or Assertion Function don't exactly suggest themselves when you are reading code.
Strangely enough I think I picked up the most useful information by trying to read Preact's index.d.ts and internal.d.ts which are strictly types and then back-filling with the official documentation to discover "what did I just read there?" - failing that searching for a quick article online.
That said comlink is still giving me headaches.
One key revelation that helped me a bit was that the advanced features are less about declaring types as one might be used to from mainstream languages with a nominal type system but are more about extracting types - and that JavaScript exists in Value Space while TypeScript types exist in Type Space (which unfortunately TS syntax often conflates).
Thanks. I also dig through other projects typings, Preact's is a good tip. It's much cleaner than some of the typings I've seen out there 😬
That Gitbook you've referenced to looks very useful, thanks for that!
If you are interested in using typescript mapped types, you can check my blog catchts.com . All examples are taken from stackoverflow
At times searching for information online can be a chore if you don't know the right terminology - terms like Non-null assertion operator or Assertion Function don't exactly suggest themselves when you are reading code.
A Glossary of TypeScript attempts to sort out some of the type related terminology.
Very nice. That glossary is excellent 👌