Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Description
Before You File a Documentation Request Please Confirm You Have Done The Following...
- I have looked for existingopen or closed documentation requests that match my proposal.
- I haveread the FAQ and my problem is not listed.
Suggested Changes
Quoting@paulius-valiunas's#2726 (comment):
It's nice to finally have online documentation for the properties of each interface, but it's still difficult to map an interface to a code snippet, which was the primary concern of this issue. As in the example I originally wrote in the issue description,TSTypeParameterInstantiation still doesn't provide any information about how to recognize this AST node in code. If a developer wants to be efficient at working with the AST (e.g. writing ESLint rules), they have to be able to:
- Upon seeing a code snippet, understand what AST nodes it comprises. This can currently be done with the help ofhttps://astexplorer.net/
- Upon encountering an AST type, visualize it as a code snippet in their mind.
Both can be done with the help of a debugger, or simply "printf-debugging", but that significantly slows down any development effort until the developer memorizes the bigger part of the AST types after applying them in practice multiple times. Having some reference material to help deal with problem no.1 would be tremendously helpful. As per@bradzacher's suggestion, I'm able to search through this repo and finda snapshot containing the type I need and then map it tothe corresponding snippet, but unfortunately that is a time-consuming process and it would be much more helpful to have each interface in the documentation (or at least some of them) link to a minimal example snippet.
Agreed, it'd be nice to have...something like that in the docs.
Affected URL(s)
https://typescript-eslint.io/packages/typescript-estree/ast-spec
💖
Co-authored-by:@paulius-valiunas