Skip to content

Commit ded7fca

Browse files
committed
📘 doc: update eden to edenTreaty
1 parent d7580f8 commit ded7fca

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

components/landing/eden.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ export type App = typeof app`
5757
<Prism language="typescript">
5858
{{
5959
`\
60-
import { eden } from '@elysiajs/eden'
60+
import { edenTreaty } from '@elysiajs/eden'
6161
import type { App } from './server'
6262

63-
const api = eden<App>('http://localhost')
63+
const api = edenTreaty<App>('http://localhost')
6464

6565
await api.shelf.plushie.put({
6666
name: 'Blåhaj',

components/landing/libs/code.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ const app = new Elysia()
4747
export type App = typeof app
4848
4949
// client.ts
50-
import { eden } from '@elysiajs/eden'
50+
import { edenTreaty } from '@elysiajs/eden'
5151
import type { App } from 'server'
5252
53-
const api = eden<App>('http://0.0.0.0:8080')
53+
const api = edenTreaty<App>('http://0.0.0.0:8080')
5454
5555
// Fully type-safe both client/server like tRPC
5656
await api.auth.signIn.post(data)

docs/blog/integrate-trpc-with-elysia.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,11 @@ bun add @elysia/eden && bun add -d elysia
301301

302302
And in the code:
303303
```typescript
304-
import { eden } from '@elysiajs/eden'
304+
import { edenTreaty } from '@elysiajs/eden'
305305
import type { App } from '../server'
306306

307307
// This now has all type inference from the server
308-
const app = eden<App>('http://localhost:3000')
308+
const app = edenTreaty<App>('http://localhost:3000')
309309

310310
// data will have a value of 'Hello Elysia' and has a type of 'string'
311311
const data = await app.index.get()

docs/introduction.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,12 @@ import { swagger } from '@elysiajs/swagger'
103103
And on the client:
104104
```typescript
105105
// client.ts
106-
import { eden } from '@elysia/eden'
106+
import { edenTreaty } from '@elysia/eden'
107107
import type { Server } from './server'
108108

109-
const app = eden<Server>('http://localhost:8080')
109+
const app = edenTreaty<Server>('http://localhost:8080')
110110

111-
app.signIn.POST({
111+
app.signIn.post({
112112
username: 'saltyaom',
113113
password: 12345678
114114
}).then(console.log)

0 commit comments

Comments
 (0)