Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: protocolbuffers/protobuf-javascript
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: derivita/protobuf-javascript
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 9 commits
  • 167 files changed
  • 2 contributors

Commits on Jan 23, 2025

  1. Start es6 conversion.

    ribrdb committed Jan 23, 2025
    Copy the full SHA
    4d0ce8b View commit details
  2. Update imports.

    Imports for generated protobufs (e.g. tests) still need to be updated once we figure out exactly what they should look like.
    ribrdb committed Jan 23, 2025
    Copy the full SHA
    005fcfd View commit details
  3. Delete temporary file.

    ribrdb committed Jan 23, 2025
    Copy the full SHA
    e614769 View commit details

Commits on Jan 24, 2025

  1. Revert parenthesis change.

    ribrdb committed Jan 24, 2025
    Copy the full SHA
    0b62ac5 View commit details
  2. - Generate .d.ts files.

    - Fix some import issues found by tsc.
    - Fix uses of goog.forwardDeclare
    ribrdb committed Jan 24, 2025
    Copy the full SHA
    e6ad2fa View commit details

Commits on Jan 27, 2025

  1. Fix npm run build

    ribrdb committed Jan 27, 2025
    Copy the full SHA
    aeef7e7 View commit details
  2. PR Feedback.

    ribrdb authored Jan 27, 2025
    Copy the full SHA
    d810f89 View commit details

Commits on Jan 31, 2025

  1. Cleanup some weird types.

    ribrdb committed Jan 31, 2025
    Copy the full SHA
    fcd77c9 View commit details
  2. Merge pull request #2 from derivita/ryan/jspb-es6

    Convert jspb code to es6
    ribrdb authored Jan 31, 2025
    Copy the full SHA
    1625e89 View commit details
