Skip to content

Commit a6c82c5

Browse files
committed
type conflict workaround
1 parent 1f3ac90 commit a6c82c5

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

packages/core/src/console.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ class TerminalConsoleCache extends EventEmitter {
107107
const mockStdout = new CapturedWritableStream("stdout", capture)
108108
const mockStderr = new CapturedWritableStream("stderr", capture)
109109

110+
// TODO: The Console constructor doesn't return a full Console interface implementation,
111+
// it only provides a subset of methods (log, info, warn, error, debug, etc.).
112+
// TypeScript's Console interface requires all methods (assert, clear, count, etc.).
113+
// Using 'as any' as a workaround since we override the methods we use immediately after.
110114
global.console = new Console({
111115
stdout: mockStdout,
112116
stderr: mockStderr,
@@ -116,7 +120,7 @@ class TerminalConsoleCache extends EventEmitter {
116120
breakLength: 80,
117121
depth: 2,
118122
},
119-
})
123+
}) as any
120124
}
121125

122126
private overrideConsoleMethods(): void {

0 commit comments

Comments
 (0)