From aced500bf3a8ebb31d9622f8b23fec935e29c6bf Mon Sep 17 00:00:00 2001 From: Guy Bedford Date: Thu, 8 Feb 2024 11:47:11 -0800 Subject: [PATCH] docs: fixup tranpsiling.md formattig --- docs/src/transpiling.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/src/transpiling.md b/docs/src/transpiling.md index a61e9be7d..f824d0bbd 100644 --- a/docs/src/transpiling.md +++ b/docs/src/transpiling.md @@ -159,7 +159,7 @@ These PRs can be implemented by extending the [default map configuration provide > `shimpkg` in the above refers to a published npm package implementation to install per JS ecosystem conventions. This way, polyfill packages can be published to npm. -Upstreaming into the [@bytecodealliance/preview2-shim](https://github.com/bytecodealliance/jco/)[https://github.com/bytecodealliance/jco/tree/main/packages/preview2-shim] package is also possible for WASI proposals that have progressed to Phase 1 in the [WASI proposal stage process](https://github.com/WebAssembly/WASI/blob/main/Proposals.md). +Upstreaming into the [@bytecodealliance/preview2-shim](https://github.com/bytecodealliance/jco/tree/main/packages/preview2-shim) package is also possible for WASI proposals that have progressed to Phase 1 in the [WASI proposal stage process](https://github.com/WebAssembly/WASI/blob/main/Proposals.md). ## Instantiation @@ -169,7 +169,7 @@ When using instantiation mode, the output is a JS module with a single `instanti For async instantiation, the instantiate function takes the following signature: -```js +```ts export async function instantiate( getCoreModule: (path: string) => Promise, imports: { @@ -185,7 +185,7 @@ export async function instantiate( `getCoreModule` can typically be implemented as: -```js +```ts export async function getCoreModule(path: string) { return await WebAssembly.compile(await readFile(new URL(`./${path}`, import.meta.url))); } @@ -193,7 +193,7 @@ export async function getCoreModule(path: string) { For synchronous instantiation, the instantiate function has the following signature: -```js +```ts export function instantiate( getCoreModule: (path: string) => WebAssembly.Module, imports: {