Fix WinRT JavaScript runtime-class interface input typing - #208
Open
leileizhang (lei9444) wants to merge 3 commits into
Open
leileizhang (lei9444) wants to merge 3 commits into
leileizhang (lei9444) wants to merge 3 commits into
Conversation
Keep existing class overload dispatchers while retaining metadata-projected interface aliases as real methods so StorageFile and StorageFolder satisfy their interface input types. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Accept optional trailing commas and format the two existing macro calls required by hosted Rust 1.99. Generated native signatures and behavior are unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Mixed-language test coverageWorkflow status: ✅ Passed
|
Compare real filesystem paths rather than hosted runner short-name spellings, and canonicalize the consumer root so strict TypeScript sees one path identity. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.
Problem
WinRT runtime classes merge overload names while standalone interfaces retain explicit WinMD aliases. Native
StorageFileinputs work withFileIO, but strict TypeScript rejectsStorageFileasIStorageFileandStorageFolderasIStorageFolderbecause the class declarations lack those aliases.Fix
Retain original instance-method aliases during JavaScript projection and emit real JS methods with matching declarations after overload merging. Aliases preserve the declaring interface, vtable slot, conversion, and async behavior. Existing class dispatchers, interface aliases, and
.as(...)views remain unchanged; existing public members win name collisions. No input-type widening, native ABI/production runtime behavior, Python, or release/version changes.A separate CI prerequisite accepts trailing commas in the existing test-hook stub macro and formats two invocations for hosted rustfmt. Its native argument tokens and function bodies are unchanged. Test paths are canonicalized to handle hosted runner short-name aliases without weakening destination checks.
Verification
--strict --skipLibCheck false: the original natural FileIO/copy repro fails before and passes after. Positive file/folder/IStorageItem/IBuffer/IStringableinputs, legacy names and explicit views pass; unrelated Uri and wrong file/folder inputs remain rejected.6258cc1950d0058aef02ec99a6be107e7db43558: Build, mixed-language coverage, and Python artifact verification all pass, including the hosted x64 strict-TS/native matrix. Release publication remains skipped.