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 { ImportsEnvironment } from './imports/environment';
import { ImportsExit } from './imports/exit';
import { ImportsPreopens } from './imports/preopens';
import { ImportsStderr } from './imports/stderr';
import { ImportsStdin } from './imports/stdin';
import { ImportsStdout } from './imports/stdout';
import { ImportsWallClock } from './imports/wall-clock';
import { ImportsFilesystem } from './imports/filesystem';
import { ImportsStreams } from './imports/streams';
import { ImportsRandom } from './imports/random';
export function generate(component: Uint8Array | ArrayBuffer, options: GenerateOptions): Transpiled;
export function generateTypes(name: string, options: TypeGenerationOptions): Files;

export const $init: Promise<void>;
