Skip to content

Commit 04ec846

Browse files
committed
docs(readme): add reflect-metadata notes
1 parent bbe414d commit 04ec846

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ Calling `Validator.validateAsClass()` allows you to validate any object as if it
2222

2323
## Installation
2424

25-
`npm add joiful`
25+
`npm add joiful reflect-metadata`
2626

2727
Or
2828

29-
`yarn add joiful`.
29+
`yarn add joiful reflect-metadata`.
3030

3131
You must enable experimental decorators and metadata in your TypeScript configuration.
3232

@@ -43,6 +43,18 @@ You must enable experimental decorators and metadata in your TypeScript configur
4343

4444
## Basic Usage
4545

46+
Ensure you import `reflect-metadata` as the first import in your application's entry point.
47+
48+
`index.ts`
49+
50+
```typescript
51+
import 'reflect-metadata';
52+
53+
...
54+
```
55+
56+
Then you can start using joiful like this.
57+
4658
```typescript
4759
import * as jf from 'joiful';
4860

0 commit comments

Comments
 (0)