Skip to content

Commit 8a41795

Browse files
committed
docs: correct grammatical errors
1 parent 716b6b4 commit 8a41795

29 files changed

+127
-127
lines changed

docs/blog/elysia-10.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ head:
4545
4646
Elysia 1.0 is the first stable release after development for 1.8 years.
4747

48-
Since started, we have always waiting for a framework that focuses on developer experience, velocity, and how to make writing code for humans, not a machine.
48+
Since we started, we have always been waiting for a framework that focuses on developer experience, velocity, and how to make writing code for humans, not a machine.
4949

5050
We battle-test Elysia in various situations, simulate medium and large-scale projects, shipping code to clients and this is the first version that we felt confident enough to ship.
5151

docs/blog/elysia-11.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ new Elysia()
8989

9090
![jaeger showing collected trace automatically](/blog/elysia-11/jaeger.webp)
9191

92-
Elysia OpenTelemetry is will **collect span of any library compatible OpenTelemetry standard**, and will apply parent and child span automatically.
92+
Elysia OpenTelemetry will **collect span of any library compatible with the OpenTelemetry standard**, and will apply parent and child span automatically.
9393

9494
In the code above, we apply `Prisma` to trace how long each query took.
9595

docs/blog/elysia-12.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ head:
1010

1111
- - meta
1212
- name: 'description'
13-
content: Introducing Adapter for universal runtime suppport, Object macro with resolve, Parser with custom name, WebSocket with lifecycle, TypeBox 0.34 with recursive type, and Eden validation inference.
13+
content: Introducing Adapter for universal runtime support, Object macro with resolve, Parser with custom name, WebSocket with lifecycle, TypeBox 0.34 with recursive type, and Eden validation inference.
1414

1515
- - meta
1616
- property: 'og:description'
17-
content: Introducing Adapter for universal runtime suppport, Object macro with resolve, Parser with custom name, WebSocket with lifecycle, TypeBox 0.34 with recursive type, and Eden validation inference.
17+
content: Introducing Adapter for universal runtime support, Object macro with resolve, Parser with custom name, WebSocket with lifecycle, TypeBox 0.34 with recursive type, and Eden validation inference.
1818

