Skip to content

Commit

Permalink
fix(client): console message methods
Browse files Browse the repository at this point in the history
  • Loading branch information
danilowoz committed May 23, 2022
1 parent 2d8ed59 commit 1b76dcf
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions sandpack-client/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,19 @@ export interface SandpackErrorMessage {
};
}

export type SandpackMessageConsoleMethods =
| "log"
| "debug"
| "info"
| "warn"
| "error"
| "table"
| "clear"
| "time"
| "timeEnd"
| "count"
| "assert";

export interface BaseSandpackMessage {
type: string;
$id?: number;
Expand Down Expand Up @@ -202,8 +215,8 @@ export type SandpackMessage = BaseSandpackMessage &
}
| {
type: "console";
logs: Array<{
method: string;
log: Array<{
method: SandpackMessageConsoleMethods;
id: string;
data: string[];
}>;
Expand Down

0 comments on commit 1b76dcf

Please sign in to comment.