forked from hmenyus/node-calls-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
39 lines (28 loc) · 1.22 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
export class PyModule
{
private _type: 'PyModule';
private constructor();
}
export class PyObject
{
private _type: 'PyObject';
private constructor();
}
export interface Interpreter
{
import: (filename: string, allowReimport: boolean) => Promise<PyModule>;
importSync: (filename: string, allowReimport: boolean) => PyModule;
create: (module: PyModule, className: string, ...args: any[]) => Promise<PyObject>;
createSync: (module: PyModule, className: string, ...args: any[]) => PyObject;
call: (module: PyModule | PyObject, functionName: string, ...args: any[]) => Promise<unknown>;
callSync: (module: PyModule | PyObject, functionName: string, ...args: any[]) => unknown;
exec: (module: PyModule | PyObject, codeToRun: string) => Promise<unknown>;
execSync: (module: PyModule | PyObject, codeToRun: string) => unknown;
eval: (module: PyModule | PyObject, codeToRun: string) => Promise<unknown>;
evalSync: (module: PyModule | PyObject, codeToRun: string) => unknown;
fixlink: (fileName: string) => void;
reimport: (directory: string) => void;
addImportPath: (path: string) => void;
developmentMode: (paths: string[]) => void;
}
export const interpreter: Interpreter;