1919
- - meta
2020
- property: 'og:image'
@@ -38,9 +38,9 @@ head:
3838
shadow
3939
>
4040
41-
Named after the song [Φ²](https://youtu.be/b9IkzWO63Fg) from album "At the Fingertip of the Sea" by HoyoMix as used in as in [**"You and Me"**](https://youtu.be/nz_Ra4G57A4).
41+
Named after the song [Φ²](https://youtu.be/b9IkzWO63Fg) from album "At the Fingertip of the Sea" by HoyoMix as used in [**"You and Me"**](https://youtu.be/nz_Ra4G57A4).
4242

43-
Elysia 1.2 focus on commitment to expand universal runtime support and developer experience:
43+
Elysia 1.2 focuses on commitment to expand universal runtime support and developer experience:
4444
- [Adapter](#adapter)
4545
- [Macro with resolve](#macro-with-resolve)
4646
- [Parser](#parser)
@@ -92,7 +92,7 @@ We will continue to expand support for more runtimes in the future starting with
9292
- uWebSocket.js
9393

9494
### Universal runtime API
95-
To be comaptible with different runtime, Elysia now wrap over a hand-picked utility function to provide a consistent API across different runtime.
95+
To be compatible with different runtime, Elysia now wraps over a hand-picked utility function to provide a consistent API across different runtime.
9696

9797
For example, in Bun you may use `Bun.file` to return a file response which is not available in Node.
9898

docs/blog/elysia-13.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ When comparing to the same code **without schema**, we see < 2% performance diff
102102
103103
This is huge.
104104

105-
Previously, you have to choose between safety and performance but as we close the performance gap between using and not using validation. But now you don't have to worry about it.
105+
Previously, you had to choose between safety and performance as we close the performance gap between using and not using validation. But now you don't have to worry about it.
106106

107107
But now, we drop validation overhead from a significant amount to almost near zero without requiring any changes on your side.
108108

@@ -150,13 +150,13 @@ We can then override a public schema by providing a schema in a route handler wh
150150
![Elysia run with default override guard showing schema gets override](/blog/elysia-13/schema-override.webp)
151151
> Elysia run with default override guard
152152
153-
But sometime we **don't want to override** a schema.
153+
But sometimes we **don't want to override** a schema.
154154

155155
Instead we want it to work both allowing us to combine schemas instead of overriding them.
156156

157157
Starting from Elysia 1.3, we can do just that.
158158

159-
We can now tell Elysia to not to override it and instead treat it as its own by providing a schema as **standalone**.
159+
We can now tell Elysia not to override it and instead treat it as its own by providing a schema as **standalone**.
160160

161161
```ts
162162
import { Elysia } from 'elysia'
@@ -170,7 +170,7 @@ new Elysia()
170170
})
171171
```
172172

173-
As a result, we have a results that like merging a local and global schema together.
173+
As a result, we have results that are like merging a local and global schema together.
174174

175175
![Elysia run with standalone merging multiple guard together](/blog/elysia-13/schema-standalone.webp)
176176
> Elysia run with standalone merging multiple guard together
@@ -181,7 +181,7 @@ Elysia's type inference is already extremely fast.
181181

182182
We are really confident in our optimization of type inference and it's faster than most frameworks that use an express-like syntax.
183183

184-
However, our users with really **really** large scale with multiple routes and complex type inference.
184+
However, our users with really **really** large scale applications with multiple routes and complex type inference.
185185

186186
We managed to **reduce type instantiation by half** in most cases, and measured up to 60% improvement in inference speed.
187187

@@ -195,7 +195,7 @@ This should solve the problem with users who use heavy object/class for example
195195
As a result, we should end up with faster IDE auto-completion, suggestion, type checking and Eden Treaty.
196196

197197
## Performance Improvement
198-
We have refactored and optimized a lot of internal code which accumulate up to significant improvements.
198+
We have refactored and optimized a lot of internal code which accumulates up to significant improvements.
199199

200200
### Route Registration
201201

docs/eden/fetch.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ head:
1515
---
1616

1717
# Eden Fetch
18-
A fetch-like alternative to Eden Treaty .
18+
A fetch-like alternative to Eden Treaty.
1919

20-
With Eden Fetch can interact with Elysia server in a type-safe manner using Fetch API.
20+
With Eden Fetch, you can interact with Elysia server in a type-safe manner using Fetch API.
2121

2222
---
2323

docs/eden/treaty/config.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,21 @@ import type { App } from './server'
3434
const api = treaty<App>('localhost:3000')
3535
```
3636

37-
You may or may not specified a protocol for URL endpoint.
37+
You may or may not specify a protocol for URL endpoint.
3838

39-
Elysia will appends the endpoints automatically as follows:
39+
Elysia will append the endpoints automatically as follows:
4040
1. If protocol is specified, use the URL directly
4141
2. If the URL is localhost and ENV is not production, use http
4242
3. Otherwise use https
4343

44-
This also apply to Web Socket as well for determining between **ws://** or **wss://**.
44+
This also applies to Web Socket as well for determining between **ws://** or **wss://**.
4545

4646
---
4747

4848
### Elysia Instance
4949
If Elysia instance is passed, Eden Treaty will create a `Request` class and pass to `Elysia.handle` directly without creating a network request.
5050

51-
This allows us to interact with Elysia server directly without request overhead, or the need start a server.
51+
This allows us to interact with Elysia server directly without request overhead, or the need to start a server.
5252

5353
```typescript
5454
import { Elysia } from 'elysia'
@@ -61,13 +61,13 @@ const app = new Elysia()
6161
const api = treaty(app)
6262
```
6363

64-
If an instance is passed, generic is not needed to be pass as Eden Treaty can infers the type from a parameter directly.
64+
If an instance is passed, generic is not needed to be passed as Eden Treaty can infer the type from a parameter directly.
6565

66-
This patterns is recommended for performing unit tests, or creating a type-safe reverse proxy server or micro-services.
66+
This pattern is recommended for performing unit tests, or creating a type-safe reverse proxy server or micro-services.
6767

6868
## Options
69-
2nd optional parameters for Eden Treaty to customize fetch behavior, accepting parameters as follows:
70-
- [fetch](#fetch) - add default parameters to fetch intialization (RequestInit)
69+
2nd optional parameter for Eden Treaty to customize fetch behavior, accepting parameters as follows:
70+
- [fetch](#fetch) - add default parameters to fetch initialization (RequestInit)
7171
- [headers](#headers) - define default headers
7272
- [fetcher](#fetcher) - custom fetch function eg. Axios, unfetch
7373
- [onRequest](#onrequest) - Intercept and modify fetch request before firing
@@ -87,7 +87,7 @@ treaty<App>('localhost:3000', {
8787
})
8888
```
8989

90-
All parameters that passed to fetch, will be passed to fetcher, which is an equivalent to:
90+
All parameters that are passed to fetch will be passed to fetcher, which is equivalent to:
9191
```typescript
9292
fetch('http://localhost:3000', {
9393
credentials: 'include'
@@ -114,7 +114,7 @@ fetch('localhost:3000', {
114114
})
115115
```
116116

117-
headers may accepts the following as parameters:
117+
headers may accept the following as parameters:
118118
- Object
119119
- Function
120120

@@ -130,7 +130,7 @@ treaty<App>('localhost:3000', {
130130
```
131131

132132
### Function
133-
You may specify a headers as a function to return custom headers based on condition
133+
You may specify headers as a function to return custom headers based on condition
134134

135135
```typescript
136136
treaty<App>('localhost:3000', {
@@ -151,7 +151,7 @@ headers function accepts 2 parameters:
151151
- options `RequestInit`: Parameters that passed through 2nd parameter of fetch
152152

153153
### Array
154-
You may define a headers function as an array if multiple conditions are need.
154+
You may define a headers function as an array if multiple conditions are needed.
155155

156156
```typescript
157157
treaty<App>('localhost:3000', {
@@ -172,7 +172,7 @@ Eden Treaty will **run all functions** even if the value is already returned.
172172
Eden Treaty will prioritize the order headers if duplicated as follows:
173173
1. Inline method - Passed in method function directly
174174
2. headers - Passed in `config.headers`
175-
- If `config.headers` is array, parameters that come after will be prioritize
175+
- If `config.headers` is array, parameters that come after will be prioritized
176176
3. fetch - Passed in `config.fetch.headers`
177177

178178
For example, for the following example:
@@ -190,7 +190,7 @@ api.profile.get({
190190
})
191191
```
192192

193-
This will be results in:
193+
This will result in:
194194
```typescript
195195
fetch('http://localhost:3000', {
196196
headers: {

docs/eden/treaty/response.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ head:
77

88
- - meta
99
- name: 'og:description'
10-
content: Eden Treaty is an object-like representation of an Elysia server, providing an end-to-end type safety, and a significantly improved developer experience. With Eden, we can fetch an API from Elysia server fully type-safe without code generation.
10+
content: Eden Treaty is an object-like representation of an Elysia server, providing end-to-end type safety and a significantly improved developer experience. With Eden, we can fetch an API from Elysia server fully type-safe without code generation.
1111

1212
- - meta
1313
- name: 'og:description'
14-
content: Eden Treaty is an object-like representation of an Elysia server, providing an end-to-end type safety, and a significantly improved developer experience. With Eden, we can fetch an API from Elysia server fully type-safe without code generation.
14+
content: Eden Treaty is an object-like representation of an Elysia server, providing end-to-end type safety and a significantly improved developer experience. With Eden, we can fetch an API from Elysia server fully type-safe without code generation.
1515
---
1616

1717
# Response
@@ -70,7 +70,7 @@ const submit = async (name: string) => {
7070
By default, Elysia infers `error` and `response` types to TypeScript automatically, and Eden will be providing auto-completion and type narrowing for accurate behavior.
7171

7272
::: tip
73-
If the server responds with an HTTP status >= 300, then the value will be always be `null`, and `error` will have a returned value instead.
73+
If the server responds with an HTTP status >= 300, then the value will always be `null`, and `error` will have a returned value instead.
7474

7575
Otherwise, response will be passed to `data`.
7676
:::

docs/eden/treaty/unit-test.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ head:
77

88
- - meta
99
- name: 'og:description'
10-
content: Eden Treaty is an object-like representation of an Elysia server, providing an end-to-end type safety, and a significantly improved developer experience. With Eden, we can fetch an API from Elysia server fully type-safe without code generation.
10+
content: Eden Treaty is an object-like representation of an Elysia server, providing end-to-end type safety and a significantly improved developer experience. With Eden, we can fetch an API from Elysia server fully type-safe without code generation.
1111

1212
- - meta
1313
- name: 'og:description'
14-
content: Eden Treaty is an object-like representation of an Elysia server, providing an end-to-end type safety, and a significantly improved developer experience. With Eden, we can fetch an API from Elysia server fully type-safe without code generation.
14+
content: Eden Treaty is an object-like representation of an Elysia server, providing end-to-end type safety and a significantly improved developer experience. With Eden, we can fetch an API from Elysia server fully type-safe without code generation.
1515
---
1616

1717
# Unit Test
1818
According to [Eden Treaty config](/eden/treaty/config.html#urlorinstance) and [Unit Test](/patterns/unit-test), we may pass an Elysia instance to Eden Treaty directly to interact with Elysia server directly without sending a network request.
1919

20-
We may use this patterns to create a unit test with end-to-end type safety and type-level test all at once.
20+
We may use this pattern to create a unit test with end-to-end type safety and type-level test all at once.
2121

2222
```typescript twoslash
2323
// test/index.test.ts
@@ -29,7 +29,7 @@ const app = new Elysia().get('/hello', 'hi')
2929
const api = treaty(app)
3030

3131
describe('Elysia', () => {
32-
it('return a response', async () => {
32+
it('returns a response', async () => {
3333
const { data } = await api.hello.get()
3434

3535
expect(data).toBe('hi')
@@ -40,7 +40,7 @@ describe('Elysia', () => {
4040
```
4141

4242
## Type safety test
43-
To perform a type safety test, simply run **tsc** to test folders.
43+
To perform a type safety test, simply run **tsc** on test folders.
4444

4545
```bash
4646
tsc --noEmit test/**/*.ts

docs/essential/best-practice.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,26 @@ head:
77

88
- - meta
99
- name: 'description'
10-
content: Elysia is pattern agnostic framework, we leave the decision up to you and your team for coding patterns to use. However, we found that there are several who are using MVC pattern (Model-View-Controller) on Elysia, and found it's hard to decouple and handling with types. This page is a guide to use Elysia with MVC pattern.
10+
content: Elysia is a pattern agnostic framework, we leave the decision up to you and your team for coding patterns to use. However, we found that there are several who are using MVC pattern (Model-View-Controller) on Elysia, and found it's hard to decouple and handle types. This page is a guide to use Elysia with MVC pattern.
1111

1212
- - meta
1313
- property: 'og:description'
14-
content: Elysia is pattern agnostic framework, we the decision up to you and your team for coding patterns to use. However, we found that there are several who are using MVC pattern (Model-View-Controller) on Elysia, and found it's hard to decouple and handling with types. This page is a guide to use Elysia with MVC pattern.
14+
content: Elysia is a pattern agnostic framework, we leave the decision up to you and your team for coding patterns to use. However, we found that there are several who are using MVC pattern (Model-View-Controller) on Elysia, and found it's hard to decouple and handle types. This page is a guide to use Elysia with MVC pattern.
1515
---
1616

1717
# Best Practice
1818

1919
Elysia is a pattern-agnostic framework, leaving the decision of which coding patterns to use up to you and your team.
2020

21-
However, there are several concern from trying to adapt an MVC pattern [(Model-View-Controller)](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller) with Elysia, and found it's hard to decouple and handle types.
21+
However, there are several concerns from trying to adapt an MVC pattern [(Model-View-Controller)](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller) with Elysia, and we found it's hard to decouple and handle types.
2222

23-
This page is a guide to on how to follows Elysia structure best practice combined with MVC pattern but can be adapted to any coding pattern you like.
23+
This page is a guide on how to follow Elysia structure best practices combined with MVC pattern but can be adapted to any coding pattern you like.
2424

2525
## Folder Structure
2626

2727
Elysia is unopinionated about folder structure, leaving you to **decide** how to organize your code yourself.
2828

29-
However, **if you doesn't have a specific structure in mind**, we recommended a feature-based folder structure. Where each feature has its own folder containing controllers, services, models.
29+
However, **if you don't have a specific structure in mind**, we recommend a feature-based folder structure. Where each feature has its own folder containing controllers, services, and models.
3030

3131
```
3232
| src

docs/essential/handler.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ new Elysia()
102102
.listen(3000)
103103
```
104104

105-
Handler maybe a literal value, and can be inlined.
105+
A handler may be a literal value, and can be inlined.
106106

107107
```typescript
108108
import { Elysia, file } from 'elysia'
@@ -113,19 +113,19 @@ new Elysia()
113113
.listen(3000)
114114
```
115115
116-
Using an inline value always returns the same value which is useful to optimize performance for static resource like file.
116+
Using an inline value always returns the same value which is useful to optimize performance for static resources like files.
117117
118118
This allows Elysia to compile the response ahead of time to optimize performance.
119119
120120
::: tip
121121
Providing an inline value is not a cache.
122122
123-
Static Resource value, headers and status can be mutate dynamically using lifecycle.
123+
Static resource values, headers and status can be mutated dynamically using lifecycle.
124124
:::
125125
126126
## Context
127127
128-
**Context** contains a request information which unique for each request, and is not shared except for `store` <small>(global mutable state)</small>.
128+
**Context** contains request information which is unique for each request, and is not shared except for `store` <small>(global mutable state)</small>.
129129
130130
```typescript twoslash
131131
import { Elysia } from 'elysia'
@@ -204,10 +204,10 @@ new Elysia()
204204
205205
<Playground :elysia="handler2" />
206206
207-
It's recommend to use `status` inside main handler as it has better inference:
207+
It's recommended to use `status` inside the main handler as it has better inference:
208208
209209
- allows TypeScript to check if a return value is correctly type to response schema
210-
- autocompletion for type narrowing base on status code
210+
- autocompletion for type narrowing based on status code
211211
- type narrowing for error handling using End-to-end type safety ([Eden](/eden/overview))
212212
213213
### set.status
@@ -251,7 +251,7 @@ new Elysia()
251251
```
252252
253253
### set.headers
254-
Allowing us to append or delete a response headers represent as Object.
254+
Allowing us to append or delete response headers represented as an Object.
255255
256256
```typescript twoslash
257257
import { Elysia } from 'elysia'

0 commit comments

Comments
 (0)