@stacksjs/dtsx
Version:
A modern, fast .d.ts generation tool, powered by Bun.
45 lines • 1.71 kB
TypeScript
import type { Declaration, ProcessingContext } from './types';
/**
* Process declarations and convert them to narrow DTS format
*/
export declare function processDeclarations(declarations: Declaration[], context: ProcessingContext, keepComments?: boolean): string;
/**
* Process function declaration to DTS format
*/
export declare function processFunctionDeclaration(decl: Declaration, keepComments?: boolean): string;
/**
* Process variable declaration to DTS format
*/
export declare function processVariableDeclaration(decl: Declaration, keepComments?: boolean): string;
/**
* Process interface declaration to DTS format
*/
export declare function processInterfaceDeclaration(decl: Declaration, keepComments?: boolean): string;
/**
* Process type alias declaration to DTS format
*/
export declare function processTypeDeclaration(decl: Declaration, keepComments?: boolean): string;
/**
* Process class declaration to DTS format
*/
export declare function processClassDeclaration(decl: Declaration, keepComments?: boolean): string;
/**
* Process enum declaration to DTS format
*/
export declare function processEnumDeclaration(decl: Declaration, keepComments?: boolean): string;
/**
* Process import statement
*/
export declare function processImportDeclaration(decl: Declaration): string;
/**
* Process export statement
*/
export declare function processExportDeclaration(decl: Declaration): string;
/**
* Process module/namespace declaration to DTS format
*/
export declare function processModuleDeclaration(decl: Declaration, keepComments?: boolean): string;
/**
* Infer and narrow types from values
*/
export declare function inferNarrowType(value: any, isConst?: boolean): string;