Skip to content

Commit

Permalink
Small adjustments to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
divmgl committed Oct 29, 2023
1 parent c3b8bd3 commit 17fd0dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions packages/example-hello-world/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { Singleton } from "nwire"
import { Container, Service } from "nwire"

type MyContext = {
banner: string
my: MyService
}

export class MyService extends Service<MyContext>(Singleton) {
export class MyService extends Service<MyContext>() {
helloWorld() {
return this.banner
}
Expand Down
4 changes: 2 additions & 2 deletions packages/nwire/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
`nwire` is a package that provides simplified dependency injection in Node.js.

```tsx
import { Container, Injected } from "nwire"
import { Container, Service } from "nwire"

type MyTypedContext = {
banner: string
my: MyService
}

export class MyService extends WithContextProperties(Singleton) {
export class MyService extends Service<MyTypedContext>() {
helloWorld() {
return this.banner
}
Expand Down

0 comments on commit 17fd0dc

Please sign in to comment.