UNPKG

@stacksjs/dtsx

Version:

A modern, fast .d.ts generation tool, powered by Bun.

10 lines (9 loc) 1.06 kB
import { batchParseSourceFiles, getPendingParseCount, getSourceFile, getSourceFileAsync, getSourceFileCacheSize, shouldUseAsyncParsing } from './source-cache'; import type { AsyncParseConfig, CachedSourceFile } from './source-cache'; import type { Declaration } from './types'; export type { AsyncParseConfig, CachedSourceFile }; export declare function clearSourceFileCache(): void; export declare function extractDeclarations(sourceCode: string, filePath: string, keepComments?: boolean, isolatedDeclarations?: boolean): Declaration[]; export declare function extractDeclarationsAsync(sourceCode: string, filePath: string, keepComments?: boolean, config?: AsyncParseConfig): Promise<Declaration[]>; export declare function batchExtractDeclarations(files: Array<{ filePath: string, sourceCode: string, keepComments?: boolean }>, config?: AsyncParseConfig & { concurrency?: number }): Promise<Map<string, Declaration[]>>; export { batchParseSourceFiles, getPendingParseCount, getSourceFile, getSourceFileAsync, getSourceFileCacheSize, shouldUseAsyncParsing };