If a JS library makes a call to an Uno module’s function that hasn’t been defined using the “AddMember” mechanism (like
AddMember(new NativeFunction("getWeather",(NativeCallback)GetWeather));
), there is no static error at the build process to alert you to a call to an undefined error. The only error is a later semi-cryptic run-time CallType error.
I propose the following for Javascript code:
- For each Uno module defined in the project,
- Gather list of all members that are exported by that Uno module
- For each reference to the Uno module in Javascript, ensure that the member has been exposed (or even exists) – if not, log the failure as a compilation error and present to the user.