Skip to content

Fix .d.ts type for Transform#afterCompile #2830

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions cli/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string,unknown>;

import { Program, Parser, Module } from "../src";
import binaryen from "../lib/binaryen";
import { Program, Parser } from "../src";

/** Compiler transform base class. */
export abstract class Transform {
Expand All @@ -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<string | null>;
Expand All @@ -276,5 +277,5 @@ export abstract class Transform {
afterInitialize?(program: Program): void | Promise<void>;

/** Called when compilation is complete, before the module is being validated. */
afterCompile?(module: Module): void | Promise<void>;
afterCompile?(module: binaryen.Module): void | Promise<void>;
}