Skip to content

Commit

Permalink
chore: Edit decorator generic type more readable
Browse files Browse the repository at this point in the history
Remove optional overrloading for SuccessResponse & Response type.
Edit SuccessResponse & Response type's generic type more readable.
  • Loading branch information
jackey8616 committed Dec 27, 2020
1 parent c855880 commit a57a4d7
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions packages/runtime/src/decorators/response.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
export function SuccessResponse(name: string | number, description?: string): Function;

export function SuccessResponse<T>(name: string | number, description?: string): Function;

export function SuccessResponse<T>(name: string | number, description?: string): Function {
export function SuccessResponse<HeaderType = {}>(name: string | number, description?: string): Function {
return () => {
return;
};
}

export function Response(name: string | number, description?: string): Function;

export function Response<U>(name: string | number, description?: string): Function;

export function Response<T>(name: string | number, description?: string, example?: T): Function;

export function Response<T, U>(name: string | number, description?: string, example?: T): Function;

export function Response<T, U>(name: string | number, description?: string, example?: T): Function {
export function Response<ExampleType, HeaderType = {}>(name: string | number, description?: string, example?: ExampleType): Function {
return () => {
return;
};
Expand Down

0 comments on commit a57a4d7

Please sign in to comment.