export type Wit = WitSource | WitBinary | WitPath;
export interface WitSource {
  tag: 'source',
  val: string,
}
export interface WitBinary {
  tag: 'binary',
  val: Uint8Array,
}
export interface WitPath {
  tag: 'path',
  val: string,
}
export type Maps = [string, string][];
export interface TypeGenerationOptions {
  wit: Wit,
  world?: string,
  tlaCompat?: boolean,
  instantiation?: boolean,
  map?: Maps,
}
export interface GenerateOptions {
  name: string,
  noTypescript?: boolean,
  instantiation?: boolean,
  map?: Maps,
  compat?: boolean,
  noNodejsCompat?: boolean,
  base64Cutoff?: number,
  tlaCompat?: boolean,
  validLiftingOptimization?: boolean,
}
export type Files = [string, Uint8Array][];
/**
* # Variants
* 
* ## `"function"`
* 
* ## `"instance"`
*/
export type ExportType = 'function' | 'instance';
export interface Transpiled {
  files: Files,
  imports: string[],
  exports: [string, ExportType][],
}
import { Environment } from './interfaces/environment';
import { Exit } from './interfaces/exit';
import { Preopens } from './interfaces/preopens';
import { Stderr } from './interfaces/stderr';
import { Stdin } from './interfaces/stdin';
import { Stdout } from './interfaces/stdout';
import { WallClock } from './interfaces/wall-clock';
import { Filesystem } from './interfaces/filesystem';
import { Streams } from './interfaces/streams';
import { Random } from './interfaces/random';
export function generate(component: Uint8Array | ArrayBuffer, options: GenerateOptions): Transpiled;
export function generateTypes(name: string, options: TypeGenerationOptions): Files;

export const $init: Promise<void>;
