@eliseev_s/tolk-tlb-transpiler
Version:
Transpile Tolk structs to TLB definitions and generate TypeScript wrappers for TON blockchain smart contracts
30 lines • 1.16 kB
TypeScript
import type { TolkType, TolkStruct } from './types';
/**
* Generate helper function for loading dictionary from optional cell
* Replaces inline IIFE: (() => { const dictCell = stack.readCellOpt(); return loadDict_X_Y(dictCell); })()
*/
export declare function generateDictLoaderHelper(keyType: TolkType, valueType: TolkType): string;
/**
* Generate helper function for loading optional struct from cell
* Replaces inline IIFE: (() => { const cell = stack.readCellOpt(); return cell === null ? null : loadStruct(cell.beginParse()) })()
*/
export declare function generateOptionalStructLoaderHelper(structName: string): string;
/**
* Collect all unique helper functions needed for the generated code
*/
export declare function collectRequiredHelpers(structs: TolkStruct[], getMethods: {
returnType: TolkType;
parameters: {
type: TolkType;
}[];
}[]): string[];
/**
* Generate all helper functions as a single string
*/
export declare function generateAllHelpers(structs: TolkStruct[], getMethods: {
returnType: TolkType;
parameters: {
type: TolkType;
}[];
}[]): string;
//# sourceMappingURL=codegen-helpers.d.ts.map