docs: update readme instructions for types import

This commit is contained in:
Nicola Zambello 2022-04-28 17:17:01 +02:00
parent 69a206a566
commit aaf7ca2ea4
Signed by: nzambello
GPG key ID: 56E4A92C2C1E50BA

View file

@ -19,6 +19,7 @@ npm install @nzambello/link-previewer
## Usage ## Usage
```ts ```ts
import type { ILinkPreviewInfo } from '@nzambello/link-previewer';
import getLinkPreview from '@nzambello/link-previewer'; import getLinkPreview from '@nzambello/link-previewer';
getLinkPreview('https://www.youtube.com/watch?v=feH26j3rBz8').then(console.log); getLinkPreview('https://www.youtube.com/watch?v=feH26j3rBz8').then(console.log);