-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[browser] rename internal JSImports to camelCase #122231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
radekdoulik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR renames internal JavaScript import functions from snake_case to camelCase convention, improving naming consistency across the browser WebAssembly runtime. The changes affect the TypeScript export definitions and all corresponding C# JSImport attribute declarations.
- Updates TypeScript exports in
exports-internal.tsto use camelCase naming - Updates all C# JSImport declarations to match the new TypeScript export names
- Covers interop functions, WebSocket operations, and HTTP handler functions
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/mono/browser/runtime/exports-internal.ts | Renames TypeScript exports from snake_case to camelCase (e.g., get_property → getProperty, ws_wasm_create → wsCreate, http_wasm_fetch → httpFetch) |
| src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System/Runtime/InteropServices/JavaScript/Utils.cs | Updates test utility JSImport declarations to use new camelCase names for setProperty and getProperty |
| src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Interop/JavaScriptImports.Generated.cs | Updates all core JavaScript interop JSImport declarations to use camelCase names |
| src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/BrowserWebSockets/BrowserInterop.cs | Updates WebSocket-related JSImport declarations to use new camelCase names (e.g., wsCreate, wsOpen, wsSend) |
| src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpInterop.cs | Updates HTTP handler JSImport declarations to use new camelCase names (e.g., httpFetch, httpSupportsStreamingRequest) |
Contributes to #120703