mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-25 04:20:02 +00:00
17 lines
497 B
TypeScript
17 lines
497 B
TypeScript
import type * as JsxRuntime from 'react/jsx-runtime';
|
|
import type { Expression, Program } from 'estree-jsx';
|
|
|
|
export interface JSExecutor {
|
|
program: (program: Program, context: Record<string, unknown>) => unknown;
|
|
expression: (expression: Expression, context: Record<string, unknown>) => unknown;
|
|
/**
|
|
* get all exports in executed program/statements
|
|
*/
|
|
getExports: () => Record<string, unknown>;
|
|
}
|
|
|
|
export interface JSExecutorConfig {
|
|
jsx: typeof JsxRuntime;
|
|
filePath: string;
|
|
}
|