Skip to content

Commit

Permalink
Added TypeScript instructions
Browse files Browse the repository at this point in the history
Updated README file to include instructions for using the package with TypeScript
  • Loading branch information
pjotrsavitski committed Sep 22, 2021
1 parent fc0028a commit 4f540e8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Expand Up @@ -98,6 +98,19 @@ This is the solution for you if you're just using `<script>` tags everywhere!

Assuming you are using [browserify][], [webpack][], [rollup][], or another bundler, you can simply follow [Node](#node) usage above.

#### TypeScript

This package will not work with [TypeScript](https://www.typescriptlang.org/) by default and would require installation of [@types/url-regex-safe](https://www.npmjs.com/package/@types/url-regex-safe) in addition the main `url-regex-safe` package.

```sh
npm install --save @types/url-regex-safe
```

After the additional package is installed, it will be possible to import the package and use that in a familiar manner.

```ts
import urlRegexSafe from "url-regex-safe";
```

## Options

Expand Down

0 comments on commit 4f540e8

Please sign in to comment.