Showing with 8,453 additions and 2,890 deletions.
  1. +1 −0 .bazelversion
  2. +63 −0 asserts.d.ts
  3. +19 −20 asserts.js
  4. +143 −0 binary/arith.d.ts
  5. +62 −65 binary/arith.js
  6. +14 −15 binary/arith_test.js
  7. +177 −0 binary/constants.d.ts
  8. +58 −108 binary/constants.js
  9. +342 −0 binary/decoder.d.ts
  10. +103 −103 binary/decoder.js
  11. +71 −71 binary/decoder_test.js
  12. +182 −0 binary/encoder.d.ts
  13. +133 −134 binary/encoder.js
  14. +5 −5 binary/message_test.js
  15. +8 −8 binary/proto_test.js
  16. +478 −0 binary/reader.d.ts
  17. +246 −245 binary/reader.js
  18. +113 −115 binary/reader_test.js
  19. +29 −0 binary/utf8.d.ts
  20. +35 −31 binary/utf8.js
  21. +220 −0 binary/utils.d.ts
  22. +179 −181 binary/utils.js
  23. +98 −97 binary/utils_test.js
  24. +654 −0 binary/writer.d.ts
  25. +238 −241 binary/writer.js
  26. +38 −41 binary/writer_test.js
  27. +12 −20 commonjs/export.js
  28. +28 −27 commonjs/export_testdeps.js
  29. +12 −0 debug.d.ts
  30. +28 −29 debug.js
  31. +19 −23 debug_test.js
  32. +1 −3 experimental/benchmarks/code_size/apps_jspb/all_types_proto2.js
  33. +1 −3 experimental/benchmarks/code_size/apps_jspb/all_types_proto3.js
  34. +1 −3 experimental/benchmarks/code_size/apps_jspb/popular_types_proto2.js
  35. +1 −3 experimental/benchmarks/code_size/apps_jspb/popular_types_proto3.js
  36. +6 −0 experimental/benchmarks/code_size/code_size_base.d.ts
  37. +1 −4 experimental/benchmarks/code_size/code_size_base.js
  38. +5 −6 experimental/benchmarks/code_size/kernel/all_types.js
  39. +4 −5 experimental/benchmarks/code_size/kernel/popular_types.js
  40. +43 −0 experimental/runtime/bytestring.d.ts
  41. +4 −4 experimental/runtime/bytestring.js
  42. +12 −0 experimental/runtime/bytestring_internal.d.ts
  43. +2 −4 experimental/runtime/bytestring_internal.js
  44. +3 −3 experimental/runtime/bytestring_test.js
  45. +57 −0 experimental/runtime/int64.d.ts
  46. +3 −4 experimental/runtime/int64.js
  47. +2 −3 experimental/runtime/int64_test.js
  48. +208 −0 experimental/runtime/internal/checks.d.ts
  49. +4 −5 experimental/runtime/internal/checks.js
  50. +2 −2 experimental/runtime/internal/checks_test.js
  51. +34 −0 experimental/runtime/kernel/binary_storage.d.ts
  52. +4 −5 experimental/runtime/kernel/binary_storage.js
  53. +2 −4 experimental/runtime/kernel/binary_storage_test.js
  54. +16 −0 experimental/runtime/kernel/bool_test_pairs.d.ts
  55. +4 −4 experimental/runtime/kernel/bool_test_pairs.js
  56. +77 −0 experimental/runtime/kernel/buffer_decoder.d.ts
  57. +10 −8 experimental/runtime/kernel/buffer_decoder.js
  58. +9 −0 experimental/runtime/kernel/buffer_decoder_helper.d.ts
  59. +2 −4 experimental/runtime/kernel/buffer_decoder_helper.js
  60. +3 −3 experimental/runtime/kernel/buffer_decoder_test.js
  61. +40 −0 experimental/runtime/kernel/conformance/conformance_request.d.ts
  62. +3 −4 experimental/runtime/kernel/conformance/conformance_request.js
  63. +34 −0 experimental/runtime/kernel/conformance/conformance_response.d.ts
  64. +3 −4 experimental/runtime/kernel/conformance/conformance_response.js
  65. +9 −0 experimental/runtime/kernel/conformance/conformance_testee.d.ts
  66. +7 −9 experimental/runtime/kernel/conformance/conformance_testee.js
  67. +2 −2 experimental/runtime/kernel/conformance/conformance_testee_runner_node.js
  68. +23 −0 experimental/runtime/kernel/conformance/test_all_types_proto2.d.ts
  69. +3 −4 experimental/runtime/kernel/conformance/test_all_types_proto2.js
  70. +23 −0 experimental/runtime/kernel/conformance/test_all_types_proto3.d.ts
  71. +3 −4 experimental/runtime/kernel/conformance/test_all_types_proto3.js
  72. +7 −0 experimental/runtime/kernel/conformance/wire_format.d.ts
  73. +1 −3 experimental/runtime/kernel/conformance/wire_format.js
  74. +14 −0 experimental/runtime/kernel/double_test_pairs.d.ts
  75. +4 −4 experimental/runtime/kernel/double_test_pairs.js
  76. +55 −0 experimental/runtime/kernel/field.d.ts
  77. +6 −11 experimental/runtime/kernel/field.js
  78. +14 −0 experimental/runtime/kernel/fixed32_test_pairs.d.ts
  79. +4 −4 experimental/runtime/kernel/fixed32_test_pairs.js
  80. +14 −0 experimental/runtime/kernel/float_test_pairs.d.ts
  81. +4 −4 experimental/runtime/kernel/float_test_pairs.js
  82. +13 −0 experimental/runtime/kernel/indexer.d.ts
  83. +9 −8 experimental/runtime/kernel/indexer.js
  84. +11 −9 experimental/runtime/kernel/indexer_test.js
  85. +16 −0 experimental/runtime/kernel/int32_test_pairs.d.ts
  86. +4 −4 experimental/runtime/kernel/int32_test_pairs.js
  87. +17 −0 experimental/runtime/kernel/int64_test_pairs.d.ts
  88. +5 −5 experimental/runtime/kernel/int64_test_pairs.js
  89. +8 −0 experimental/runtime/kernel/internal_message.d.ts
  90. +2 −4 experimental/runtime/kernel/internal_message.js
  91. +1,102 −0 experimental/runtime/kernel/kernel.d.ts
  92. +18 −16 experimental/runtime/kernel/kernel.js
  93. +6 −7 experimental/runtime/kernel/kernel_compatibility_test.js
  94. +9 −8 experimental/runtime/kernel/kernel_repeated_test.js
  95. +9 −8 experimental/runtime/kernel/kernel_test.js
  96. +27 −0 experimental/runtime/kernel/message_set.d.ts
  97. +3 −4 experimental/runtime/kernel/message_set.js
  98. +3 −5 experimental/runtime/kernel/message_set_test.js
  99. +15 −0 experimental/runtime/kernel/packed_bool_test_pairs.d.ts
  100. +4 −5 experimental/runtime/kernel/packed_bool_test_pairs.js
  101. +15 −0 experimental/runtime/kernel/packed_double_test_pairs.d.ts
  102. +4 −5 experimental/runtime/kernel/packed_double_test_pairs.js
  103. +15 −0 experimental/runtime/kernel/packed_fixed32_test_pairs.d.ts
  104. +4 −5 experimental/runtime/kernel/packed_fixed32_test_pairs.js
  105. +15 −0 experimental/runtime/kernel/packed_float_test_pairs.d.ts
  106. +4 −5 experimental/runtime/kernel/packed_float_test_pairs.js
  107. +15 −0 experimental/runtime/kernel/packed_int32_test_pairs.d.ts
  108. +4 −5 experimental/runtime/kernel/packed_int32_test_pairs.js
  109. +16 −0 experimental/runtime/kernel/packed_int64_test_pairs.d.ts
  110. +5 −6 experimental/runtime/kernel/packed_int64_test_pairs.js
  111. +15 −0 experimental/runtime/kernel/packed_sfixed32_test_pairs.d.ts
  112. +4 −5 experimental/runtime/kernel/packed_sfixed32_test_pairs.js
  113. +16 −0 experimental/runtime/kernel/packed_sfixed64_test_pairs.d.ts
  114. +5 −6 experimental/runtime/kernel/packed_sfixed64_test_pairs.js
  115. +15 −0 experimental/runtime/kernel/packed_sint32_test_pairs.d.ts
  116. +4 −5 experimental/runtime/kernel/packed_sint32_test_pairs.js
  117. +15 −0 experimental/runtime/kernel/packed_sint64_test_pairs.d.ts
  118. +5 −6 experimental/runtime/kernel/packed_sint64_test_pairs.js
  119. +15 −0 experimental/runtime/kernel/packed_uint32_test_pairs.d.ts
  120. +4 −5 experimental/runtime/kernel/packed_uint32_test_pairs.js
  121. +191 −0 experimental/runtime/kernel/reader.d.ts
  122. +6 −6 experimental/runtime/kernel/reader.js
  123. +54 −30 experimental/runtime/kernel/reader_test.js
  124. +14 −0 experimental/runtime/kernel/sfixed32_test_pairs.d.ts
  125. +4 −4 experimental/runtime/kernel/sfixed32_test_pairs.js
  126. +15 −0 experimental/runtime/kernel/sfixed64_test_pairs.d.ts
  127. +5 −5 experimental/runtime/kernel/sfixed64_test_pairs.js
  128. +16 −0 experimental/runtime/kernel/sint32_test_pairs.d.ts
  129. +4 −4 experimental/runtime/kernel/sint32_test_pairs.js
  130. +17 −0 experimental/runtime/kernel/sint64_test_pairs.d.ts
  131. +5 −5 experimental/runtime/kernel/sint64_test_pairs.js
  132. +37 −0 experimental/runtime/kernel/storage.d.ts
  133. +1 −3 experimental/runtime/kernel/storage.js
  134. +41 −0 experimental/runtime/kernel/tag.d.ts
  135. +5 −6 experimental/runtime/kernel/tag.js
  136. +6 −5 experimental/runtime/kernel/tag_test.js
  137. +17 −0 experimental/runtime/kernel/textencoding.d.ts
  138. +3 −3 experimental/runtime/kernel/textencoding.js
  139. +2 −3 experimental/runtime/kernel/textencoding_test.js
  140. +31 −0 experimental/runtime/kernel/typed_arrays.d.ts
  141. +2 −4 experimental/runtime/kernel/typed_arrays.js
  142. +2 −2 experimental/runtime/kernel/typed_arrays_test.js
  143. +17 −0 experimental/runtime/kernel/uint32_test_pairs.d.ts
  144. +4 −4 experimental/runtime/kernel/uint32_test_pairs.js
  145. +9 −0 experimental/runtime/kernel/uint8arrays.d.ts
  146. +1 −3 experimental/runtime/kernel/uint8arrays.js
  147. +2 −3 experimental/runtime/kernel/uint8arrays_test.js
  148. +13 −0 experimental/runtime/kernel/wire_type.d.ts
  149. +1 −3 experimental/runtime/kernel/wire_type.js
  150. +190 −0 experimental/runtime/kernel/writer.d.ts
  151. +14 −11 experimental/runtime/kernel/writer.js
  152. +51 −29 experimental/runtime/kernel/writer_test.js
  153. +215 −0 experimental/runtime/testing/binary/test_message.d.ts
  154. +5 −6 experimental/runtime/testing/binary/test_message.js
  155. +2 −3 experimental/runtime/testing/ensure_custom_equality_test.js
  156. +4 −4 experimental/runtime/testing/jasmine_protobuf.js
  157. +7 −5 gulpfile.js
  158. +158 −0 map.d.ts
  159. +62 −63 map.js
  160. +31 −47 maps_test.js
  161. +590 −0 message.d.ts
  162. +275 −271 message.js
  163. +52 −53 message_test.js
  164. +107 −308 package-lock.json
  165. +1 −1 package.json
  166. +43 −44 proto3_test.js
  167. +43 −104 yarn.lock
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.2.1
63 changes: 63 additions & 0 deletions asserts.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/**
* Throws an exception with the given message and "Assertion failed" prefixed
* onto it.
* @param defaultMessage The message to use if givenMessage is empty.
* @param defaultArgs The substitution arguments for defaultMessage.
* @param givenMessage Message supplied by the caller.
* @param givenArgs The substitution arguments for givenMessage.
*/
export declare function doAssertFailure(defaultMessage: string, defaultArgs: any[] | null, givenMessage: string | undefined, givenArgs: any[]): void;
/**
* Checks if the condition evaluates to true.
* @param condition The condition to check.
* @param opt_message Error message in case of failure.
* @param args The items to substitute into the failure message.
* @return The value of the condition.
*/
export declare function assert<T = any>(condition: T | null, opt_message?: string, ...args: any[]): T | null;
/**
* Checks if the value is a string.
* @param value The value to check.
* @param opt_message Error message in case of failure.
* @param args The items to substitute into the failure message.
* @return The value, guaranteed to be a string when asserts enabled.
*/
export declare function assertString(value: any, opt_message?: string, ...args: any[]): string;
/**
* Checks if the value is an Array.
* @param value The value to check.
* @param opt_message Error message in case of failure.
* @param args The items to substitute into the failure message.
* @return The value, guaranteed to be a non-null array.
*/
export declare function assertArray(value: any, opt_message?: string, ...args: any[]): any[];
/**
* Triggers a failure. This function is useful in case when we want to add a
* check in the unreachable area like switch-case statement:
*
* <pre>
* switch(type) {
* case FOO: doSomething(); break;
* case BAR: doSomethingElse(); break;
* default: JspbFail('Unrecognized type: ' + type);
* // We have only 2 types - "default:" section is unreachable code.
* }
* </pre>
* @param opt_message Error message in case of failure.
* @param args The items to substitute into the failure message.
*/
export declare function fail(opt_message?: string, ...args: any[]): void;
/**
* Checks if the value is an instance of the user-defined type.
*
* Do not use this to ensure a value is an HTMLElement or a subclass! Cross-
* document DOM inherits from separate - though identical - browser classes, and
* such a check will unexpectedly fail.
* @param value The value to check.
* @param type A user-defined constructor.
* @param opt_message Error message in case of failure.
* @param args The items to substitute into the failure message.
*/
export declare function assertInstanceof<T = any>(value: any, type: {
new (): T | null;
}, opt_message?: string, ...args: any[]): T | null;
39 changes: 19 additions & 20 deletions asserts.js
Original file line number Diff line number Diff line change
@@ -9,8 +9,6 @@
* invariants runtime.
*/

