@joist/di 4.0.0-next.27 → 4.0.0-next.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -231,12 +231,12 @@ const url: string = await app.inject(URL_TOKEN);
|
|
|
231
231
|
This allows you to dynamically import services
|
|
232
232
|
|
|
233
233
|
```ts
|
|
234
|
-
const
|
|
234
|
+
const HttpService = new StaticToken('HTTP_SERVICE', () => {
|
|
235
235
|
return import('./http.service.js').then((m) => new m.HttpService());
|
|
236
236
|
});
|
|
237
237
|
|
|
238
238
|
class HackerNewsService {
|
|
239
|
-
#http = inject(
|
|
239
|
+
#http = inject(HttpService);
|
|
240
240
|
|
|
241
241
|
async getData() {
|
|
242
242
|
const http = await this.#http();
|