Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define ArrayBufferView and TypedArray as interfaces rather than classes #4181

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 19 additions & 17 deletions externs/es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,8 @@ ArrayBuffer.isView = function(arg) {};


/**
* @constructor
* @interface
* @see https://webidl.spec.whatwg.org/#ArrayBufferView
*/
function ArrayBufferView() {}

Expand Down Expand Up @@ -447,12 +448,13 @@ var BufferSource;


/**
* @constructor
* @implements {IArrayLike<number>}
* @implements {Iterable<number>}
* @interface
* @extends {IArrayLike<number>}
* @extends {Iterable<number>}
* @extends {ArrayBufferView}
* @see https://tc39.es/ecma262/multipage/indexed-collections.html#sec-typedarray-objects
*/
function TypedArray() {};
function TypedArray() {}

/** @const {number} */
TypedArray.prototype.BYTES_PER_ELEMENT;
Expand Down Expand Up @@ -730,7 +732,7 @@ TypedArray.prototype[Symbol.iterator] = function() {};
* @param {number=} opt_byteOffset
* @param {number=} opt_length
* @constructor
* @extends {TypedArray}
* @implements {TypedArray}
* @throws {Error}
* @modifies {arguments} If the user passes a backing array, then indexed
* accesses will modify the backing array. JSCompiler does not model
Expand Down Expand Up @@ -776,7 +778,7 @@ Int8Array.of = function(var_args) {};
* @param {number=} opt_byteOffset
* @param {number=} opt_length
* @constructor
* @extends {TypedArray}
* @implements {TypedArray}
* @throws {Error}
* @modifies {arguments}
*/
Expand Down Expand Up @@ -812,7 +814,7 @@ Uint8Array.of = function(var_args) {};
* @param {number=} opt_byteOffset
* @param {number=} opt_length
* @constructor
* @extends {TypedArray}
* @implements {TypedArray}
* @throws {Error}
* @modifies {arguments}
*/
Expand Down Expand Up @@ -857,7 +859,7 @@ var CanvasPixelArray;
* @param {number=} opt_byteOffset
* @param {number=} opt_length
* @constructor
* @extends {TypedArray}
* @implements {TypedArray}
* @throws {Error}
* @modifies {arguments}
*/
Expand Down Expand Up @@ -893,7 +895,7 @@ Int16Array.of = function(var_args) {};
* @param {number=} opt_byteOffset
* @param {number=} opt_length
* @constructor
* @extends {TypedArray}
* @implements {TypedArray}
* @throws {Error}
* @modifies {arguments}
*/
Expand Down Expand Up @@ -929,7 +931,7 @@ Uint16Array.of = function(var_args) {};
* @param {number=} opt_byteOffset
* @param {number=} opt_length
* @constructor
* @extends {TypedArray}
* @implements {TypedArray}
* @throws {Error}
* @modifies {arguments}
*/
Expand Down Expand Up @@ -965,7 +967,7 @@ Int32Array.of = function(var_args) {};
* @param {number=} opt_byteOffset
* @param {number=} opt_length
* @constructor
* @extends {TypedArray}
* @implements {TypedArray}
* @throws {Error}
* @modifies {arguments}
*/
Expand Down Expand Up @@ -1001,7 +1003,7 @@ Uint32Array.of = function(var_args) {};
* @param {number=} opt_byteOffset
* @param {number=} opt_length
* @constructor
* @extends {TypedArray}
* @implements {TypedArray}
* @throws {Error}
* @modifies {arguments}
*/
Expand Down Expand Up @@ -1037,7 +1039,7 @@ Float32Array.of = function(var_args) {};
* @param {number=} opt_byteOffset
* @param {number=} opt_length
* @constructor
* @extends {TypedArray}
* @implements {TypedArray}
* @throws {Error}
* @modifies {arguments}
*/
Expand Down Expand Up @@ -1073,7 +1075,7 @@ Float64Array.of = function(var_args) {};
* @param {number=} byteOffset
* @param {number=} bufferLength
* @constructor
* @extends {TypedArray}
* @implements {TypedArray}
* @throws {Error}
* @modifies {arguments}
*/
Expand Down Expand Up @@ -1109,7 +1111,7 @@ BigInt64Array.of = function(var_args) {};
* @param {number=} byteOffset
* @param {number=} bufferLength
* @constructor
* @extends {TypedArray}
* @implements {TypedArray}
* @throws {Error}
* @modifies {arguments}
*/
Expand Down Expand Up @@ -1140,7 +1142,7 @@ BigUint64Array.of = function(var_args) {};
* @param {number=} opt_byteOffset
* @param {number=} opt_byteLength
* @constructor
* @extends {ArrayBufferView}
* @implements {ArrayBufferView}
* @throws {Error}
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays/DataView
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and this breaks j2clproto and elemental2 tests, taking a deeper look.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at first , tests failed No name provided for parameter 'elemental2.core.ReadonlyArray.EveryCallbackFn.onInvoke.p0'. Name can be specified in a name mapping file. after removing some unused integer entities from elemental2, this error went away. Then tests failed //third_party/java_src/j2cl_proto/java/com/google/protobuf/contrib/j2cl/runtime:runtime Error:ByteString.java:78: Cannot cast from BigUint64Array to Uint8Array , and also

