Repository navigation
fix(npm): curate TypeScript declarations with Wasm parity - #110
Closed
google-labs-stitch[bot] wants to merge 1 commit into
Closed
google-labs-stitch[bot] wants to merge 1 commit into
google-labs-stitch[bot] wants to merge 1 commit into
Conversation
- Add portable TypeScript facades in src/types.ts and src/wasm.ts - Decode undefined HarmonyConfig.voices to 4 in the Wasm bindings - Route ./wasm through ./dist/wasm.js and ./dist/wasm.d.ts - Export ./pkg/tunelet_bg.wasm and ./tunelet_bg.wasm in package.json - Read file: URL strings and cross-realm URLs in loadTunelet - Verify type parity, strict tsc profiles and esbuild in verify:pack
Contributor
|
Closing as superseded by #123. Hand-maintaining a 573-line src/types.ts duplicates Rust types/rustdoc (against AGENTS.md single-source-of-truth guidance), adds esbuild + 26 platform packages to package-lock.json, and omits WebAssembly.Memory methods required by TS 7.0. |
byteland-app
deleted the
stitch/curated-ts-declarations-wasm-parity-jm1-8c124ae9-d839-483b-a57a-e8b52378a352
branch
November 25, 2026 08:04
Contributor
Author
|
Understood — leaving #110 closed with no further commits pushed to this branch, deferring to #123 so |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request decouples the public TypeScript declarations of
tuneletandtunelet/wasmfrompkg/tunelet.d.ts, fixes{ voices: undefined }deserialization in Wasm, adds.wasmsubpath exports, and enables"file:"URL string support in Node.js.Changes
src/types.tsand atunelet/wasmfacade insrc/wasm.tswith no references to../pkg/tunelet.js,Symbol.dispose,RequestInfo,BufferSource,WebAssemblyor__wbg_*fields.exactOptionalPropertyTypesand includesrc/types.tsandsrc/wasm.tsintsconfig.json.undefinedHarmonyConfig.voicesto4insrc/harmony.rsunder thewasmtarget and declarevoices?: number | undefinedintsifyandsrc/types.tswhile nativepub voices: u8stays unchanged."./wasm"to./dist/wasm.d.tsand./dist/wasm.js, and export"./pkg/tunelet_bg.wasm"and"./tunelet_bg.wasm"inpackage.json.initializeinsrc/index.tsandREADME.mdto read"file:"URL strings and cross-realmfile:URLobjects from disk in Node.js.scripts/verify-pack.mjsto check the twelve archive paths, declaration portability, bidirectional parity betweensrc/types.tsandpkg/tunelet.d.ts, runtime{ voices: undefined }and"file:"URL behavior,esbuild.wasmsubpath resolution, and fourtsc --strict --exactOptionalPropertyTypesconsumer profiles (node,es2023,dom,webworker).Verification
cargo fmt --checkcargo clippy --locked --lib -- -D warningscargo build --locked --releaseRUSTDOCFLAGS="-D warnings" cargo doc --locked --no-depscargo package --list --lockednpm ciRUSTDOCFLAGS="-D warnings" npm run check:wasmnpm run verify:packAutomated PR initiated by user @byteland-app via Stitch Loop.