You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/plugins/eden/overview.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,17 +7,17 @@ head:
7
7
8
8
- - meta
9
9
- name: 'og:description'
10
-
content: Eden is an fetch client for an Elysia server with **end-to-end type safety** using only TypeScript's type inference instead of code generation. Allowing you to sync client and server types effortlessly. Eden is consists of 3 modules, "Eden Treaty", a simplified object-like client for communicating with Elysia server. "Eden Fn", call server function on frontend with auto-completion and full-type support. and "Eden Fetch", Fetch-like client for instant type-inference.
10
+
content: Eden is a fetch client for an Elysia server with **end-to-end type safety** using only TypeScript's type inference instead of code generation. Allowing you to sync client and server types effortlessly. Eden consists of 3 modules, "Eden Treaty", a simplified object-like client for communicating with Elysia server. "Eden Fn", call server function on frontend with auto-completion and full-type support, and "Eden Fetch", a Fetch-like client for instant type-inference.
11
11
12
12
- - meta
13
13
- name: 'og:description'
14
-
content: Eden is an fetch client for an Elysia server with **end-to-end type safety** using only TypeScript's type inference instead of code generation. Allowing you to sync client and server types effortlessly. Eden is consists of 3 modules, "Eden Treaty", a simplified object-like client for communicating with Elysia server. "Eden Fn", call server function on frontend with auto-completion and full-type support. and "Eden Fetch", Fetch-like client for instant type-inference.
14
+
content: Eden is a fetch client for an Elysia server with **end-to-end type safety** using only TypeScript's type inference instead of code generation. Allowing you to sync client and server types effortlessly. Eden consists of 3 modules, "Eden Treaty", a simplified object-like client for communicating with Elysia server. "Eden Fn", call server function on frontend with auto-completion and full-type support, and "Eden Fetch", a Fetch-like client for instant type-inference.
15
15
---
16
16
17
17
# Eden
18
-
Eden is an fetch client for an Elysia server with **end-to-end type safety** using only TypeScript's type inference instead of code generation.
18
+
Eden is a fetch client for an Elysia server with **end-to-end type safety** using only TypeScript's type inference instead of code generation.
19
19
20
-
Allowing you to sync client and server types effortlessly, weight less than 2KB.
20
+
Allowing you to sync client and server types effortlessly, weighing less than 2KB.
21
21
22
22
Eden is consists of 3 modules:
23
23
- Eden Treaty: Simplified object-like client for communicating with Elysia server.
@@ -28,9 +28,9 @@ Eden is consists of 3 modules:
28
28
Below is an overview, use-case and comparison for each module.
29
29
30
30
## Eden Treaty (Recommended)
31
-
Eden Treaty is a object-like representation of an Elysia server, providing an end-to-end type safety, and significantly improved developer experience.
31
+
Eden Treaty is an object-like representation of an Elysia server providing end-to-end type safety and a significantly improved developer experience.
32
32
33
-
With Eden Treaty, you can effortlessly connect Elysia server with full-type support and auto-completion, being confident code is free from type-error.
33
+
With Eden Treaty you can effortlessly connect Elysia server with full-type support and auto-completion, being confident that code is free from type-error.
Eden Fn allow you to expose backend functions to run on the frontend with end-to-end type-safety, autocompletion, original JsDoc comment, and "click-to-definition", allowing you to speed up your development cycle.
53
+
Eden Fn allows you to expose backend functions to run on the frontend with end-to-end type-safety, autocompletion, original JsDoc comment, and "click-to-definition", allowing you to speed up your development cycle.
54
54
55
55
```typescript
56
56
import { edenFn } from'@elysiajs/eden'
@@ -66,7 +66,7 @@ const data = await fn.prisma.user.create({
66
66
})
67
67
```
68
68
69
-
As for security concern, you can set allow or deny scopes, or check for authorization header to limit access to functions programatically.
69
+
As for security concern, you can set allow or deny scopes or check for authorization header to limit access to functions programatically.
70
70
71
71
## Eden Fetch
72
72
A fetch-like alternative to Eden Treaty with faster type inference.
@@ -88,7 +88,7 @@ const data = await fetch('/name/:name', {
88
88
})
89
89
```
90
90
91
-
Using Eden Treaty with complex type and lot of routes (more than 500 routes per server) on a low-end development device can lead to slow type inference and auto-completion.
91
+
Using Eden Treaty with a complex type and lot of routes (more than 500 routes per server) on a low-end development device can lead to slow type inference and auto-completion.
92
92
93
93
Eden Fetch is an alternative and solution for fastest type inference possible while providing full type support like Eden Treaty.
0 commit comments