-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* io console log * implement console log for web * log for web * add console to io * io.console.error
- Loading branch information
1 parent
6b4a60b
commit 446329f
Showing
7 changed files
with
77 additions
and
36 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,13 +1,23 @@ | ||
/** @typedef {(log: string) => void} Logger */ | ||
|
||
/** | ||
* @typedef {{ | ||
* readonly log: Logger, | ||
* readonly error: Logger | ||
* }} Console | ||
*/ | ||
|
||
/** | ||
* @typedef {{ | ||
* readonly read: (path: string) => Promise<Uint8Array>, | ||
* readonly append: (path: string, buffer: Uint8Array) => Promise<void>, | ||
* readonly write: (path: string, buffer: Uint8Array) => Promise<void>, | ||
* readonly rename: (oldPath: string, newPath: string) => Promise<void> | ||
* readonly fetch: (url: string) => Promise<Response> | ||
* readonly document: Document | undefined | ||
* }} IO | ||
*/ | ||
* readonly read: (path: string) => Promise<Uint8Array>, | ||
* readonly append: (path: string, buffer: Uint8Array) => Promise<void>, | ||
* readonly write: (path: string, buffer: Uint8Array) => Promise<void>, | ||
* readonly rename: (oldPath: string, newPath: string) => Promise<void> | ||
* readonly fetch: (url: string) => Promise<Response> | ||
* readonly console: Console | ||
* readonly document: Document | undefined | ||
* }} IO | ||
*/ | ||
|
||
export default { | ||
} |
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
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
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