UNPKG

python2ib

Version:

Convert Python code to IB Pseudocode format

58 lines 2.31 kB
/** * Configuration types for Python to IB Pseudocode conversion */ /** Output format options */ export type OutputFormat = 'plain' | 'markdown'; /** Indentation style options */ export type IndentStyle = 'spaces' | 'tabs'; /** Main configuration interface */ export interface ConvertOptions { /** Output format (default: 'plain') */ format?: OutputFormat; /** Indentation style (default: 'spaces') */ indentStyle?: IndentStyle; /** Number of spaces/tabs per indent level (default: 4) */ indentSize?: number; /** Whether to include line numbers in output (default: false) */ includeLineNumbers?: boolean; /** Whether to include original Python code as comments (default: false) */ includeOriginalCode?: boolean; /** Whether to validate IB Pseudocode syntax (default: true) */ validateSyntax?: boolean; /** Whether to preserve empty lines (default: true) */ preserveEmptyLines?: boolean; /** Enable strict mode for validation (default: false) */ strictMode?: boolean; /** Normalize indentation in output */ normalizeIndentation?: boolean; /** Custom variable name mappings */ variableMapping?: Record<string, string>; /** Custom function name mappings */ functionMapping?: Record<string, string>; /** Whether to preserve comments from original code */ preserveComments?: boolean; /** Custom operator mappings */ customOperators?: Record<string, string>; /** Custom keyword mappings */ customKeywords?: Record<string, string>; /** Output formatting options */ outputOptions?: { includeLineNumbers?: boolean; includeComments?: boolean; wrapInCodeBlock?: boolean; }; /** Conversion rule options */ conversionRules?: { forceExplicitTypes?: boolean; convertFStrings?: boolean; expandCompoundAssignments?: boolean; simplifyExpressions?: boolean; }; } /** Default configuration */ export declare const DEFAULT_CONFIG: Required<ConvertOptions>; /** Merge user options with defaults */ export declare function mergeConfig(options?: ConvertOptions): Required<ConvertOptions>; /** Validation for configuration options */ export declare function validateConfig(config: ConvertOptions): string[]; //# sourceMappingURL=config.d.ts.map