Skip to content

Commit

Permalink
Merge pull request #91 from ivandotv/remove-resolve-ctx
Browse files Browse the repository at this point in the history
remove resolve method second parameter (options - context)
  • Loading branch information
ivandotv authored Aug 7, 2024
2 parents a930ae5 + c4626d0 commit 28a0548
Show file tree
Hide file tree
Showing 6 changed files with 479 additions and 795 deletions.
5 changes: 5 additions & 0 deletions .changeset/flat-stingrays-bathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"pumpit": major
---

remove resolve method second parameter (options - context)
11 changes: 0 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ It supports different injection scopes, child containers, hooks etc...
* [Registering factories](#registering-factories)
* [Registering values](#registering-values)
- [Resolving container data](#resolving-container-data)
* [Resolve context](#resolve-context)
- [Injection tokens](#injection-tokens)
- [Injection scopes](#injection-scopes)
* [Singleton](#singleton)
Expand Down Expand Up @@ -304,16 +303,6 @@ const container = new PumpIt()

container.resolve('key_does_not_exist') // will throw
```

### Resolve context

You can also pass in additional data that will be used in various callbacks that will be called when resolving the key.

```ts
const container = new PumpIt()
const resolveCtx = { foo: 'bar' }
container.resolve('some_key', resolveCtx)
```
## Injection tokens

Injection tokens are the values by which the injection container knows how to resolve registered data. They can be `string`, `Symbol`, or any object.
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@
"homepage": "https://github.com/ivandotv/pumpit#readme",
"devDependencies": {
"@biomejs/biome": "1.8.3",
"@changesets/cli": "^2.27.5",
"@vitest/coverage-v8": "^1.6.0",
"lefthook": "^1.6.16",
"@changesets/cli": "^2.27.7",
"@vitest/coverage-v8": "^2.0.5",
"lefthook": "^1.7.11",
"microbundle": "^0.15.1",
"shx": "^0.3.4",
"typedoc": "^0.26.0",
"typedoc-plugin-markdown": "^4.0.3",
"typescript": "^5.4.5",
"vitest": "^1.6.0"
"typedoc": "^0.26.5",
"typedoc-plugin-markdown": "^4.2.3",
"typescript": "^5.5.4",
"vitest": "^2.0.5"
}
}
Loading

0 comments on commit 28a0548

Please sign in to comment.