twoslash-python
Version:
Twoslash generator for Python - Enhance your Python documentation with TypeScript-like type information
30 lines • 1.2 kB
TypeScript
import type { TwoslashShikiReturn } from '@shikijs/twoslash/core';
import type { CreateTwoslashOptions, TwoslashExecuteOptions } from 'twoslash';
export interface PythonCompilerOptions {
}
export interface PythonSpecificOptions {
/**
* Python Compiler options
*/
pythonCompilerOptions?: Partial<PythonCompilerOptions>;
}
export interface CreateTwoslashPythonOptions extends CreateTwoslashOptions, PythonSpecificOptions {
/**
* Render the generated code in the output instead of the Python file
*
* @default false
*/
debugShowGeneratedCode?: boolean;
}
export interface TwoslashPythonExecuteOptions extends TwoslashExecuteOptions, PythonSpecificOptions {
}
export interface PythonOptions {
json_file_path: string | undefined;
}
type TwoslashShikiFunctionPython = {
(code: string, lang?: string, options?: TwoslashExecuteOptions, pythonOptions?: PythonOptions): TwoslashShikiReturn;
getCacheMap: () => undefined;
};
declare function createTwoslasherPython(createOptions?: CreateTwoslashPythonOptions): TwoslashShikiFunctionPython;
export { createTwoslasherPython, type TwoslashShikiFunctionPython };
//# sourceMappingURL=twoslasher.d.ts.map