goog.provide('jspb.asserts');

/**
* Throws an exception with the given message and "Assertion failed" prefixed
* onto it.
@@ -20,7 +18,7 @@ goog.provide('jspb.asserts');
* @param {!Array<*>} givenArgs The substitution arguments for givenMessage.
* @throws {Error} When the value is not a number.
*/
jspb.asserts.doAssertFailure = function(defaultMessage, defaultArgs, givenMessage, givenArgs) {
export function doAssertFailure(defaultMessage, defaultArgs, givenMessage, givenArgs) {
let message = 'Assertion failed';
let args;
if (givenMessage) {
@@ -45,14 +43,15 @@ jspb.asserts.doAssertFailure = function(defaultMessage, defaultArgs, givenMessag
* @param {...*} args The items to substitute into the failure message.
* @return {T} The value of the condition.
* @throws {Error} When the condition evaluates to false.
* @closurePrimitive {asserts.truthy}
*/

jspb.asserts.assert = function(condition, opt_message, ...args) {
export function assert(condition, opt_message, ...args) {
if (!condition) {
jspb.asserts.doAssertFailure('', null, opt_message, args);
doAssertFailure('', null, opt_message, args);
}
return condition;
};
}


/**
@@ -63,14 +62,14 @@ jspb.asserts.assert = function(condition, opt_message, ...args) {
* @return {string} The value, guaranteed to be a string when asserts enabled.
* @throws {Error} When the value is not a string.
*/
jspb.asserts.assertString = function(value, opt_message, ...args) {
export function assertString(value, opt_message, ...args) {
if (typeof value !== 'string') {
jspb.asserts.doAssertFailure(
doAssertFailure(
'Expected string but got %s: %s.', [goog.typeOf(value), value],
opt_message, args);
}
return /** @type {string} */ (value);
};
}


/**
@@ -81,14 +80,14 @@ jspb.asserts.assertString = function(value, opt_message, ...args) {
* @return {!Array<?>} The value, guaranteed to be a non-null array.
* @throws {Error} When the value is not an array.
*/
jspb.asserts.assertArray = function(value, opt_message, ...args) {
export function assertArray(value, opt_message, ...args) {
if (!Array.isArray(value)) {
jspb.asserts.doAssertFailure(
doAssertFailure(
'Expected array but got %s: %s.', [goog.typeOf(value), value],
opt_message, args);
}
return /** @type {!Array<?>} */ (value);
};
}

/**
* Triggers a failure. This function is useful in case when we want to add a
@@ -98,7 +97,7 @@ jspb.asserts.assertArray = function(value, opt_message, ...args) {
* switch(type) {
* case FOO: doSomething(); break;
* case BAR: doSomethingElse(); break;
* default: jspb.asserts.JspbFail('Unrecognized type: ' + type);
* default: JspbFail('Unrecognized type: ' + type);
* // We have only 2 types - "default:" section is unreachable code.
* }
* </pre>
@@ -108,11 +107,11 @@ jspb.asserts.assertArray = function(value, opt_message, ...args) {
* @return {void}
* @throws {Error} Failure.
*/
jspb.asserts.fail = function(opt_message, ...args) {
export function fail(opt_message, ...args) {
throw new Error(
'Failure' + (opt_message ? ': ' + opt_message : ''),
args);
};
}

/**
* Checks if the value is an instance of the user-defined type.
@@ -130,15 +129,15 @@ jspb.asserts.fail = function(opt_message, ...args) {
* @return {T}
* @template T
*/
jspb.asserts.assertInstanceof = function(value, type, opt_message, ...args) {
export function assertInstanceof(value, type, opt_message, ...args) {
if (!(value instanceof type)) {
jspb.asserts.doAssertFailure(
doAssertFailure(
'Expected instanceof %s but got %s.',
[jspb.asserts.getType(type), jspb.asserts.getType(value)],
[getType(type), getType(value)],
opt_message, args);
}
return value;
};
}

/**
* Returns the type of a value. If a constructor is passed, and a suitable
@@ -147,7 +146,7 @@ jspb.asserts.assertInstanceof = function(value, type, opt_message, ...args) {
* @return {string} The best display name for the value, or 'unknown type name'.
* @private
*/
jspb.asserts.getType = function(value) {
function getType(value) {
if (value instanceof Function) {
return value.displayName || value.name || 'unknown type name';
} else if (value instanceof Object) {
143 changes: 143 additions & 0 deletions binary/arith.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
/**
* UInt64 implements some 64-bit arithmetic routines necessary for properly
* handling 64-bit integer fields. It implements lossless integer arithmetic on
* top of JavaScript's number type, which has only 53 bits of precision, by
* representing 64-bit integers as two 32-bit halves.
*/
export declare class UInt64 {
/**
* UInt64 implements some 64-bit arithmetic routines necessary for properly
* handling 64-bit integer fields. It implements lossless integer arithmetic on
* top of JavaScript's number type, which has only 53 bits of precision, by
* representing 64-bit integers as two 32-bit halves.
* @param lo The low 32 bits.
* @param hi The high 32 bits.
*/
constructor(lo: number, hi: number);
private noStructuralTyping____protobuf_javascript_binary_arith_UInt64;
/**
* The low 32 bits.
*/
lo: number;
/**
* The high 32 bits.
*/
hi: number;
/**
* Compare two 64-bit numbers. Returns -1 if the first is
* less, +1 if the first is greater, or 0 if both are equal.
*/
cmp(other: UInt64): number;
/**
* Right-shift this number by one bit.
*/
rightShift(): UInt64;
/**
* Left-shift this number by one bit.
*/
leftShift(): UInt64;
/**
* Test the MSB.
*/
msb(): boolean;
/**
* Test the LSB.
*/
lsb(): boolean;
/**
* Test whether this number is zero.
*/
zero(): boolean;
/**
* Add two 64-bit numbers to produce a 64-bit number.
*/
add(other: UInt64): UInt64;
/**
* Subtract two 64-bit numbers to produce a 64-bit number.
*/
sub(other: UInt64): UInt64;
/**
* Multiply two 32-bit numbers to produce a 64-bit number.
* @param a The first integer: must be in [0, 2^32-1).
* @param b The second integer: must be in [0, 2^32-1).
*/
static mul32x32(a: number, b: number): UInt64;
/**
* Multiply this number by a 32-bit number, producing a 96-bit number, then
* truncate the top 32 bits.
* @param a The multiplier.
*/
mul(a: number): UInt64;
/**
* Divide a 64-bit number by a 32-bit number to produce a
* 64-bit quotient and a 32-bit remainder.
* @return array of [quotient, remainder], unless divisor is 0, in which case an empty array is returned.
*/
div(_divisor: number): (UInt64 | null)[] | null;
/**
* Convert a 64-bit number to a string.
*/
toString(): string;
/**
* Parse a string into a 64-bit number. Returns `null` on a parse error.
*/
static fromString(s: string): UInt64 | null;
/**
* Make a copy of the uint64.
*/
clone(): UInt64;
}
/**
* Int64 is like UInt64, but modifies string conversions to interpret the stored
* 64-bit value as a twos-complement-signed integer. It does *not* support the
* full range of operations that UInt64 does: only add, subtract, and string
* conversions.
*
* N.B. that multiply and divide routines are *NOT* supported. They will throw
* exceptions. (They are not necessary to implement string conversions, which
* are the only operations we really need in jspb.)
*/
export declare class Int64 {
/**
* Int64 is like UInt64, but modifies string conversions to interpret the stored
* 64-bit value as a twos-complement-signed integer. It does *not* support the
* full range of operations that UInt64 does: only add, subtract, and string
* conversions.
*
* N.B. that multiply and divide routines are *NOT* supported. They will throw
* exceptions. (They are not necessary to implement string conversions, which
* are the only operations we really need in jspb.)
* @param lo The low 32 bits.
* @param hi The high 32 bits.
*/
constructor(lo: number, hi: number);
private noStructuralTyping____protobuf_javascript_binary_arith_Int64;
/**
* The low 32 bits.
*/
lo: number;
/**
* The high 32 bits.
*/
hi: number;
/**
* Add two 64-bit numbers to produce a 64-bit number.
*/
add(other: Int64): Int64;
/**
* Subtract two 64-bit numbers to produce a 64-bit number.
*/
sub(other: Int64): Int64;
/**
* Make a copy of the int64.
*/
clone(): Int64;
/**
* Convert a 64-bit number to a string.
*/
toString(): string;
/**
* Parse a string into a 64-bit number. Returns `null` on a parse error.
*/
static fromString(s: string): Int64 | null;
}
Loading