@stacksjs/dtsx
Version:
A modern, fast .d.ts generation tool, powered by Bun.
17 lines (16 loc) • 1.17 kB
TypeScript
/**
* Process TypeScript source code from a string (for stdin support)
* This is a lightweight module that avoids pulling in heavy dependencies
* like bun Glob, fs/promises, bundler, cache, config, etc.
*/
export declare function processSource(sourceCode: string, filename?: string, keepComments?: boolean, importOrder?: string[], isolatedDeclarations?: boolean): string;
/** Generate declarations through the annotation-first isolated fast path. */
export declare function processSourceIsolated(sourceCode: string, filename?: string, keepComments?: boolean, importOrder?: string[]): string;
/** Generate declarations through the value-aware semantic inference path. */
export declare function processSourceSemantic(sourceCode: string, filename?: string, keepComments?: boolean, importOrder?: string[]): string;
export declare function clearResultCache(): void;
/**
* Fast path for project mode — skips cache lookup/store.
* Use when processing many files once (no cache benefit).
*/
export declare function processSourceDirect(sourceCode: string, filename?: string, keepComments?: boolean, importOrder?: string[], isolatedDeclarations?: boolean): string;