Type Alias RubyComponentInstantiator

RubyComponentInstantiator: (
    getCoreModule: (path: string) => WebAssembly.Module,
    importObject: any,
    instantiateCore?: (
        module: WebAssembly.Module,
        imports: Record<string, any>,
    ) => WebAssembly.Instance | Promise<WebAssembly.Instance>,
) => Promise<{ rubyRuntime: typeof RubyJsRubyRuntime }>

A function type that instantiates a Ruby component

Type declaration

    • (
          getCoreModule: (path: string) => WebAssembly.Module,
          importObject: any,
          instantiateCore?: (
              module: WebAssembly.Module,
              imports: Record<string, any>,
          ) => WebAssembly.Instance | Promise<WebAssembly.Instance>,
      ): Promise<{ rubyRuntime: typeof RubyJsRubyRuntime }>
    • Parameters

      • getCoreModule: (path: string) => WebAssembly.Module
      • importObject: any
      • OptionalinstantiateCore: (
            module: WebAssembly.Module,
            imports: Record<string, any>,
        ) => WebAssembly.Instance | Promise<WebAssembly.Instance>

      Returns Promise<{ rubyRuntime: typeof RubyJsRubyRuntime }>