Skip to content

Commit dcf2929

Browse files
committed
Update types
1 parent 7b129a5 commit dcf2929

File tree

2 files changed

+65
-67
lines changed

2 files changed

+65
-67
lines changed

lib/node_modules/@stdlib/types/index.d.ts

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,28 @@ declare module '@stdlib/types/iter' {
223223
declare module '@stdlib/types/ndarray' {
224224
import { ArrayLike } from '@stdlib/types/array';
225225

226+
/**
227+
* Array order.
228+
*
229+
* ## Notes
230+
*
231+
* - The array order is either row-major (C-style) or column-major (Fortran-style).
232+
*/
233+
type Order = 'row-major' | 'column-major';
234+
235+
/**
236+
* Array index mode.
237+
*
238+
* ## Notes
239+
*
240+
* - The following index modes are supported:
241+
*
242+
* - `throw`: specifies that a function should throw an error when an index is outside a restricted interval.
243+
* - `wrap`: specifies that a function should wrap around an index using modulo arithmetic.
244+
* - `clamp`: specifies that a function should set an index less than zero to zero (minimum index) and set an index greater than a maximum index value to the maximum possible index.
245+
*/
246+
type Mode = 'throw' | 'clamp' | 'wrap';
247+
226248
/**
227249
* Interface describing an ndarray.
228250
*
@@ -309,7 +331,7 @@ declare module '@stdlib/types/ndarray' {
309331
*
310332
* - The array order is either row-major (C-style) or column-major (Fortran-style).
311333
*/
312-
order: 'row-major' | 'column-major';
334+
order: Order;
313335

314336
/**
315337
* Array shape.
@@ -345,30 +367,6 @@ declare module '@stdlib/types/ndarray' {
345367
*/
346368
set( ...args: Array<any> ): ndarray;
347369
}
348-
349-
/**
350-
* Array order.
351-
*
352-
* ## Notes
353-
*
354-
* - The array order is either row-major (C-style) or column-major (Fortran-style).
355-
*/
356-
type Order = 'row-major' | 'column-major';
357-
358-
/**
359-
* Array index mode.
360-
*
361-
* ## Notes
362-
*
363-
* - The following index modes are supported:
364-
*
365-
* - throw: specifies that a function should throw an error when an index is outside a restricted interval.
366-
*
367-
* - wrap: specifies that a function should wrap around an index using modulo arithmetic.
368-
*
369-
* - clamp: specifies that a function should set an index less than zero to zero (minimum index) and set an index greater than a maximum index value to the maximum possible index.
370-
*/
371-
type Mode = 'throw' | 'clamp' | 'wrap';
372370
}
373371

374372
/**

lib/node_modules/@stdlib/types/test.ts

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,20 @@ import * as random from '@stdlib/types/random';
3131
*/
3232
function createIterator1(): iter.Iterator {
3333
return {
34-
'next': next
34+
'next': next1
3535
};
36+
}
3637

37-
/**
38-
* Implements the iterator protocol `next` method.
39-
*
40-
* @returns iterator protocol-compliant object
41-
*/
42-
function next(): iter.IteratorResult {
43-
return {
44-
'value': true,
45-
'done': false
46-
};
47-
}
38+
/**
39+
* Implements the iterator protocol `next` method.
40+
*
41+
* @returns iterator protocol-compliant object
42+
*/
43+
function next1(): iter.IteratorResult {
44+
return {
45+
'value': true,
46+
'done': false
47+
};
4848
}
4949

5050
/**
@@ -54,19 +54,19 @@ function createIterator1(): iter.Iterator {
5454
*/
5555
function createIterator2(): iter.Iterator {
5656
return {
57-
'next': next
57+
'next': next2
5858
};
59+
}
5960

60-
/**
61-
* Implements the iterator protocol `next` method.
62-
*
63-
* @returns iterator protocol-compliant object
64-
*/
65-
function next(): iter.IteratorResult {
66-
return {
67-
'done': true
68-
};
69-
}
61+
/**
62+
* Implements the iterator protocol `next` method.
63+
*
64+
* @returns iterator protocol-compliant object
65+
*/
66+
function next2(): iter.IteratorResult {
67+
return {
68+
'done': true
69+
};
7070
}
7171

7272
/**
@@ -76,29 +76,29 @@ function createIterator2(): iter.Iterator {
7676
*/
7777
function createIterableIterator(): iter.IterableIterator {
7878
return {
79-
'next': next,
79+
'next': next3,
8080
[ Symbol.iterator ]: factory
8181
};
82+
}
8283

83-
/**
84-
* Implements the iterator protocol `next` method.
85-
*
86-
* @returns iterator protocol-compliant object
87-
*/
88-
function next(): iter.IteratorResult {
89-
return {
90-
'done': true
91-
};
92-
}
84+
/**
85+
* Implements the iterator protocol `next` method.
86+
*
87+
* @returns iterator protocol-compliant object
88+
*/
89+
function next3(): iter.IteratorResult {
90+
return {
91+
'done': true
92+
};
93+
}
9394

94-
/**
95-
* Returns an iterable iterator protocol-compliant object.
96-
*
97-
* @returns iterable iterator protocol-compliant object
98-
*/
99-
function factory(): iter.IterableIterator {
100-
return createIterableIterator();
101-
}
95+
/**
96+
* Returns an iterable iterator protocol-compliant object.
97+
*
98+
* @returns iterable iterator protocol-compliant object
99+
*/
100+
function factory(): iter.IterableIterator {
101+
return createIterableIterator();
102102
}
103103

104104

0 commit comments

Comments
 (0)