Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: added introduction to docs site #149

Merged
merged 2 commits into from
Mar 11, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -20,3 +23,16 @@ 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.