diff --git a/docs/index.md b/docs/index.md index cbea6d23..80b63c57 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,5 +1,8 @@ -> This package is a partial fork of and replacement for [`tsutils`](https://github.com/ajafff/tsutils) ([original license: MIT](https://github.com/ajafff/tsutils/blob/26b195358ec36d59f00333115aa3ffd9611ca78b/LICENSE)). -> See [#3](https://github.com/JoshuaKGoldberg/ts-api-utils/issues/3) for notes on API coverage compared to `tsutils`. +> Utility functions for working with TypeScript's API. +> Successor to the wonderful [tsutils](https://github.com/ajafff/tsutils). + +`ts-api-utils` exports functions and types for working with TypeScript's node and type APIs. +If you're working with `ts.Node`s and/or `ts.Type`s, this package is your friend. 💗 ## Installation @@ -20,3 +23,18 @@ pnpm add ts-api-utils ```ts import * as tsutils from "ts-api-utils"; ``` + +The most commonly used functions are type predicates not yet available on TypeScript. +For example: + +```ts +declare const node: ts.Node; + +if (isAbstractKeyword(node)) { + // ... +} +``` + +See the sidebar for the full list of available functions and types. + +> Tip: if a function you'd want to use appears to be missing, check whether it exists on TypeScript itself.