File tree 2 files changed +12
-6
lines changed
lib/node_modules/@stdlib/types
2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -111,12 +111,17 @@ declare module '@stdlib/types/array' {
111
111
* }
112
112
* };
113
113
*/
114
- interface AccessorArrayLike < T > extends ArrayLike < T > {
114
+ interface AccessorArrayLike < T > {
115
115
/**
116
116
* Properties.
117
117
*/
118
118
[ key : string ] : any ;
119
119
120
+ /**
121
+ * Number of elements.
122
+ */
123
+ length : number ;
124
+
120
125
/**
121
126
* Returns an array element.
122
127
*
Original file line number Diff line number Diff line change @@ -310,10 +310,11 @@ function cmplx128Array(): array.Complex128Array {
310
310
311
311
// The compiler should not throw an error when using ndarray types...
312
312
{
313
+ const data = [ 1 , 2 , 3 ] ;
313
314
const arr : ndarray . ndarray = {
314
315
'byteLength' : null ,
315
316
'BYTES_PER_ELEMENT' : null ,
316
- 'data' : [ 1 , 2 , 3 ] ,
317
+ 'data' : data ,
317
318
'dtype' : 'generic' ,
318
319
'flags' : {
319
320
'ROW_MAJOR_CONTIGUOUS' : true ,
@@ -325,11 +326,11 @@ function cmplx128Array(): array.Complex128Array {
325
326
'order' : 'row-major' ,
326
327
'shape' : [ 3 ] ,
327
328
'strides' : [ 1 ] ,
328
- 'get' : ( i : number ) : any => {
329
- return arr . data [ i ] ;
329
+ 'get' : ( i : number ) : number => {
330
+ return data [ i ] ;
330
331
} ,
331
- 'set' : ( i : number , v : any ) : ndarray . ndarray => {
332
- arr . data [ i ] = v ;
332
+ 'set' : ( i : number , v : number ) : ndarray . ndarray => {
333
+ data [ i ] = v ;
333
334
return arr ;
334
335
}
335
336
} ;
You can’t perform that action at this time.
0 commit comments