Skip to content

Commit

Permalink
Add note about typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
edazpotato authored Dec 15, 2021
1 parent ec590ce commit 052747f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/marked-renderer-text/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ things
*/
```

### Typescript

In my testing this works fine with typescript out of the box - you can import it like this
```ts
import { renderToText } from "marked-renderer-text";
```
and use it like normal.
Because it's a really simple package, Typescript seems to magicaly infer all of the types.

If you run into any problems using this with typescript, open an issue and I'll add proper type definitions.

## Options

You can enable fancy mode by passing `true` to the `renderToText()` function.
Expand Down

0 comments on commit 052747f

Please sign in to comment.