UNPKG

node-apis

Version:

🚀 Advanced TypeScript API generator with clean architecture, comprehensive testing, and automatic formatting. Generate production-ready Node.js APIs with complete integration test suites.

39 lines • 1.29 kB
/** * TypeScript type parsing service * Parses typePayload interfaces to extract field names and types */ export interface ParsedField { name: string; type: string; optional: boolean; defaultValue?: string; isNested?: boolean; nestedFields?: ParsedField[]; } export interface ParsedTypePayload { fields: ParsedField[]; hasId: boolean; hasPagination: boolean; isEmpty?: boolean; } /** * Parses a typePayload interface from a TypeScript file */ export declare const parseTypePayload: (filePath: string) => Promise<ParsedTypePayload>; /** * Parses all typePayload files in a module's types directory */ export declare const parseModuleTypes: (modulePath: string) => Promise<Record<string, ParsedTypePayload>>; /** * Generates field destructuring pattern for function parameters */ export declare const generateFieldDestructuring: (fields: ParsedField[]) => string; /** * Generates field object for passing to repository functions */ export declare const generateFieldObject: (fields: ParsedField[], excludeFields?: string[]) => string; /** * Converts empty typePayload from {} to Record<string, never> */ export declare const convertEmptyTypePayload: (filePath: string) => Promise<boolean>; //# sourceMappingURL=type-parser.service.d.ts.map