DefinitelyTyped/types/webassembly-web-api/webassembly-web-api-tests.ts
2018-07-30 12:15:37 -07:00

19 lines
589 B
TypeScript

const response: Response = new Response();
const promise: Promise<Response> = Promise.resolve(response);
// CompileStreaming - taking Response
// $ExpectType Promise<Module>
WebAssembly.compileStreaming(response);
// CompileStreaming - taking Promise<Response>
// $ExpectType Promise<Module>
WebAssembly.compileStreaming(promise);
// InstantiateStreaming - taking Response
// $ExpectType Promise<ResultObject>
WebAssembly.instantiateStreaming(response);
// InstantiateStreaming - taking Promise<Response>
// $ExpectType Promise<ResultObject>
WebAssembly.instantiateStreaming(promise);