Skip to content

Commit 7e67a56

Browse files
authored
docs: correct grammatical errors (#574)
* docs: correct grammatical errors * docs: correct grammatical errors
1 parent 264bb14 commit 7e67a56

40 files changed

+177
-177
lines changed

docs/at-glance.md

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

88
- - meta
99
- name: 'description'
10-
content: Designed with ergonomic design, extensive support for TypeScript, modern JavaScript API, optimized for Bun. Offers a unique experience unified type, and end-to-end type safety while maintaining excellent performance.
10+
content: Designed with ergonomic design, extensive support for TypeScript, modern JavaScript API, optimized for Bun. Offers a unique experience with unified types, and end-to-end type safety while maintaining excellent performance.
1111

1212
- - meta
1313
- property: 'og:description'
14-
content: Designed with ergonomic design, extensive support for TypeScript, modern JavaScript API, optimized for Bun. Offers a unique experience unified type, and end-to-end type safety while maintaining excellent performance.
14+
content: Designed with ergonomic design, extensive support for TypeScript, modern JavaScript API, optimized for Bun. Offers a unique experience with unified types, and end-to-end type safety while maintaining excellent performance.
1515
---
1616

1717
<script setup>

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/overview.md

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

88
- - meta
99
- name: 'description'
10-
content: Elysia supports end-to-end type safety with Elysia Eden since start. End-to-end type-safety refers to a system in which every component of the system is checked for type consistency, meaning that data is passed between components only if the types of the data are compatible.
10+
content: Elysia supports end-to-end type safety with Elysia Eden from the start. End-to-end type-safety refers to a system in which every component of the system is checked for type consistency, meaning that data is passed between components only if the types of the data are compatible.
1111

1212
- - meta
1313
- property: 'og:description'
14-
content: Elysia supports end-to-end type safety with Elysia Eden since start. End-to-end type-safety refers to a system in which every component of the system is checked for type consistency, meaning that data is passed between components only if the types of the data are compatible.
14+
content: Elysia supports end-to-end type safety with Elysia Eden from the start. End-to-end type-safety refers to a system in which every component of the system is checked for type consistency, meaning that data is passed between components only if the types of the data are compatible.
1515
---
1616

1717
# End-to-End Type Safety
@@ -23,14 +23,14 @@ End-to-end type safety is like making sure all the pieces of the track match up
2323

2424
For a framework to have end-to-end type safety means you can connect client and server in a type-safe manner.
2525

26-
Elysia provide end-to-end type safety **without code generation** out of the box with RPC-like connector, **Eden**
26+
Elysia provides end-to-end type safety **without code generation** out of the box with an RPC-like connector, **Eden**
2727

2828
<video mute controls>
2929
<source src="/eden/eden-treaty.mp4" type="video/mp4" />
3030
Something went wrong trying to load video
3131
</video>
3232

33-
Others framework that support e2e type safety:
33+
Other frameworks that support e2e type safety:
3434
- tRPC
3535
- Remix
3636
- SvelteKit
@@ -52,20 +52,20 @@ Hover over variable and function to see type definition.
5252
Elysia allows you to change the type on the server and it will be instantly reflected on the client, helping with auto-completion and type-enforcement.
5353

5454
## Eden
55-
Eden is a RPC-like client to connect Elysia **end-to-end type safety** using only TypeScript's type inference instead of code generation.
55+
Eden is an RPC-like client to connect Elysia with **end-to-end type safety** using only TypeScript's type inference instead of code generation.
5656

57-
Allowing you to sync client and server types effortlessly, weighing less than 2KB.
57+
It allows you to sync client and server types effortlessly, weighing less than 2KB.
5858

5959
Eden consists of 2 modules:
6060
1. Eden Treaty **(recommended)**: an improved version RFC version of Eden Treaty
61-
2. Eden Fetch: Fetch-like client with type safety.
61+
2. Eden Fetch: Fetch-like client with type safety
6262

6363
Below is an overview, use-case and comparison for each module.
6464

6565
## Eden Treaty (Recommended)
6666
Eden Treaty is an object-like representation of an Elysia server providing end-to-end type safety and a significantly improved developer experience.
6767

68-
With Eden Treaty we can connect interact Elysia server with full-type support and auto-completion, error handling with type narrowing, and creating type safe unit test.
68+
With Eden Treaty we can interact with an Elysia server with full-type support and auto-completion, error handling with type narrowing, and create type-safe unit tests.
6969

7070
Example usage of Eden Treaty:
7171
```typescript twoslash
@@ -131,5 +131,5 @@ const { data } = await fetch('/name/:name', {
131131
```
132132

133133
::: tip NOTE
134-
Unlike Eden Treaty, Eden Fetch doesn't provide Web Socket implementation for Elysia server
134+
Unlike Eden Treaty, Eden Fetch doesn't provide Web Socket implementation for Elysia server.
135135
:::

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

0 commit comments

Comments
 (0)