Skip to content

[browser] Export useful browser tuntime TypeScript types#127084

Open
elringus wants to merge 2 commits intodotnet:mainfrom
elringus:feat/export-wasm-types
Open

[browser] Export useful browser tuntime TypeScript types#127084
elringus wants to merge 2 commits intodotnet:mainfrom
elringus:feat/export-wasm-types

Conversation

@elringus
Copy link
Copy Markdown

@elringus elringus commented Apr 17, 2026

This exports the browser asset-related types from the public TypeScript entrypoints for both Mono and CoreCLR.

These types were already defined in the underlying runtime type declarations, but they were not consistently re-exported from the public API surfaces. This change makes them available to consumers in both runtimes through the intended top-level type export files.

This improves the usability of the browser runtime TypeScript APIs by making the existing asset model types discoverable and importable without reaching into internal type declaration files.

The issue was discussed with @pavelsavara on .NET's Discord server.

Copilot AI review requested due to automatic review settings April 17, 2026 16:08
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Apr 17, 2026
@elringus
Copy link
Copy Markdown
Author

@dotnet-policy-service agree

Copy link
Copy Markdown
Contributor

Copilot AI left a 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 makes existing browser runtime asset-related TypeScript types publicly discoverable by re-exporting them from the intended top-level .d.ts entrypoints for both NativeAOT and Mono browser runtimes.

Changes:

  • Re-export asset model types (e.g., Assets, Asset, AssemblyAsset, WasmAsset, WebAssemblyBootResourceType, etc.) from the NativeAOT public TypeScript entrypoint.
  • Re-export the same asset model types from the Mono browser runtime public TypeScript entrypoint, aligning the two runtimes’ public surfaces.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/native/libs/Common/JavaScript/types/export-api.ts Extends the NativeAOT top-level type entrypoint to re-export the asset model types from public-api.
src/mono/browser/runtime/types/export-types.ts Extends the Mono browser runtime top-level type entrypoint to re-export the same asset model types from the runtime types/index.

@pavelsavara
Copy link
Copy Markdown
Member

@elringus please

  • run npm run rollup:debug in src/native
  • run npm run rollup in src/mono/browser/runtime

it will generate 2x dotnet.d.ts to commit to this PR

@elringus
Copy link
Copy Markdown
Author

@elringus please

* run `npm run rollup:debug` in `src/native`

* run `npm run rollup` in `src/mono/browser/runtime`

it will generate 2x dotnet.d.ts to commit to this PR

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-System.Runtime.InteropServices.JavaScript community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants