Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbbreuer committed Oct 26, 2024
1 parent 64e8811 commit a93b244
Show file tree
Hide file tree
Showing 2 changed files with 200 additions and 41 deletions.
27 changes: 27 additions & 0 deletions fixtures/output/example-0001.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import type { BunPlugin } from 'bun'
import type { DtsGenerationConfig, DtsGenerationOption } from '@stacksjs/dtsx'
import { generate } from '@stacksjs/dtsx'
/**
* Example of const declaration
*/
export declare const conf: { [key: string]: string };

export declare const someObject: {
Expand Down Expand Up @@ -30,17 +33,32 @@ export declare const someObject: {
};
};

/**
* Example of interface declaration
* with another comment in an extra line
*/
export declare interface User {
id: number
name: string
email: string
}

/**
* Example of type declaration
*
* with multiple lines of comments, including an empty line
*/
export declare interface ResponseData {
success: boolean
data: User[]
}

/**
* Example of function declaration
*
*
* with multiple empty lines, including an empty lines
*/
export declare function fetchUsers(): Promise<ResponseData>;

export declare interface ApiResponse<T> {
Expand All @@ -49,6 +67,11 @@ export declare interface ApiResponse<T> {
data: T
}

/**
* Example of another const declaration
*
* with multiple empty lines, including being poorly formatted
*/
declare const settings: { [key: string]: any };

export declare interface Product {
Expand All @@ -57,6 +80,9 @@ export declare interface Product {
price: number
}

/**
* Example of function declaration
*/
export declare function getProduct(id: number): Promise<ApiResponse<Product>>;

export declare interface AuthResponse {
Expand Down Expand Up @@ -103,6 +129,7 @@ export declare type ComplexUnionIntersection =
metadata: Record<string, unknown>
}


export { config } from './config'
export * from './extract'
export * from './generate'
Expand Down
Loading

0 comments on commit a93b244

Please sign in to comment.