diff --git a/fixtures/wip/type.ts b/fixtures/input/type.ts similarity index 100% rename from fixtures/wip/type.ts rename to fixtures/input/type.ts diff --git a/fixtures/output/type.d.ts b/fixtures/output/type.d.ts new file mode 100644 index 0000000..4cb40b2 --- /dev/null +++ b/fixtures/output/type.d.ts @@ -0,0 +1,48 @@ +import type { DtsGenerationOption } from '@stacksjs/dtsx'; + +export type { DtsGenerationOption }; +export declare type AuthStatus = 'authenticated' | 'unauthenticated' + +export type ComplexUnionIntersection = + | (User & { role: 'admin' }) + | (Product & { category: string }) + & { + metadata: Record + } +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 declare type EventType = 'click' | 'focus' | 'blur' +export type ElementType = 'button' | 'input' | 'form' +export declare type EventHandler = `on${Capitalize}${Capitalize}` + +export type RecursiveObject = { + id: string + children?: RecursiveObject[] + parent?: RecursiveObject + metadata: Record +} +export declare type UserId = string & { readonly __brand: unique symbol } +export declare type DeepPartial = T extends object ? { + [P in keyof T]?: DeepPartial +} : T +export declare type DeepRequired = T extends object ? { + [P in keyof T]-?: DeepRequired +} : T +export declare type PolymorphicComponent

= { + ( + props: { as?: C } & Omit, keyof P> & P + ): React.ReactElement | null +} +export declare type DynamicRecord = { + [P in K]: P extends number + ? Array + : P extends string + ? Record + : never +} \ No newline at end of file