Skip to content

Commit 7dfe0d2

Browse files
committed
feat!: refactor declarations to use Collection type
1 parent cac067c commit 7dfe0d2

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

lib/node_modules/@stdlib/array/base/cartesian-square/docs/types/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
* limitations under the License.
1717
*/
1818

19-
// TypeScript Version: 2.0
19+
// TypeScript Version: 4.1
2020

2121
/// <reference types="@stdlib/types"/>
2222

23-
import { ArrayLike } from '@stdlib/types/array';
23+
import { Collection } from '@stdlib/types/object';
2424

2525
/**
2626
* Returns the Cartesian square.
@@ -38,7 +38,7 @@ import { ArrayLike } from '@stdlib/types/array';
3838
* var out = cartesianSquare( x );
3939
* // returns [ [ 1, 1 ], [ 1, 2 ], [ 2, 1 ], [ 2, 2 ] ]
4040
*/
41-
declare function cartesianSquare<T>( x: ArrayLike<T> ): Array<Array<T>>;
41+
declare function cartesianSquare<T = any>( x: Collection<T> ): Array<Array<T>>;
4242

4343

4444
// EXPORTS //

lib/node_modules/@stdlib/array/base/cartesian-square/docs/types/test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import cartesianSquare = require( './index' );
2626
cartesianSquare( [ 1, 2, 3, 4 ] ); // $ExpectType number[][]
2727
cartesianSquare<number>( [ 1, 2, 3, 4 ] ); // $ExpectType number[][]
2828
cartesianSquare<string>( [ '1', '2', '3', '4' ] ); // $ExpectType string[][]
29-
cartesianSquare<any>( [ 1, 2, 3, 4 ] ); // $ExpectType any[][]
3029
}
3130

3231
// The compiler throws an error if the function is provided a first argument which is not an array-like object...

0 commit comments

Comments
 (0)