// world root:component/root
export type Files = Array<[string, Uint8Array]>;
export type Maps = Array<[string, string]>;
export type InstantiationMode = InstantiationModeAsync | InstantiationModeSync;
export interface InstantiationModeAsync {
  tag: 'async',
}
export interface InstantiationModeSync {
  tag: 'sync',
}
export type BindingsMode = BindingsModeJs | BindingsModeHybrid | BindingsModeOptimized | BindingsModeDirectOptimized;
export interface BindingsModeJs {
  tag: 'js',
}
export interface BindingsModeHybrid {
  tag: 'hybrid',
}
export interface BindingsModeOptimized {
  tag: 'optimized',
}
export interface BindingsModeDirectOptimized {
  tag: 'direct-optimized',
}
export interface AsyncImportsExports {
  imports: Array<string>,
  exports: Array<string>,
}
export type AsyncMode = AsyncModeSync | AsyncModeJspi;
export interface AsyncModeSync {
  tag: 'sync',
}
export interface AsyncModeJspi {
  tag: 'jspi',
  val: AsyncImportsExports,
}
export interface GenerateOptions {
  name: string,
  noTypescript?: boolean,
  instantiation?: InstantiationMode,
  importBindings?: BindingsMode,
  map?: Maps,
  compat?: boolean,
  noNodejsCompat?: boolean,
  base64Cutoff?: number,
  tlaCompat?: boolean,
  validLiftingOptimization?: boolean,
  tracing?: boolean,
  noNamespacedExports?: boolean,
  guest?: boolean,
  multiMemory?: boolean,
  asyncMode?: AsyncMode,
}
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 EnabledFeatureSet = EnabledFeatureSetList | EnabledFeatureSetAll;
export interface EnabledFeatureSetList {
  tag: 'list',
  val: Array<string>,
}
export interface EnabledFeatureSetAll {
  tag: 'all',
}
export interface TypeGenerationOptions {
  wit: Wit,
  world?: string,
  tlaCompat?: boolean,
  instantiation?: InstantiationMode,
  map?: Maps,
  features?: EnabledFeatureSet,
  guest?: boolean,
  asyncMode?: AsyncMode,
}
/**
* # Variants
* 
* ## `"function"`
* 
* ## `"instance"`
*/
export type ExportType = 'function' | 'instance';
export interface Transpiled {
  files: Files,
  imports: Array<string>,
  exports: Array<[string, ExportType]>,
}
export type * as WasiCliEnvironment023 from './interfaces/wasi-cli-environment.js'; // import wasi:cli/environment@0.2.3
export type * as WasiCliExit023 from './interfaces/wasi-cli-exit.js'; // import wasi:cli/exit@0.2.3
export type * as WasiCliStderr023 from './interfaces/wasi-cli-stderr.js'; // import wasi:cli/stderr@0.2.3
export type * as WasiCliStdin023 from './interfaces/wasi-cli-stdin.js'; // import wasi:cli/stdin@0.2.3
export type * as WasiCliStdout023 from './interfaces/wasi-cli-stdout.js'; // import wasi:cli/stdout@0.2.3
export type * as WasiCliTerminalInput023 from './interfaces/wasi-cli-terminal-input.js'; // import wasi:cli/terminal-input@0.2.3
export type * as WasiCliTerminalOutput023 from './interfaces/wasi-cli-terminal-output.js'; // import wasi:cli/terminal-output@0.2.3
export type * as WasiCliTerminalStderr023 from './interfaces/wasi-cli-terminal-stderr.js'; // import wasi:cli/terminal-stderr@0.2.3
export type * as WasiCliTerminalStdin023 from './interfaces/wasi-cli-terminal-stdin.js'; // import wasi:cli/terminal-stdin@0.2.3
export type * as WasiCliTerminalStdout023 from './interfaces/wasi-cli-terminal-stdout.js'; // import wasi:cli/terminal-stdout@0.2.3
export type * as WasiClocksWallClock023 from './interfaces/wasi-clocks-wall-clock.js'; // import wasi:clocks/wall-clock@0.2.3
export type * as WasiFilesystemPreopens023 from './interfaces/wasi-filesystem-preopens.js'; // import wasi:filesystem/preopens@0.2.3
export type * as WasiFilesystemTypes023 from './interfaces/wasi-filesystem-types.js'; // import wasi:filesystem/types@0.2.3
export type * as WasiIoError023 from './interfaces/wasi-io-error.js'; // import wasi:io/error@0.2.3
export type * as WasiIoStreams023 from './interfaces/wasi-io-streams.js'; // import wasi:io/streams@0.2.3
export type * as WasiRandomRandom023 from './interfaces/wasi-random-random.js'; // import wasi:random/random@0.2.3
export function generate(component: Uint8Array, options: GenerateOptions): Transpiled;
export function generateTypes(name: string, options: TypeGenerationOptions): Files;

export const $init: Promise<void>;
