Skip to content
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

[WASM] Converting runtime JS to TS #55871

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d319055
Converted JS to TS and made build work
Daniel-Genkin Jul 16, 2021
f53ea70
cleanup
Daniel-Genkin Jul 17, 2021
f4515f5
split up glueForTSC
Daniel-Genkin Jul 17, 2021
797ece8
cleanup of markdown and formatting
Daniel-Genkin Jul 17, 2021
7ea904d
added tsc step to linux build
Jul 17, 2021
536962e
+ renamed build folder to bin
Daniel-Genkin Jul 19, 2021
d9ef3b4
Updated ci ubuntu image version
Daniel-Genkin Jul 19, 2021
48e1ec2
Merge branch 'wasm_ts' of https://github.com/Daniel-Genkin/runtime in…
Daniel-Genkin Jul 19, 2021
63631d1
replaced most `this` with the corresponding namespace to help tsc tra…
Daniel-Genkin Jul 19, 2021
dc7523e
addressed PR comments
Daniel-Genkin Jul 20, 2021
b9c909f
replaced hardcoded numbers with enums + fixed tsc exit code 1 error
Daniel-Genkin Jul 20, 2021
6bdfd80
Added a TON of types to binding-suppoprt.ts + Fixed windows build on CI
Daniel-Genkin Jul 20, 2021
5d329ab
Added a TON of types to library-mono.ts
Daniel-Genkin Jul 21, 2021
500962e
More types
Daniel-Genkin Jul 21, 2021
1a0bead
A bit more types + fix for windows ci build failure
Daniel-Genkin Jul 21, 2021
0d35bb1
Added more types
Daniel-Genkin Jul 22, 2021
a57bd53
Added more types
Daniel-Genkin Jul 22, 2021
3306d9b
Merge branch 'main' of https://github.com/dotnet/runtime into wasm_ts
Daniel-Genkin Jul 23, 2021
e93c8f5
Addressed PR comments
Daniel-Genkin Jul 26, 2021
359856e
Added typescript to windows build (Thanks Radek)
Daniel-Genkin Jul 26, 2021
b2debaf
Merge branch 'main' of https://github.com/dotnet/runtime into wasm_ts
Daniel-Genkin Jul 29, 2021
380cfa2
Slightly better type for function
Daniel-Genkin Jul 29, 2021
00898d9
Merge branch 'main' of https://github.com/dotnet/runtime into wasm_ts
Daniel-Genkin Jul 30, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
188 changes: 87 additions & 101 deletions src/mono/wasm/runtime/binding-support.ts

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/mono/wasm/runtime/dotnet-support.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var DotNetSupportLib = {
return MONO.string_decoder.copy (mono_obj);
}
},
mono_wasm_invoke_js_blazor: function (exceptionMessage, callInfo, arg0, arg1, arg2) {
mono_wasm_invoke_js_blazor: function (exceptionMessage: number, callInfo, arg0, arg1, arg2) {
var mono_string = globalThis._mono_string_cached
|| (globalThis._mono_string_cached = Module.cwrap('mono_wasm_string_from_js', 'number', ['string']));

Expand All @@ -27,7 +27,7 @@ var DotNetSupportLib = {
},

// This is for back-compat only and will eventually be removed
mono_wasm_invoke_js_marshalled: function (exceptionMessage, asyncHandleLongPtr, functionName, argsJson, treatResultAsVoid) {
mono_wasm_invoke_js_marshalled: function (exceptionMessage: number, asyncHandleLongPtr, functionName, argsJson, treatResultAsVoid) {

var mono_string = globalThis._mono_string_cached
|| (globalThis._mono_string_cached = Module.cwrap('mono_wasm_string_from_js', 'number', ['string']));
Expand Down Expand Up @@ -67,7 +67,7 @@ var DotNetSupportLib = {
},

// This is for back-compat only and will eventually be removed
mono_wasm_invoke_js_unmarshalled: function (exceptionMessage, funcName, arg0, arg1, arg2) {
mono_wasm_invoke_js_unmarshalled: function (exceptionMessage: number, funcName, arg0, arg1, arg2) {
try {
// Get the function you're trying to invoke
var funcNameJsString = DOTNET.conv_string(funcName);
Expand Down
Loading