Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jackmellis committed Oct 7, 2024
1 parent 1d12a96 commit 38004c9
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Jpex is an Inversion of Control framework. Register dependencies on a container,
- [resolveAsync][#jpexresolveasync]
- [resolveWith](#jpexresolvewith)
- [encase](#jpexencase)
- [defer](#jpexdefer)
- [extend](#jpexextend)
- [inherit](#inherit)
- [lifecycle](#lifecycle-1)
Expand Down Expand Up @@ -364,6 +365,20 @@ getStuff.encased(fakeHttp)('my-thing');
> If you include any factoryAsync dependencies, jpex will ensure the encased function returns a promise as well.
#### jpex.defer
```ts
<T>(): T
```
Provided `T` is a function type, returns `T` but only resolves its dependencies at call time.
```ts
const getStuff = jpex.defer<GetStuff>();

await getStuff('my-thing'); // will only resolve the GetStuff factory here
```
#### jpex.extend
```ts
Expand Down

0 comments on commit 38004c9

Please sign in to comment.