DefinitelyTyped/types/webassembly-web-api/index.d.ts
Sergey Rubanov 46d57157d9 [WebAssembly] Align bufferSource value type to WebAssembly JS API Specification
According to [WebAssembly JS API specification](https://webassembly.github.io/spec/js-api/#webassembly-namespace) `bufferSource` is of type `BufferSources` which is union of [these types](https://heycam.github.io/webidl/#BufferSource)

importObject is always an object
2018-11-21 15:47:47 +03:00

18 lines
755 B
TypeScript

// Type definitions for the WebAssembly Web API v1
// Project: https://webassembly.org/
// Definitions by: Johannes Henninger <https://github.com/jhenninger>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
/// <reference types="webassembly-js-api" />
/**
* The WebAssembly Web API defines extensions to the JavaScript API made
* available specifically in web browsers. See [WebAssembly Web
* API](https://www.w3.org/TR/wasm-web-api-1/) for more information.
*/
declare namespace WebAssembly {
function compileStreaming(source: Response | Promise<Response>): Promise<Module>;
function instantiateStreaming(source: Response | Promise<Response>, importObject?: object): Promise<ResultObject>;
}