How to use the flatbuffers.Long function in flatbuffers

To help you get started, we’ve selected a few flatbuffers examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github flow-typed / flow-typed / definitions / npm / flatbuffers_v1.5.x / flow_v0.104.x- / test_flatbuffers_v1.5.x.js View on Github external
// @flow
import fb from "flatbuffers";

/**
 * Long
 */

let la = new fb.Long(1, 2);
// $ExpectError
new fb.Long();
// $ExpectError
new fb.Long("s", "t");
// $ExpectError
new fb.Long(1);

let lb = fb.Long.create(1, 2);
// $ExpectError
new fb.Long.create();
// $ExpectError
new fb.Long.create("s", "t");

la.toFloat64();

la.equals(lb);
// $ExpectError
la.equals(10);

/**
github flow-typed / flow-typed / definitions / npm / flatbuffers_v1.5.x / flow_v0.104.x- / test_flatbuffers_v1.5.x.js View on Github external
// @flow
import fb from "flatbuffers";

/**
 * Long
 */

let la = new fb.Long(1, 2);
// $ExpectError
new fb.Long();
// $ExpectError
new fb.Long("s", "t");
// $ExpectError
new fb.Long(1);

let lb = fb.Long.create(1, 2);
// $ExpectError
new fb.Long.create();
// $ExpectError
new fb.Long.create("s", "t");

la.toFloat64();

la.equals(lb);
// $ExpectError
la.equals(10);

/**
 * ByteBuffer
 */
github flow-typed / flow-typed / definitions / npm / flatbuffers_v1.5.x / flow_v0.104.x- / test_flatbuffers_v1.5.x.js View on Github external
// @flow
import fb from "flatbuffers";

/**
 * Long
 */

let la = new fb.Long(1, 2);
// $ExpectError
new fb.Long();
// $ExpectError
new fb.Long("s", "t");
// $ExpectError
new fb.Long(1);

let lb = fb.Long.create(1, 2);
// $ExpectError
new fb.Long.create();
// $ExpectError
new fb.Long.create("s", "t");

la.toFloat64();

la.equals(lb);