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 35bff54 commit ef13eee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fixtures/input/example-0001.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,4 +262,10 @@ export type ReadonlyDeep<T> = {
readonly [P in keyof T]: T[P] extends object ? ReadonlyDeep<T[P]> : T[P]
}

export type ConditionalResponse<T> = T extends Array<infer U>
? ApiResponse<U[]>
: T extends object
? ApiResponse<T>
: ApiResponse<string>

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 @@ -110,6 +110,11 @@ export declare type ComplexUnionIntersection =
export declare type ReadonlyDeep<T> = {
readonly [P in keyof T]: T[P] extends object ? ReadonlyDeep<T[P]> : T[P]
}
export declare type ConditionalResponse<T> = T extends Array<infer U>
? ApiResponse<U[]>
: T extends object
? ApiResponse<T>
: ApiResponse<string>

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

0 comments on commit ef13eee

Please sign in to comment.