tsutils
tsutils copied to clipboard
utility functions for working with typescript's AST
Ref: https://github.com/microsoft/TypeScript/pull/36248 - [x] convertAst - [x] getTokenAtPosition - [x] hasSideEffects - [x] forEachToken - [ ] usage analysis
There's no compelling reason to be using an old development version anymore. Removing them greatly simplifies the expression
Smaller package means faster download and install :)
This lets it check whether the async result is used.
I have some utilities that we use a _lot_ for helping with Union types and typeguarding from dynamic data sources, such as data to/from an API call. However, I also...
```ts const obj = {const: 1 + 1} as const; const spreaded = { ...obj }; const constSpreaded = { ...spreaded } as const; const {...rest} = obj; obj.const; //...
This new API is going to replace the existing `collectVariableUsage`. Main differences: * fully incremental and cached * weak cache cleans up if node is no longer referenced * should...
The current API is somewhat difficult to use and does too much by analyzing the whole source file ahead of time. The new API should return an object that can...
Adding this issue following suggestion from @JoshuaKGoldberg in [this comment](https://github.com/Microsoft/tslint-microsoft-contrib/pull/443/files/d56161f5b6b068fb6ce7f91c9ed707e2b3063cc7#r200004587) The [MS export-name tslint rule](https://github.com/Microsoft/tslint-microsoft-contrib/blob/73cfcdff42a7d1cc62b2de249e39863b441c7a98/src/exportNameRule.ts) could be a lot simpler if there were a utility which could answer the question...
CFA could be even more powerful if it constructs a full control flow graph that users can inspect. Ref: https://github.com/fimbullinter/wotan/issues/160 Ref: https://github.com/fimbullinter/wotan/issues/165