Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
la.toFloat64();
la.equals(lb);
// $ExpectError
la.equals(10);
/**
* ByteBuffer
*/
const arr = new Uint8Array(10);
let bb = new fb.ByteBuffer(arr);
// $ExpectError arg is required
new fb.ByteBuffer();
// $ExpectError arg must be number
new fb.ByteBuffer("s");
fb.ByteBuffer.allocate(10);
// $ExpectError
fb.ByteBuffer.allocate();
// $ExpectError
fb.ByteBuffer.allocate("s");
bb.bytes();
bb.position();
bb.setPosition(1);
// $ExpectError
bb.setPosition();
// $ExpectError
bb.setPosition("s");
// $ExpectError
new fb.Long.create();
// $ExpectError
new fb.Long.create("s", "t");
la.toFloat64();
la.equals(lb);
// $ExpectError
la.equals(10);
/**
* ByteBuffer
*/
const arr = new Uint8Array(10);
let bb = new fb.ByteBuffer(arr);
// $ExpectError arg is required
new fb.ByteBuffer();
// $ExpectError arg must be number
new fb.ByteBuffer("s");
fb.ByteBuffer.allocate(10);
// $ExpectError
fb.ByteBuffer.allocate();
// $ExpectError
fb.ByteBuffer.allocate("s");
bb.bytes();
bb.position();
bb.setPosition(1);
// $ExpectError
__std.ParamArgs.addPath(builder, pathOffset);
__std.ParamArgs.addType(builder, type);
if (isObject) {
__std.ParamArgs.addDefaultValue(builder, defaultValueOffset);
}
const argsOffset = __std.ParamArgs.endParamArgs(builder);
__std.Message.startMessage(builder);
__std.Message.addArgsType(builder, __std.Args.ParamArgs);
__std.Message.addArgs(builder, argsOffset);
const messageOffset = __std.Message.endMessage(builder);
builder.finish(messageOffset);
const bytes = V8Worker2.send(builder.asArrayBuffer());
const buf = new flatbuffers.ByteBuffer(new Uint8Array(bytes));
const resp = __std.ParamResponse.getRootAsParamResponse(buf);
switch (resp.retvalType()) {
case __std.ParamRetval.ParamValue: {
// The runtime has returned the parameter value (or null).
const ret = new __std.ParamValue();
resp.retval(ret);
const v = JSON.parse(ret.json());
if (v == null) {
return defaultValue;
}
return v;
}
case __std.ParamRetval.Error: {
// The runtime has returned an error.