-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: rename
Console
to ConsoleAPI
because it's just a wrapper a…
…nd simplify code
- Loading branch information
1 parent
7cba7fd
commit c529e93
Showing
4 changed files
with
10 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
import type { PyProxy } from "pyodide/ffi"; | ||
|
||
export class Result extends PyProxy { | ||
export class Result { | ||
status: "complete" | "incomplete" | "syntax-error"; | ||
formatted_error?: string; | ||
async get_repr(): Promise<string | undefined>; | ||
} | ||
|
||
class PyodideConsole extends PyProxy { | ||
class EnhancedConsole { | ||
stdout_callback(out: string); | ||
stderr_callback(err: string); | ||
pop(): void; | ||
} | ||
|
||
export class Console { | ||
export class ConsoleAPI { | ||
complete(source: string): [string[], number]; | ||
console: PyodideConsole; | ||
console: EnhancedConsole; | ||
async push(line: string): Result; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters