Skip to content

Commit

Permalink
Add typing for Console module
Browse files Browse the repository at this point in the history
  • Loading branch information
chigix committed Feb 14, 2023
1 parent cc39b65 commit 725e244
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions typings/Resource.d.ts → typings/console.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2020 Bradley Farias
* Copyright (c) 2022 Richard Lea
*
* This file is part of the Moddable SDK Tools.
*
Expand All @@ -18,13 +18,22 @@
*
*/

declare module "Resource" {
class Resource extends HostBuffer {
constructor(path: string);
slice(begin: number, end?: number): ArrayBuffer;
slice(begin: number, end?: number, copy?: boolean): HostBuffer;
static exists(path: string): boolean;
/**
* The `console` module uses `cli` modules to implement the terminal commands.
*/
declare module "console" {

/**
* The `Console` class implements a serial terminal for debugging and diagnostic purposes.
*/
export class Console {
receive(): void
write(): void
resume(): void
suspend(): void
prompt(): void
line(...items: any): void
}

export {Resource as default};
export { Console as default };
}

0 comments on commit 725e244

Please sign in to comment.