Exception in thread "main" java.lang.IllegalStateException: No declaration found for member [Property {  name: BYTES_PER_ELEMENT, type:number, inferred: false}]. Please fix the extern file. A class must implement all methods from its super interfaces.

and

Error:BigInt64Array.java:22: The type BigInt64Array must implement the inherited abstract method TypedArray.copyWithin(int, int, int)
Error:BigInt64Array.java:22: The type BigInt64Array must implement the inherited abstract method TypedArray.set(TypedArray.SetArrayUnionType, int)
Error:BigInt64Array.java:22: The type BigInt64Array must implement the inherited abstract method TypedArray.at(int)
Error:BigInt64Array.java:22: The type BigInt64Array must implement the inherited abstract method TypedArray.subarray(int)
Error:BigInt64Array.java:22: The type BigInt64Array must implement the inherited abstract method TypedArray.subarray(int, int)
Error:BigInt64Array.java:22: The type BigInt64Array must implement the inherited abstract method TypedArray.fill(double, int)
Error:BigInt64Array.java:22: The type BigInt64Array must implement the inherited abstract method TypedArray.fill(double, int, int)
Error:BigInt64Array.java:22: The type BigInt64Array must implement the inherited abstract method TypedArray.slice(int)
Error:BigInt64Array.java:22: The type BigInt64Array must implement the inherited abstract method TypedArray.slice(int, int)
Error:BigInt64Array.java:22: The type BigInt64Array must implement the inherited abstract method TypedArray.toString_()
Error:BigInt64Array.java:22: The type BigInt64Array must implement the inherited abstract method TypedArray.indexOf(double, int)
Error:BigInt64Array.java:22: The type BigInt64Array must implement the inherited abstract method TypedArray.includes(double, int)
Error:BigInt64Array.java:22: The type BigInt64Array must implement the inherited abstract method TypedArray.lastIndexOf(double, int)
Error:BigInt64Array.java:22: The type BigInt64Array must implement the inherited abstract method TypedArray.toLocaleString()
Error:BigInt64Array.java:185: The return type is incompatible with TypedArray.findIndex(TypedArray.FindIndexCallbackFn, S)
Error:BigInt64Array.java:186: The return type is incompatible with TypedArray.findIndex(TypedArray.FindIndexCallbackFn)
Error:BigInt64Array.java:189: The return type is incompatible with TypedArray.findLastIndex(TypedArray.FindLastIndexCallbackFn, S)
Error:BigInt64Array.java:190: The return type is incompatible with TypedArray.findLastIndex(TypedArray.FindLastIndexCallbackFn)
Error:BigInt64Array.java:206: The return type is incompatible with TypedArray.indexOf(double)
Error:BigInt64Array.java:211: The return type is incompatible with TypedArray.lastIndexOf(double)
Error:BigUint64Array.java:21: The type BigUint64Array must implement the inherited abstract method TypedArray.copyWithin(int, int)
Error:BigUint64Array.java:21: The type BigUint64Array must implement the inherited abstract method TypedArray.copyWithin(int, int, int)
Error:BigUint64Array.java:21: The type BigUint64Array must implement the inherited abstract method TypedArray.set(TypedArray.SetArrayUnionType, int)
Error:BigUint64Array.java:21: The type BigUint64Array must implement the inherited abstract method TypedArray.at(int)
Error:BigUint64Array.java:21: The type BigUint64Array must implement the inherited abstract method TypedArray.subarray(int)
Error:BigUint64Array.java:21: The type BigUint64Array must implement the inherited abstract method TypedArray.subarray(int, int)
Error:BigUint64Array.java:21: The type BigUint64Array must implement the inherited abstract method TypedArray.fill(double, int)
Error:BigUint64Array.java:21: The type BigUint64Array must implement the inherited abstract method TypedArray.fill(double, int, int)
Error:BigUint64Array.java:21: The type BigUint64Array must implement the inherited abstract method TypedArray.slice(int)
Error:BigUint64Array.java:21: The type BigUint64Array must implement the inherited abstract method TypedArray.slice(int, int)
Error:BigUint64Array.java:21: The type BigUint64Array must implement the inherited abstract method TypedArray.toString_()
Error:BigUint64Array.java:21: The type BigUint64Array must implement the inherited abstract method TypedArray.indexOf(double, int)
Error:BigUint64Array.java:21: The type BigUint64Array must implement the inherited abstract method TypedArray.includes(double, int)
Error:BigUint64Array.java:21: The type BigUint64Array must implement the inherited abstract method TypedArray.lastIndexOf(double, int)
Error:BigUint64Array.java:21: The type BigUint64Array must implement the inherited abstract method TypedArray.toLocaleString()
Error:BigUint64Array.java:184: The return type is incompatible with TypedArray.findIndex(TypedArray.FindIndexCallbackFn, S)
Error:BigUint64Array.java:185: The return type is incompatible with TypedArray.findIndex(TypedArray.FindIndexCallbackFn)
Error:BigUint64Array.java:188: The return type is incompatible with TypedArray.findLastIndex(TypedArray.FindLastIndexCallbackFn, S)
Error:BigUint64Array.java:189: The return type is incompatible with TypedArray.findLastIndex(TypedArray.FindLastIndexCallbackFn)
Error:BigUint64Array.java:205: The return type is incompatible with TypedArray.indexOf(double)
Error:BigUint64Array.java:210: The return type is incompatible with TypedArray.lastIndexOf(double)
Error:Float32Array.java:21: The type Float32Array must implement the inherited abstract method TypedArray.copyWithin(int, int)
Error:Float32Array.java:21: The type Float32Array must implement the inherited abstract method TypedArray.copyWithin(int, int, int)
Error:Float32Array.java:21: The type Float32Array must implement the inherited abstract method TypedArray.set(TypedArray.SetArrayUnionType, int)
Error:Float32Array.java:21: The type Float32Array must implement the inherited abstract method TypedArray.at(int)
Error:Float32Array.java:21: The type Float32Array must implement the inherited abstract method TypedArray.subarray(int)
Error:Float32Array.java:21: The type Float32Array must implement the inherited abstract method TypedArray.subarray(int, int)
Error:Float32Array.java:21: The type Float32Array must implement the inherited abstract method TypedArray.fill(double, int)
Error:Float32Array.java:21: The type Float32Array must implement the inherited abstract method TypedArray.fill(double, int, int)
Error:Float32Array.java:21: The type Float32Array must implement the inherited abstract method TypedArray.slice(int)
Error:Float32Array.java:21: The type Float32Array must implement the inherited abstract method TypedArray.slice(int, int)
Error:Float32Array.java:21: The type Float32Array must implement the inherited abstract method TypedArray.toString_()
Error:Float32Array.java:21: The type Float32Array must implement the inherited abstract method TypedArray.indexOf(double, int)
Error:Float32Array.java:21: The type Float32Array must implement the inherited abstract method TypedArray.includes(double, int)
Error:Float32Array.java:21: The type Float32Array must implement the inherited abstract method TypedArray.lastIndexOf(double, int)
Error:Float32Array.java:21: The type Float32Array must implement the inherited abstract method TypedArray.toLocaleString()
Error:Float32Array.java:184: The return type is incompatible with TypedArray.findIndex(TypedArray.FindIndexCallbackFn, S)
Error:Float32Array.java:185: The return type is incompatible with TypedArray.findIndex(TypedArray.FindIndexCallbackFn)
Error:Float32Array.java:188: The return type is incompatible with TypedArray.findLastIndex(TypedArray.FindLastIndexCallbackFn, S)
Error:Float32Array.java:189: The return type is incompatible with TypedArray.findLastIndex(TypedArray.FindLastIndexCallbackFn)
Error:Float32Array.java:205: The return type is incompatible with TypedArray.indexOf(double)
Error:Float32Array.java:210: The return type is incompatible with TypedArray.lastIndexOf(double)
Error:Float64Array.java:21: The type Float64Array must implement the inherited abstract method TypedArray.copyWithin(int, int)
Error:Float64Array.java:21: The type Float64Array must implement the inherited abstract method TypedArray.copyWithin(int, int, int)
Error:Float64Array.java:21: The type Float64Array must implement the inherited abstract method TypedArray.set(TypedArray.SetArrayUnionType, int)
Error:Float64Array.java:21: The type Float64Array must implement the inherited abstract method TypedArray.at(int)
Error:Float64Array.java:21: The type Float64Array must implement the inherited abstract method TypedArray.subarray(int)
Error:Float64Array.java:21: The type Float64Array must implement the inherited abstract method TypedArray.subarray(int, int)
Error:Float64Array.java:21: The type Float64Array must implement the inherited abstract method TypedArray.fill(double, int)
Error:Float64Array.java:21: The type Float64Array must implement the inherited abstract method TypedArray.fill(double, int, int)
Error:Float64Array.java:21: The type Float64Array must implement the inherited abstract method TypedArray.slice(int)
Error:Float64Array.java:21: The type Float64Array must implement the inherited abstract method TypedArray.slice(int, int)
Error:Float64Array.java:21: The type Float64Array must implement the inherited abstract method TypedArray.toString_()
Error:Float64Array.java:21: The type Float64Array must implement the inherited abstract method TypedArray.indexOf(double, int)
Error:Float64Array.java:21: The type Float64Array must implement the inherited abstract method TypedArray.includes(double, int)
Error:Float64Array.java:21: The type Float64Array must implement the inherited abstract method TypedArray.lastIndexOf(double, int)
Error:Float64Array.java:21: The type Float64Array must implement the inherited abstract method TypedArray.toLocaleString()
Error:Float64Array.java:184: The return type is incompatible with TypedArray.findIndex(TypedArray.FindIndexCallbackFn, S)
Error:Float64Array.java:185: The return type is incompatible with TypedArray.findIndex(TypedArray.FindIndexCallbackFn)
Error:Float64Array.java:188: The return type is incompatible with TypedArray.findLastIndex(TypedArray.FindLastIndexCallbackFn, S)
Error:Float64Array.java:189: The return type is incompatible with TypedArray.findLastIndex(TypedArray.FindLastIndexCallbackFn)
Error:Float64Array.java:205: The return type is incompatible with TypedArray.indexOf(double)
Error:Float64Array.java:210: The return type is incompatible with TypedArray.lastIndexOf(double)
Error:Int16Array.java:21: The type Int16Array must implement the inherited abstract method TypedArray.copyWithin(int, int)
Error:Int16Array.java:21: The type Int16Array must implement the inherited abstract method TypedArray.copyWithin(int, int, int)
Error:Int16Array.java:21: The type Int16Array must implement the inherited abstract method TypedArray.set(TypedArray.SetArrayUnionType, int)
Error:Int16Array.java:21: The type Int16Array must implement the inherited abstract method TypedArray.at(int)
Error:Int16Array.java:21: The type Int16Array must implement the inherited abstract method TypedArray.subarray(int)
Error:Int16Array.java:21: The type Int16Array must implement the inherited abstract method TypedArray.subarray(int, int)
Error:Int16Array.java:21: The type Int16Array must implement the inherited abstract method TypedArray.fill(double, int)
Error:Int16Array.java:21: The type Int16Array must implement the inherited abstract method TypedArray.fill(double, int, int)
Error:Int16Array.java:21: The type Int16Array must implement the inherited abstract method TypedArray.slice(int)
Error:Int16Array.java:21: The type Int16Array must implement the inherited abstract method TypedArray.slice(int, int)
Error:Int16Array.java:21: The type Int16Array must implement the inherited abstract method TypedArray.toString_()
Error:Int16Array.java:21: The type Int16Array must implement the inherited abstract method TypedArray.indexOf(double, int)
Error:Int16Array.java:21: The type Int16Array must implement the inherited abstract method TypedArray.includes(double, int)
Error:Int16Array.java:21: The type Int16Array must implement the inherited abstract method TypedArray.lastIndexOf(double, int)
Error:Int16Array.java:21: The type Int16Array must implement the inherited abstract method TypedArray.toLocaleString()
Error:Int16Array.java:184: The return type is incompatible with TypedArray.findIndex(TypedArray.FindIndexCallbackFn, S)
Error:Int16Array.java:185: The return type is incompatible with TypedArray.findIndex(TypedArray.FindIndexCallbackFn)
Error:Int16Array.java:188: The return type is incompatible with TypedArray.findLastIndex(TypedArray.FindLastIndexCallbackFn, S)
Error:Int16Array.java:189: The return type is incompatible with TypedArray.findLastIndex(TypedArray.FindLastIndexCallbackFn)
Error:Int16Array.java:205: The return type is incompatible with TypedArray.indexOf(double)
Error:Int16Array.java:210: The return type is incompatible with TypedArray.lastIndexOf(double)
Error:Int32Array.java:21: The type Int32Array must implement the inherited abstract method TypedArray.copyWithin(int, int)
Error:Int32Array.java:21: The type Int32Array must implement the inherited abstract method TypedArray.copyWithin(int, int, int)
Error:Int32Array.java:21: The type Int32Array must implement the inherited abstract method TypedArray.set(TypedArray.SetArrayUnionType, int)
Error:Int32Array.java:21: The type Int32Array must implement the inherited abstract method TypedArray.at(int)
Error:Int32Array.java:21: The type Int32Array must implement the inherited abstract method TypedArray.subarray(int)
Error:Int32Array.java:21: The type Int32Array must implement the inherited abstract method TypedArray.subarray(int, int)
Error:Int32Array.java:21: The type Int32Array must implement the inherited abstract method TypedArray.fill(double, int)
Error:Int32Array.java:21: The type Int32Array must implement the inherited abstract method TypedArray.fill(double, int, int)
Error:Int32Array.java:21: The type Int32Array must implement the inherited abstract method TypedArray.slice(int)
Error:Int32Array.java:21: The type Int32Array must implement the inherited abstract method TypedArray.slice(int, int)
Error:Int32Array.java:21: The type Int32Array must implement the inherited abstract method TypedArray.toString_()
Error:Int32Array.java:21: The type Int32Array must implement the inherited abstract method TypedArray.indexOf(double, int)
Error:Int32Array.java:21: The type Int32Array must implement the inherited abstract method TypedArray.includes(double, int)
Error:Int32Array.java:21: The type Int32Array must implement the inherited abstract method TypedArray.lastIndexOf(double, int)
Error:Int32Array.java:21: The type Int32Array must implement the inherited abstract method TypedArray.toLocaleString()
Error:Int32Array.java:184: The return type is incompatible with TypedArray.findIndex(TypedArray.FindIndexCallbackFn, S)
Error:Int32Array.java:185: The return type is incompatible with TypedArray.findIndex(TypedArray.FindIndexCallbackFn)
Error:Int32Array.java:188: The return type is incompatible with TypedArray.findLastIndex(TypedArray.FindLastIndexCallbackFn, S)
Error:Int32Array.java:189: The return type is incompatible with TypedArray.findLastIndex(TypedArray.FindLastIndexCallbackFn)
Error:Int32Array.java:205: The return type is incompatible with TypedArray.indexOf(double)
Error:Int32Array.java:210: The return type is incompatible with TypedArray.lastIndexOf(double)
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.copyWithin(int, int)
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.copyWithin(int, int, int)
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.set(TypedArray.SetArrayUnionType, int)
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.at(int)
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.subarray(int)
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.subarray(int, int)
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.fill(double, int)
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.fill(double, int, int)
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.slice(int)
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.slice(int, int)
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.toString_()
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.indexOf(double, int)
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.includes(double, int)
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.lastIndexOf(double, int)
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.toLocaleString()
Error:Int8Array.java:184: The return type is incompatible with TypedArray.findIndex(TypedArray.FindIndexCallbackFn, S)
Error:Int8Array.java:185: The return type is incompatible with TypedArray.findIndex(TypedArray.FindIndexCallbackFn)
Error:Int8Array.java:188: The return type is incompatible with TypedArray.findLastIndex(TypedArray.FindLastIndexCallbackFn, S)
Error:Int8Array.java:189: The return type is incompatible with TypedArray.findLastIndex(TypedArray.FindLastIndexCallbackFn)
Error:Int8Array.java:205: The return type is incompatible with TypedArray.indexOf(double)
Error:Int8Array.java:210: The return type is incompatible with TypedArray.lastIndexOf(double)
Error:TypedArray.java:157: The return type is incompatible with JsArrayLike<Double>.getLength()
Error:Uint16Array.java:21: The type Uint16Array must implement the inherited abstract method TypedArray.copyWithin(int, int)
Error:Uint16Array.java:21: The type Uint16Array must implement the inherited abstract method TypedArray.copyWithin(int, int, int)
Error:Uint16Array.java:21: The type Uint16Array must implement the inherited abstract method TypedArray.set(TypedArray.SetArrayUnionType, int)
Error:Uint16Array.java:21: The type Uint16Array must implement the inherited abstract method TypedArray.at(int)
Error:Uint16Array.java:21: The type Uint16Array must implement the inherited abstract method TypedArray.subarray(int)
Error:Uint16Array.java:21: The type Uint16Array must implement the inherited abstract method TypedArray.subarray(int, int)
Error:Uint16Array.java:21: The type Uint16Array must implement the inherited abstract method TypedArray.fill(double, int)
Error:Uint16Array.java:21: The type Uint16Array must implement the inherited abstract method TypedArray.fill(double, int, int)
Error:Uint16Array.java:21: The type Uint16Array must implement the inherited abstract method TypedArray.slice(int)
Error:Uint16Array.java:21: The type Uint16Array must implement the inherited abstract method TypedArray.slice(int, int)
Error:Uint16Array.java:21: The type Uint16Array must implement the inherited abstract method TypedArray.toString_()
Error:Uint16Array.java:21: The type Uint16Array must implement the inherited abstract method TypedArray.indexOf(double, int)
Error:Uint16Array.java:21: The type Uint16Array must implement the inherited abstract method TypedArray.includes(double, int)
Error:Uint16Array.java:21: The type Uint16Array must implement the inherited abstract method TypedArray.lastIndexOf(double, int)
Error:Uint16Array.java:21: The type Uint16Array must implement the inherited abstract method TypedArray.toLocaleString()
Error:Uint16Array.java:184: The return type is incompatible with TypedArray.findIndex(TypedArray.FindIndexCallbackFn, S)
Error:Uint16Array.java:185: The return type is incompatible with TypedArray.findIndex(TypedArray.FindIndexCallbackFn)
Error:Uint16Array.java:188: The return type is incompatible with TypedArray.findLastIndex(TypedArray.FindLastIndexCallbackFn, S)
Error:Uint16Array.java:189: The return type is incompatible with TypedArray.findLastIndex(TypedArray.FindLastIndexCallbackFn)
Error:Uint16Array.java:205: The return type is incompatible with TypedArray.indexOf(double)
Error:Uint16Array.java:210: The return type is incompatible with TypedArray.lastIndexOf(double)
Error:Uint32Array.java:21: The type Uint32Array must implement the inherited abstract method TypedArray.copyWithin(int, int)
Error:Uint32Array.java:21: The type Uint32Array must implement the inherited abstract method TypedArray.copyWithin(int, int, int)
Error:Uint32Array.java:21: The type Uint32Array must implement the inherited abstract method TypedArray.set(TypedArray.SetArrayUnionType, int)
Error:Uint32Array.java:21: The type Uint32Array must implement the inherited abstract method TypedArray.at(int)
Error:Uint32Array.java:21: The type Uint32Array must implement the inherited abstract method TypedArray.subarray(int)
Error:Uint32Array.java:21: The type Uint32Array must implement the inherited abstract method TypedArray.subarray(int, int)
Error:Uint32Array.java:21: The type Uint32Array must implement the inherited abstract method TypedArray.fill(double, int)
Error:Uint32Array.java:21: The type Uint32Array must implement the inherited abstract method TypedArray.fill(double, int, int)
Error:Uint32Array.java:21: The type Uint32Array must implement the inherited abstract method TypedArray.slice(int)
Error:Uint32Array.java:21: The type Uint32Array must implement the inherited abstract method TypedArray.slice(int, int)
Error:Uint32Array.java:21: The type Uint32Array must implement the inherited abstract method TypedArray.toString_()
Error:Uint32Array.java:21: The type Uint32Array must implement the inherited abstract method TypedArray.indexOf(double, int)
Error:Uint32Array.java:21: The type Uint32Array must implement the inherited abstract method TypedArray.includes(double, int)
Error:Uint32Array.java:21: The type Uint32Array must implement the inherited abstract method TypedArray.lastIndexOf(double, int)
Error:Uint32Array.java:21: The type Uint32Array must implement the inherited abstract method TypedArray.toLocaleString()
Error:Uint32Array.java:184: The return type is incompatible with TypedArray.findIndex(TypedArray.FindIndexCallbackFn, S)
Error:Uint32Array.java:185: The return type is incompatible with TypedArray.findIndex(TypedArray.FindIndexCallbackFn)
Error:Uint32Array.java:188: The return type is incompatible with TypedArray.findLastIndex(TypedArray.FindLastIndexCallbackFn, S)
Error:Uint32Array.java:189: The return type is incompatible with TypedArray.findLastIndex(TypedArray.FindLastIndexCallbackFn)
Error:Uint32Array.java:205: The return type is incompatible with TypedArray.indexOf(double)
Error:Uint32Array.java:210: The return type is incompatible with TypedArray.lastIndexOf(double)
Error:Uint8Array.java:21: The type Uint8Array must implement the inherited abstract method TypedArray.copyWithin(int, int)
Error:Uint8Array.java:21: The type Uint8Array must implement the inherited abstract method TypedArray.copyWithin(int, int, int)
Error:Uint8Array.java:21: The type Uint8Array must implement the inherited abstract method TypedArray.set(TypedArray.SetArrayUnionType, int)
Error:Uint8Array.java:21: The type Uint8Array must implement the inherited abstract method TypedArray.at(int)
Error:Uint8Array.java:21: The type Uint8Array must implement the inherited abstract method TypedArray.subarray(int)
Error:Uint8Array.java:21: The type Uint8Array must implement the inherited abstract method TypedArray.subarray(int, int)
Error:Uint8Array.java:21: The type Uint8Array must implement the inherited abstract method TypedArray.fill(double, int)
Error:Uint8Array.java:21: The type Uint8Array must implement the inherited abstract method TypedArray.fill(double, int, int)
Error:Uint8Array.java:21: The type Uint8Array must implement the inherited abstract method TypedArray.slice(int)
Error:Uint8Array.java:21: The type Uint8Array must implement the inherited abstract method TypedArray.slice(int, int)
Error:Uint8Array.java:21: The type Uint8Array must implement the inherited abstract method TypedArray.toString_()
Error:Uint8Array.java:21: The type Uint8Array must implement the inherited abstract method TypedArray.indexOf(double, int)
Error:Uint8Array.java:21: The type Uint8Array must implement the inherited abstract method TypedArray.includes(double, int)
Error:Uint8Array.java:21: The type Uint8Array must implement the inherited abstract method TypedArray.lastIndexOf(double, int)
Error:Uint8Array.java:21: The type Uint8Array must implement the inherited abstract method TypedArray.toLocaleString()
Error:Uint8Array.java:184: The return type is incompatible with TypedArray.findIndex(TypedArray.FindIndexCallbackFn, S)
Error:Uint8Array.java:185: The return type is incompatible with TypedArray.findIndex(TypedArray.FindIndexCallbackFn)
Error:Uint8Array.java:188: The return type is incompatible with TypedArray.findLastIndex(TypedArray.FindLastIndexCallbackFn, S)
Error:Uint8Array.java:189: The return type is incompatible with TypedArray.findLastIndex(TypedArray.FindLastIndexCallbackFn)
Error:Uint8Array.java:205: The return type is incompatible with TypedArray.indexOf(double)
Error:Uint8Array.java:210: The return type is incompatible with TypedArray.lastIndexOf(double)
Error:Uint8ClampedArray.java:21: The type Uint8ClampedArray must implement the inherited abstract method TypedArray.copyWithin(int, int)
Error:Uint8ClampedArray.java:21: The type Uint8ClampedArray must implement the inherited abstract method TypedArray.copyWithin(int, int, int)
Error:Uint8ClampedArray.java:21: The type Uint8ClampedArray must implement the inherited abstract method TypedArray.set(TypedArray.SetArrayUnionType, int)
Error:Uint8ClampedArray.java:21: The type Uint8ClampedArray must implement the inherited abstract method TypedArray.at(int)
Error:Uint8ClampedArray.java:21: The type Uint8ClampedArray must implement the inherited abstract method TypedArray.subarray(int)
Error:Uint8ClampedArray.java:21: The type Uint8ClampedArray must implement the inherited abstract method TypedArray.subarray(int, int)
Error:Uint8ClampedArray.java:21: The type Uint8ClampedArray must implement the inherited abstract method TypedArray.fill(double, int)
Error:Uint8ClampedArray.java:21: The type Uint8ClampedArray must implement the inherited abstract method TypedArray.fill(double, int, int)
Error:Uint8ClampedArray.java:21: The type Uint8ClampedArray must implement the inherited abstract method TypedArray.slice(int)
Error:Uint8ClampedArray.java:21: The type Uint8ClampedArray must implement the inherited abstract method TypedArray.slice(int, int)
Error:Uint8ClampedArray.java:21: The type Uint8ClampedArray must implement the inherited abstract method TypedArray.toString_()
Error:Uint8ClampedArray.java:21: The type Uint8ClampedArray must implement the inherited abstract method TypedArray.indexOf(double, int)
Error:Uint8ClampedArray.java:21: The type Uint8ClampedArray must implement the inherited abstract method TypedArray.includes(double, int)
Error:Uint8ClampedArray.java:21: The type Uint8ClampedArray must implement the inherited abstract method TypedArray.lastIndexOf(double, int)
Error:Uint8ClampedArray.java:21: The type Uint8ClampedArray must implement the inherited abstract method TypedArray.toLocaleString()
Error:Uint8ClampedArray.java:184: The return type is incompatible with TypedArray.findIndex(TypedArray.FindIndexCallbackFn, S)
Error:Uint8ClampedArray.java:185: The return type is incompatible with TypedArray.findIndex(TypedArray.FindIndexCallbackFn)
Error:Uint8ClampedArray.java:188: The return type is incompatible with TypedArray.findLastIndex(TypedArray.FindLastIndexCallbackFn, S)
Error:Uint8ClampedArray.java:189: The return type is incompatible with TypedArray.findLastIndex(TypedArray.FindLastIndexCallbackFn)
Error:Uint8ClampedArray.java:205: The return type is incompatible with TypedArray.indexOf(double)
Error:Uint8ClampedArray.java:210: The return type is incompatible with TypedArray.lastIndexOf(double)```

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking quickly at the integer_entities (for some related work, to be submitted as a PR soon), I suspect we just need to duplicate the entities found in TypedArray, as it will now be an interface, and classes that implement it now must declare the same signature, rather than just inheriting the native impl.

As an example, for these Uint8Array enjtries:

Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.copyWithin(int, int)
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.copyWithin(int, int, int)
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.set(TypedArray.SetArrayUnionType, int)
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.at(int)
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.subarray(int)
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.subarray(int, int)
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.fill(double, int)
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.fill(double, int, int)
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.slice(int)
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.slice(int, int)
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.toString_()
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.indexOf(double, int)
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.includes(double, int)
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.lastIndexOf(double, int)
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.toLocaleString()

I think the following integer entities, will resolve most of the above (sorted by the order of the errors above they will resolve, not alphabetical as expected):

elemental2.core.Uint8Array.copyWithin.target
elemental2.core.Uint8Array.copyWithin.start
elemental2.core.Uint8Array.copyWithin.end
elemental2.core.Uint8Array.set.offset
elemental2.core.Uint8Array.at.index
elemental2.core.Uint8Array.subarray.begin
elemental2.core.Uint8Array.subarray.end
elemental2.core.Uint8Array.fill.begin
elemental2.core.Uint8Array.fill.end
elemental2.core.Uint8Array.slice.begin
elemental2.core.Uint8Array.slice.end
elemental2.core.Uint8Array.indexOf
elemental2.core.Uint8Array.indexOf.fromIndex
elemental2.core.Uint8Array.includes.fromIndex
elemental2.core.Uint8Array.lastIndexOf
elemental2.core.Uint8Array.lastIndexOf.fromIndex

This leaves the following, which I don't yet understand:

Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.toString_()
Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.toLocaleString()

and this, which I'm not certain will be resolved (but might be, if the union type is inherited correctly):

Error:Int8Array.java:21: The type Int8Array must implement the inherited abstract method TypedArray.set(TypedArray.SetArrayUnionType, int)

Expand Down