Skip to content

Commit

Permalink
🧹 chore: fix type inference to 200 when not provided
Browse files Browse the repository at this point in the history
  • Loading branch information
SaltyAom committed Sep 20, 2023
1 parent 2573d5e commit 5e9edfb
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 13 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# 0.7.3 - 21 Sep 2023
Bug fix:
- resolve 200 by default when type is not provided

# 0.7.2 - 20 Sep 2023
Bug Fix:
- Decorator and Store is resolved as `undefined` in `onError` hook
Bug fix:
- decorator and store is resolved as `undefined` in `onError` hook
- deepMerge with Module object
- Retain comment in `.d.ts`

Expand Down
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": "0.7.2",
"version": "0.7.3",
"author": {
"name": "saltyAom",
"url": "https://github.com/SaltyAom",
Expand Down
60 changes: 50 additions & 10 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1666,7 +1666,11 @@ export default class Elysia<
? {
200: ReturnType<Function>
}
: Route['response']
: Route['response'] extends { 200: any }
? Route['response']
: {
200: Route['response']
}
}
}
}
Expand Down Expand Up @@ -1733,7 +1737,11 @@ export default class Elysia<
? {
200: ReturnType<Function>
}
: Route['response']
: Route['response'] extends { 200: any }
? Route['response']
: {
200: Route['response']
}
}
}
}
Expand Down Expand Up @@ -1800,7 +1808,11 @@ export default class Elysia<
? {
200: ReturnType<Function>
}
: Route['response']
: Route['response'] extends { 200: any }
? Route['response']
: {
200: Route['response']
}
}
}
}
Expand Down Expand Up @@ -1867,7 +1879,11 @@ export default class Elysia<
? {
200: ReturnType<Function>
}
: Route['response']
: Route['response'] extends { 200: any }
? Route['response']
: {
200: Route['response']
}
}
}
}
Expand Down Expand Up @@ -1934,7 +1950,11 @@ export default class Elysia<
? {
200: ReturnType<Function>
}
: Route['response']
: Route['response'] extends { 200: any }
? Route['response']
: {
200: Route['response']
}
}
}
}
Expand Down Expand Up @@ -2001,7 +2021,11 @@ export default class Elysia<
? {
200: ReturnType<Function>
}
: Route['response']
: Route['response'] extends { 200: any }
? Route['response']
: {
200: Route['response']
}
}
}
}
Expand Down Expand Up @@ -2063,7 +2087,11 @@ export default class Elysia<
? {
200: ReturnType<Function>
}
: Route['response']
: Route['response'] extends { 200: any }
? Route['response']
: {
200: Route['response']
}
}
}
}
Expand Down Expand Up @@ -2130,7 +2158,11 @@ export default class Elysia<
? {
200: ReturnType<Function>
}
: Route['response']
: Route['response'] extends { 200: any }
? Route['response']
: {
200: Route['response']
}
}
}
}
Expand Down Expand Up @@ -2197,7 +2229,11 @@ export default class Elysia<
? {
200: ReturnType<Function>
}
: Route['response']
: Route['response'] extends { 200: any }
? Route['response']
: {
200: Route['response']
}
}
}
}
Expand Down Expand Up @@ -2461,7 +2497,11 @@ export default class Elysia<
? {
200: ReturnType<Function>
}
: Response
: Route['response'] extends { 200: any }
? Route['response']
: {
200: Route['response']
}
}
: never
}
Expand Down

0 comments on commit 5e9edfb

Please sign in to comment.