Skip to content

Commit

Permalink
doc: update usage
Browse files Browse the repository at this point in the history
close #5
  • Loading branch information
gera2ld committed Jan 2, 2024
1 parent 120f78d commit 9e645c9
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ The APIs should be almost the same as those in Tampermonkey, so `@types/tampermo
$ npm i @violentmonkey/types
```

Add `@violentmonkey/types` to your `tsconfig.json`:

```json
{
"include": [
"other paths...",
"node_modules/@violentmonkey/types"
]
}
Add `@violentmonkey/types` to a `.d.ts` file.

For example, create `src/vm.d.ts` with the following content:

```typescript
import '@violentmonkey/types';
```

Make sure the `.d.ts` file is included in your `tsconfig.json`.

0 comments on commit 9e645c9

Please sign in to comment.