Skip to content

Commit

Permalink
🎉 feat: soundness
Browse files Browse the repository at this point in the history
  • Loading branch information
SaltyAom committed Mar 18, 2024
1 parent bc32ad5 commit 023af44
Show file tree
Hide file tree
Showing 8 changed files with 962 additions and 609 deletions.
47 changes: 15 additions & 32 deletions example/a.ts
Original file line number Diff line number Diff line change
@@ -1,33 +1,16 @@
import { Elysia, error, t } from '../src'
import { sucrose } from '../src/sucrose'
import { post, req } from '../test/utils'
import { Elysia } from '../src'

console.log(
sucrose({
handler: function ({ query }) {
query.a
},
afterHandle: [],
beforeHandle: [],
error: [
function a({
query,
query: { a, c: d },
headers: { hello },
...rest
}) {
query.b
rest.query.e
},
({ query: { f } }) => {}
],
mapResponse: [],
onResponse: [],
parse: [],
request: [],
start: [],
stop: [],
trace: [],
transform: []
})
)
const child = new Elysia()
// ? This is only in local
.derive(() => ({
hello: 'world'
}))
/**
* ? Since hello is only in local
* ? It might not be available in global
*
**/
.mapDerive(({ hello }) => ({
hello
}))
.get('/child', ({ hello }) => hello)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "elysia",
"description": "Ergonomic Framework for Human",
"version": "1.0.1",
"version": "1.0.2",
"author": {
"name": "saltyAom",
"url": "https://github.com/SaltyAom",
Expand Down
Loading

0 comments on commit 023af44

Please sign in to comment.