edge
edge copied to clipboard
Cast error on returning short values (0.10.1)
Starting from release 0.10.0 returning short values from C# throws the exception "Error: Specified cast is not valid."
The following code will fail for example:
var edge = require('edge');
var helloWorld = edge.func(function () {/*
async (input) => {
return (short)1;
}
*/});
helloWorld('JavaScript', function (error, result) {
if (error) throw error;
console.log(result);
});
while the following works:
var edge = require('edge');
var helloWorld = edge.func(function () {/*
async (input) => {
return (ushort)1;
}
*/});
helloWorld('JavaScript', function (error, result) {
if (error) throw error;
console.log(result);
});