Skip to content

Commit 725e244

Browse files
committed
Add typing for Console module
1 parent cc39b65 commit 725e244

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

Diff for: typings/Resource.d.ts renamed to typings/console.d.ts

+17-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019-2020 Bradley Farias
2+
* Copyright (c) 2022 Richard Lea
33
*
44
* This file is part of the Moddable SDK Tools.
55
*
@@ -18,13 +18,22 @@
1818
*
1919
*/
2020

21-
declare module "Resource" {
22-
class Resource extends HostBuffer {
23-
constructor(path: string);
24-
slice(begin: number, end?: number): ArrayBuffer;
25-
slice(begin: number, end?: number, copy?: boolean): HostBuffer;
26-
static exists(path: string): boolean;
21+
/**
22+
* The `console` module uses `cli` modules to implement the terminal commands.
23+
*/
24+
declare module "console" {
25+
26+
/**
27+
* The `Console` class implements a serial terminal for debugging and diagnostic purposes.
28+
*/
29+
export class Console {
30+
receive(): void
31+
write(): void
32+
resume(): void
33+
suspend(): void
34+
prompt(): void
35+
line(...items: any): void
2736
}
2837

29-
export {Resource as default};
38+
export { Console as default };
3039
}

0 commit comments

Comments
 (0)