mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-19 18:18:27 -05:00
34 lines
839 B
TypeScript
34 lines
839 B
TypeScript
/* eslint-disable @typescript-eslint/naming-convention */
|
|
|
|
import { PyodideInterface } from 'pyodide';
|
|
|
|
export interface FrameDocument extends Document {
|
|
__initTestFrame: (e: InitTestFrameArg) => Promise<void>;
|
|
__runTest: (
|
|
testString: string
|
|
) => Promise<
|
|
{ pass: boolean } | { err: { message: string; stack?: string } }
|
|
>;
|
|
}
|
|
|
|
export interface PythonDocument extends FrameDocument {
|
|
__initPythonFrame: () => Promise<void>;
|
|
__runPython: (code: string) => Promise<PyodideInterface>;
|
|
}
|
|
|
|
export interface InitTestFrameArg {
|
|
code: {
|
|
contents?: string;
|
|
editableContents?: string;
|
|
original?: { [id: string]: string };
|
|
};
|
|
getUserInput?: (fileName: string) => string;
|
|
loadEnzyme?: () => void;
|
|
transformedPython?: string;
|
|
}
|
|
|
|
export type FrameWindow = Window &
|
|
typeof globalThis & {
|
|
$: typeof $;
|
|
};
|