Skip to content

Commit 26e78f8

Browse files
authored
Merge pull request #76 from arungurung/patch-1
fix: typo
2 parents 95cbf24 + 78c0bdc commit 26e78f8

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

docs/concept/explicit-body.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ app.post('/', ({ body }) => body, {
3131
})
3232
```
3333

34-
Elysia read the body schema and found that, the type is entirely an object, so it's likely that the body will be JSON, Elysia then pick the JSON body parser function ahead of time and try to parse the body.
34+
Elysia read the body schema and found that, the type is entirely an object, so it's likely that the body will be JSON. Elysia then picks the JSON body parser function ahead of time and tries to parse the body.
3535

36-
Here's a criteria that Elysia use to pick up type of body parser
36+
Here's a criteria that Elysia uses to pick up type of body parser
3737

3838
- `application/json`: body typed as `t.Object`
3939
- `multipart/form-data`: body typed as `t.Object`, and is 1 level deep with `t.File`
@@ -43,7 +43,7 @@ Here's a criteria that Elysia use to pick up type of body parser
4343
This allows Elysia to optimize body parser ahead of time, and reduce overhead in compile time.
4444

4545
## Explicit Content Type
46-
However, is some scenario that Elysia fail to pick the correct body parser function, you can explicitly tell Elysia to use a certain function by specifying `type`
46+
However, in some scenario if Elysia fails to pick the correct body parser function, you can explicitly tell Elysia to use a certain function by specifying `type`
4747

4848
```ts
4949
app.post('/', ({ body }) => body, {
@@ -52,7 +52,7 @@ app.post('/', ({ body }) => body, {
5252
})
5353
```
5454

55-
This allows you to control Elysia behavior for picking body parser function to fits your need in complex scenario.
55+
This allows you to control Elysia behavior for picking body parser function to fit your needs in a complex scenario.
5656

5757
`type` may be one of the following:
5858
```ts
@@ -71,4 +71,4 @@ type ContentType = |
7171
| 'application/x-www-form-urlencoded'
7272
```
7373
74-
You can extends Elysia by adding a custom body parser function yourself with `onParse`, see [body parser](/patterns/body-parser).
74+
You can extend Elysia by adding a custom body parser function yourself with `onParse`, see [body parser](/patterns/body-parser).

docs/concept/guard.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Suppose you have many shared local hooks.
2121
Instead of duplicating an existing hook, you can define a shared hook scope using `guard`.
2222

2323
---
24-
**Guard** lets you inject multiple life-cycle events into multiple routes at once. Guard is useful when you have listen to same life-cycle events in the multiple routes, for example: logging, schema validation, or error handling.
24+
**Guard** lets you inject multiple life-cycle events into multiple routes at once. Guard is useful when you have to listen to the same life-cycle event in multiple routes, for example: logging, schema validation, or error handling.
2525

2626
To encapsulate all hooks into the scope, instead of writing:
2727
```typescript

docs/concept/plugin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const app = new Elysia()
8989
Config type will be inferred into `use`, generating auto completion and type strict as intend.
9090

9191
## Plugin deduplication
92-
By default, Elysia will registered any plugin and handle type definitions which when using multiple times will results in a multiple duplication of setting value or routes.
92+
By default, Elysia will register any plugin and handle type definitions which when using multiple times will results in a multiple duplication of setting value or routes.
9393

9494
This can be fixed by providing name and optional seeds to help Elysia identify instance duplication:
9595
```ts

docs/concept/schema.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The schema consists of:
2525
- params - validate path parameters.
2626
- header - validate request's headers.
2727
- response - validate response type.
28-
- detail - Explicitly define what can route does, see ([creating documentation](/patterns/creating-documentation)) for more explanation.
28+
- detail - Explicitly define what a route can do, see ([creating documentation](/patterns/creating-documentation)) for more explanation.
2929

3030
Schema is defined as:
3131
- Locally: in a handler

0 commit comments

Comments
 (0)