Skip to content

Commit fd4c7ab

Browse files
authored
Fix typos/grammar in method-chaining.md
1 parent cd8c43d commit fd4c7ab

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/patterns/method-chaining.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ head:
1717
# Method Chaining
1818
Elysia heavily **encourages the use of method chaining**.
1919

20-
Because Elysia's type system is complex, method usually introduce a new type to the instance.
20+
Because Elysia's type system is complex, methods usually introduce a new type to the instance.
2121

2222
Using method chaining will help save that new type reference.
2323

@@ -31,9 +31,9 @@ const app = new Elysia()
3131
```
3232
Using this, `state` now returns new `ElysiaInstance` type, introducing `build` into store and replace the current one.
3333

34-
Method chaining now save that new type and pass it to `get`, which is why `get` now have type access of `build`.
34+
Method chaining now saves that new type and passes it to `get`, which is why `get` now has type access of `build`.
3535

36-
Without using method chaning, Elysia doesn't save the new type when introduced, leading to no type inference.
36+
Without using method chaining, Elysia doesn't save the new type when introduced, leading to no type inference.
3737
```typescript
3838
const app = new Elysia()
3939

@@ -45,4 +45,4 @@ app.get('/', ({ store: { build } }) => build)
4545
app.listen(3000)
4646
```
4747

48-
That's why Elysia encourage use of method chaining, not only that it reduce redundant usage of `app.` prefix, but also have better type inference.
48+
That's why Elysia encourage use of method chaining, not only that it reduces redundant usage of the `app.` prefix, but also to provide better type inference.

0 commit comments

Comments
 (0)