Skip to content

Commit a22e238

Browse files
committed
chore: wip
chore: wip chore: wip chore: wip chore: wip chore: wip chore: wip chore: wip chore: wip chore: wip
1 parent a516408 commit a22e238

File tree

3 files changed

+266
-89
lines changed

3 files changed

+266
-89
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
## Features
1010

11-
- Fast .d.ts generation _(via isolatedDeclaration)_
11+
- Fast .d.ts generation
1212
- Highly configurable
1313
- Lightweight library
1414
- Cross-platform binary
@@ -32,6 +32,16 @@ pkgx install dtsx # wip
3232

3333
There are two ways of using this ".d.ts generation" tool: _as a library or as a CLI._
3434

35+
_But before you get started, please ensure you enabled `isolatedDeclarations` in your `tsconfig.json` file._
36+
37+
```json
38+
{
39+
"compilerOptions": {
40+
"isolatedDeclaration": true
41+
}
42+
}
43+
```
44+
3545
## Library
3646

3747
Given the npm package is installed, you can use the `generate` function to generate TypeScript declaration files from your project.

fixtures/output/function.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export declare function fetchUsers(): Promise<ResponseData>;
44
export declare function getProduct(id: number): Promise<ApiResponse<Product>>;
55
export declare function authenticate(user: string, password: string): Promise<AuthResponse>;
66
export declare function dts(options?: DtsGenerationOption): BunPlugin;
7-
export declare function loadConfig<T extends Record<string, unknown>>(): unknown;
7+
export declare function loadConfig<T extends Record<string, unknown>>(): void;
88
export declare function processData(data: string): string;
99
export declare function processData(data: number): number;
1010
export declare function processData(data: boolean): boolean;
@@ -13,4 +13,4 @@ export declare function processData(data: unknown): unknown;
1313
export declare function complexAsyncGenerator(): any;
1414
export declare function isUser(value: unknown): value is User;
1515
export declare function extractFunctionSignature(declaration: string): FunctionSignature;
16-
export declare function createApi<T extends Record<string, (...args: any[]) => any>(): unknown;
16+
export declare function createApi<T extends Record<string, (...args: any[]) => any>(): void;

0 commit comments

Comments
 (0)