From ef13eee6cdea27ab130b0bb087392ea068e39d28 Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 27 Oct 2024 15:15:33 +0100 Subject: [PATCH] chore: wip --- fixtures/input/example-0001.ts | 6 ++++++ fixtures/output/example-0001.d.ts | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/fixtures/input/example-0001.ts b/fixtures/input/example-0001.ts index f198ff8..e47e1b9 100644 --- a/fixtures/input/example-0001.ts +++ b/fixtures/input/example-0001.ts @@ -262,4 +262,10 @@ export type ReadonlyDeep = { readonly [P in keyof T]: T[P] extends object ? ReadonlyDeep : T[P] } +export type ConditionalResponse = T extends Array + ? ApiResponse + : T extends object + ? ApiResponse + : ApiResponse + export default dts diff --git a/fixtures/output/example-0001.d.ts b/fixtures/output/example-0001.d.ts index a89b117..bc8ef26 100644 --- a/fixtures/output/example-0001.d.ts +++ b/fixtures/output/example-0001.d.ts @@ -110,6 +110,11 @@ export declare type ComplexUnionIntersection = export declare type ReadonlyDeep = { readonly [P in keyof T]: T[P] extends object ? ReadonlyDeep : T[P] } +export declare type ConditionalResponse = T extends Array + ? ApiResponse + : T extends object + ? ApiResponse + : ApiResponse export { generate, dtsConfig } export type { DtsGenerationOption }