Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
chore: wip

chore: wip

chore: wip
  • Loading branch information
chrisbbreuer committed Nov 3, 2024
1 parent 3fd45d3 commit 6ecbe9e
Show file tree
Hide file tree
Showing 3 changed files with 190 additions and 300 deletions.
5 changes: 3 additions & 2 deletions fixtures/output/function.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ export declare function fetchUsers(): Promise<ResponseData>;
export declare function getProduct(id: number): Promise<ApiResponse<Product>>;
export declare function authenticate(user: string, password: string): Promise<AuthResponse>;
export declare function dts(options?: DtsGenerationOption): BunPlugin;
export declare function loadConfig <T extends Record<string, unknown>> ({ name, cwd, defaultConfig }: Options<T>): Promise<T>;
export declare function loadConfig<T extends Record<string, unknown>>(): unknown;
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<T extends object>(data: T): T;
export declare function processData(data: unknown): unknown;
export declare function complexAsyncGenerator(): any;
export declare function isUser(value: unknown): value is User;
export declare function extractFunctionSignature(declaration: string): FunctionSignature;
export declare function createApi<T extends Record<string, (...args: any[]) => any>(): unknown;
48 changes: 14 additions & 34 deletions fixtures/output/variable.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,19 @@ export declare const someObject: {
anotherOne: () => unknown;
someArray: Array<1 | 2 | 3>;
someNestedArray: Array<Array<1 | 2 | 3> | Array<4 | 5 | 6 | 7 | 8 | 9 | 10>>;
someNestedArray2: Array<
Array<1 | 2 | 3> |
Array<4 | 5 | 6 | 7 | 8 | 9 | 10> |
'dummy value'
>;
someNestedArray3: Array<
Array<1 | 2 | 3> |
Array<4 | 5 | 6 | 7 | 8 | 9 | 10> |
'dummy value' |
Array<11 | 12 | 13>
>;
someNestedArray2: Array<Array<1 | 2 | 3> | Array<4 | 5 | 6 | 7 | 8 | 9 | 10> | 'dummy value'>;
someNestedArray3: Array<Array<1 | 2 | 3> | Array<4 | 5 | 6 | 7 | 8 | 9 | 10> | 'dummy value' | Array<11 | 12 | 13>>;
someOtherNestedArray: Array<
Array<'some text' | 2 | unknown | (() => void) | unknown> |
Array<4 | 5 | 6 | 7 | 8 | 9 | 10>
>;
someComplexArray: Array<
Array<
{
key: 'value'
}
> |
Array<
{
key2: 'value2'
} |
'test' |
1000
> |
Array<{
key: 'value'
}> |
Array<{
key2: 'value2'
} | 'test' | 1000> |
Array<'some string' | unknown | unknown>
>;
someObject: {
Expand All @@ -55,11 +40,11 @@ export declare const someObject: {
};
someNestedObjectArray: Array<
{
key: 'value'
} |
key: 'value'
} |
{
key2: 'value2'
}
key2: 'value2'
}
>;
someOtherObject: unknown;
someInlineCall2: unknown;
Expand All @@ -80,12 +65,7 @@ export declare const complexArrays: {
readonly [1, 'string', true] |
readonly ['literal', 42, false]
];
mixedArrays: Array<
unknown |
unknown |
((...args: any[]) => unknown) |
((...args: any[]) => unknown)
>
mixedArrays: Array<unknown | unknown | ((...args: any[]) => unknown) | ((...args: any[]) => unknown)>
};
export declare const complexObject: {
handlers: {
Expand All @@ -100,7 +80,7 @@ export declare const complexObject: {
}
};
export declare const methodDecorator: (...args: any[]) => unknown;
export declare const methodDecoratorWithExplicitType: SomeType;
export declare const methodDecoratorWithExplicitType: (...args: any[]) => unknown;
export declare const CONFIG_MAP: {
development: {
features: {
Expand Down
Loading

0 comments on commit 6ecbe9e

Please sign in to comment.