Skip to content

Commit

Permalink
Fix loader import object definition (AssemblyScript#1193)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxGraey authored Mar 26, 2020
1 parent 346830e commit e07602c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/loader/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ export interface ResultObject {
type ImportValue = Function | WebAssembly.Global | WebAssembly.Memory | WebAssembly.Table | number;

/** WebAssembly imports with two levels of nesting. */
export interface Imports extends Record<string, Record<string, ImportValue>> {
export type Imports = {
env?: {
memory?: WebAssembly.Memory,
table?: WebAssembly.Table,
seed?: () => number,
abort?(msg: number, file: number, line: number, column: number): void,
trace?(msg: number, numArgs?: number, ...args: number[]): void
};
}
memory?: WebAssembly.Memory;
table?: WebAssembly.Table;
seed?(): number;
abort?(msg: number, file: number, line: number, column: number): void;
trace?(msg: number, numArgs?: number, ...args: number[]): void;
} & Record<string, ImportValue>;
} & Record<string, Record<string, ImportValue>>;

/** Utility mixed in by the loader. */
export interface ASUtil {
Expand Down

0 comments on commit e07602c

Please sign in to comment.