Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbbreuer committed Oct 27, 2024
1 parent ef13eee commit 845a982
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions fixtures/input/example-0001.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,4 +268,13 @@ export type ConditionalResponse<T> = T extends Array<infer U>
? ApiResponse<T>
: ApiResponse<string>

// 4. Complex Function Overloads
export function processData(data: string): string
export function processData(data: number): number
export function processData(data: boolean): boolean
export function processData<T extends object>(data: T): T
export function processData(data: unknown): unknown {
return data
}

export default dts
5 changes: 5 additions & 0 deletions fixtures/output/example-0001.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ export declare type ConditionalResponse<T> = T extends Array<infer U>
: T extends object
? ApiResponse<T>
: ApiResponse<string>
export declare function processData(data: string): string;
export declare function processData(data: number): number;
export declare function processData(data: boolean): boolean;
export declare function processData<T extends object>(data: T): T;
export declare function processData(data: unknown): unknown;

export { generate, dtsConfig }
export type { DtsGenerationOption }
Expand Down

0 comments on commit 845a982

Please # to comment.