From d59621564d1cc617c89c59e6b231a3df16595c2e Mon Sep 17 00:00:00 2001 From: CountBleck Date: Sun, 24 Mar 2024 08:53:06 -0700 Subject: [PATCH] Fix .d.ts type for Transform#afterCompile --- cli/index.d.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cli/index.d.ts b/cli/index.d.ts index 16e070529e..928d743289 100644 --- a/cli/index.d.ts +++ b/cli/index.d.ts @@ -240,7 +240,8 @@ export function createMemoryStream(fn?: (chunk: Uint8Array | string) => void): M /** Compatible TypeScript compiler options for syntax highlighting etc. */ export const tscOptions: Record; -import { Program, Parser, Module } from "../src"; +import binaryen from "../lib/binaryen"; +import { Program, Parser } from "../src"; /** Compiler transform base class. */ export abstract class Transform { @@ -258,7 +259,7 @@ export abstract class Transform { readonly stderr: OutputStream; /** Logs a message to console. */ - readonly log: typeof console.log; + readonly log: typeof console.error; /** Reads a file from disk. */ readFile(filename: string, baseDir: string): (string | null) | Promise; @@ -276,5 +277,5 @@ export abstract class Transform { afterInitialize?(program: Program): void | Promise; /** Called when compilation is complete, before the module is being validated. */ - afterCompile?(module: Module): void | Promise; + afterCompile?(module: binaryen.Module): void | Promise; }