diff options
author | 2022-11-09 15:40:40 -0800 | |
---|---|---|
committer | 2022-11-09 15:40:40 -0800 | |
commit | f7f1b604443c030afe29d1059b90f72c69afe081 (patch) | |
tree | 8f2397447b2a84dab02850007264b72cc565f5d6 /packages/bun-wasm/index.ts | |
parent | da257336b0b70df8c31da647496899cf70670000 (diff) | |
download | bun-f7f1b604443c030afe29d1059b90f72c69afe081.tar.gz bun-f7f1b604443c030afe29d1059b90f72c69afe081.tar.zst bun-f7f1b604443c030afe29d1059b90f72c69afe081.zip |
Add bun-types, add typechecking, add `child_process` types (#1475)
* Add bun-types to packages
* Improve typing
* Fix types in tests
* Fix dts tests
* Run formatter
* Fix all type errors
* Add strict mode, fix type errors
* Add ffi changes
* Move workflows to root
* Add workflows
* Remove labeler
* Add child_process types
* Fix synthetic defaults issue
* Remove docs
* Move scripts
* Run prettier
* Include examples in typechecking
* captureStackTrace types
* moved captureStackTrace types to globals
* Address reviews
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu>
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
Diffstat (limited to '')
-rw-r--r-- | packages/bun-wasm/index.ts | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/packages/bun-wasm/index.ts b/packages/bun-wasm/index.ts index d886a2cda..b72400661 100644 --- a/packages/bun-wasm/index.ts +++ b/packages/bun-wasm/index.ts @@ -1,3 +1,4 @@ +// @ts-nocheck import { ByteBuffer } from "peechy/bb"; import { decodeScanResult, @@ -189,7 +190,7 @@ export class Bun { if (globalThis?.WebAssembly?.instantiateStreaming) { Bun.wasm_source = await globalThis.WebAssembly.instantiateStreaming( fetch(url), - { env: env, wasi_snapshot_preview1: Wasi } + { env: env, wasi_snapshot_preview1: Wasi }, ); } else if (typeof window !== "undefined") { const resp = await fetch(url); @@ -198,7 +199,7 @@ export class Bun { { env: env, wasi_snapshot_preview1: Wasi, - } + }, ); // is it node? } else { @@ -210,7 +211,7 @@ export class Bun { { env: env, wasi_snapshot_preview1: Wasi, - } + }, ); } @@ -225,7 +226,7 @@ export class Bun { static transformSync( content: Uint8Array | string, file_name: string, - loader?: Loader + loader?: Loader, ): TransformResponse { if (!Bun.has_initialized) { throw "Please run await Bun.init(wasm_url) before using this."; @@ -264,7 +265,7 @@ export class Bun { // @ts-ignore loader: normalizeLoader(file_name, loader), }, - bb + bb, ); const data = bb.toUint8Array(); @@ -285,7 +286,7 @@ export class Bun { static scan( content: Uint8Array | string, file_name: string, - loader?: Loader + loader?: Loader, ): ScanResult { if (!Bun.has_initialized) { throw "Please run await Bun.init(wasm_url) before using this."; @@ -316,7 +317,7 @@ export class Bun { // @ts-ignore loader: normalizeLoader(file_name, loader), }, - bb + bb, ); const data = bb.toUint8Array(); |