Snapchat / djinni

A tool for generating cross-language type declarations and interface bindings. Djinni's new home is in the Snapchat org.
Apache License 2.0
173 stars 50 forks source link

[Wasm] Clean up promise rejection code #133

Closed bkotsopoulossc closed 1 year ago

bkotsopoulossc commented 1 year ago

We've seen some issues that manifest from rejecting a JS promise with a null value, or with a DOMException that does not have a stack property. In both cases we made some assumptions that aren't always true, so let's guard against them.

PTAL @LiFengSC

bkotsopoulossc commented 1 year ago

Really need to make the wasm tests easier to run. I keep getting

                This is not the tsc command you are looking for                

To get access to the TypeScript compiler, tsc, from the command line either:

- Use npm install typescript to first add TypeScript to your project before using npx
- Use yarn to avoid accidentally running code from un-installed packages

There should be one command that runs tests and it should run in CI

bkotsopoulossc commented 1 year ago

@LiFengSC added some tests and a static_asset on exception type. PTAL and if it's okay with you please merge