Skip to content

Commit

Permalink
refactor: use predefined type
Browse files Browse the repository at this point in the history
  • Loading branch information
kgryte committed Aug 24, 2023
1 parent 1688d3d commit 2189642
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

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

import { Collection } from '@stdlib/types/array';
import { Collection, Array5D } from '@stdlib/types/array';

/**
* Returns a five-dimensional nested array filled with ones.
Expand All @@ -32,7 +32,7 @@ import { Collection } from '@stdlib/types/array';
* var out = ones5d( [ 1, 1, 1, 1, 3 ] );
* // returns [ [ [ [ [ 1.0, 1.0, 1.0 ] ] ] ] ]
*/
declare function ones5d( shape: Collection<number> ): Array<Array<Array<Array<Array<number>>>>>;
declare function ones5d( shape: Collection<number> ): Array5D<number>;


// EXPORTS //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import ones5d = require( './index' );

// The function returns a nested array...
{
ones5d( [ 1, 1, 1, 1, 3 ] ); // $ExpectType number[][][][][]
ones5d( [ 1, 1, 1, 1, 3 ] ); // $ExpectType Array5D<number>
}

// The compiler throws an error if the function is provided a first argument which is not an array of numbers...
Expand Down

1 comment on commit 2189642

@stdlib-bot
Copy link
Contributor

Choose a reason for hiding this comment

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

Coverage Report

Package Statements Branches Functions Lines
array/base/flatten-by $\color{green}384/384$
$\color{green}+100.00\%$
$\color{green}18/18$
$\color{green}+100.00\%$
$\color{green}5/5$
$\color{green}+100.00\%$
$\color{green}384/384$
$\color{green}+100.00\%$
array/base/flatten2d-by $\color{green}275/275$
$\color{green}+100.00\%$
$\color{green}15/15$
$\color{green}+100.00\%$
$\color{green}2/2$
$\color{green}+100.00\%$
$\color{green}275/275$
$\color{green}+100.00\%$
array/base/flatten2d $\color{green}243/243$
$\color{green}+100.00\%$
$\color{green}15/15$
$\color{green}+100.00\%$
$\color{green}2/2$
$\color{green}+100.00\%$
$\color{green}243/243$
$\color{green}+100.00\%$
array/base/flatten3d-by $\color{green}296/296$
$\color{green}+100.00\%$
$\color{green}21/21$
$\color{green}+100.00\%$
$\color{green}2/2$
$\color{green}+100.00\%$
$\color{green}296/296$
$\color{green}+100.00\%$
array/base/flatten3d $\color{green}260/260$
$\color{green}+100.00\%$
$\color{green}20/20$
$\color{green}+100.00\%$
$\color{green}2/2$
$\color{green}+100.00\%$
$\color{green}260/260$
$\color{green}+100.00\%$
array/base/flatten4d-by $\color{green}315/315$
$\color{green}+100.00\%$
$\color{green}25/25$
$\color{green}+100.00\%$
$\color{green}2/2$
$\color{green}+100.00\%$
$\color{green}315/315$
$\color{green}+100.00\%$
array/base/flatten4d $\color{green}279/279$
$\color{green}+100.00\%$
$\color{green}25/25$
$\color{green}+100.00\%$
$\color{green}2/2$
$\color{green}+100.00\%$
$\color{green}279/279$
$\color{green}+100.00\%$
array/base/flatten5d-by $\color{green}333/333$
$\color{green}+100.00\%$
$\color{green}25/25$
$\color{green}+100.00\%$
$\color{green}2/2$
$\color{green}+100.00\%$
$\color{green}333/333$
$\color{green}+100.00\%$
array/base/flatten5d $\color{green}301/301$
$\color{green}+100.00\%$
$\color{green}25/25$
$\color{green}+100.00\%$
$\color{green}2/2$
$\color{green}+100.00\%$
$\color{green}301/301$
$\color{green}+100.00\%$
array/base/getter $\color{green}329/329$
$\color{green}+100.00\%$
$\color{green}16/16$
$\color{green}+100.00\%$
$\color{green}12/12$
$\color{green}+100.00\%$
$\color{green}329/329$
$\color{green}+100.00\%$
array/base/n-cartesian-product $\color{green}150/150$
$\color{green}+100.00\%$
$\color{green}7/7$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}150/150$
$\color{green}+100.00\%$
array/base/ones2d $\color{green}293/293$
$\color{green}+100.00\%$
$\color{green}11/11$
$\color{green}+100.00\%$
$\color{green}3/3$
$\color{green}+100.00\%$
$\color{green}293/293$
$\color{green}+100.00\%$
array/base/ones3d $\color{green}301/301$
$\color{green}+100.00\%$
$\color{green}12/12$
$\color{green}+100.00\%$
$\color{green}3/3$
$\color{green}+100.00\%$
$\color{green}301/301$
$\color{green}+100.00\%$
array/base/ones4d $\color{green}309/309$
$\color{green}+100.00\%$
$\color{green}13/13$
$\color{green}+100.00\%$
$\color{green}3/3$
$\color{green}+100.00\%$
$\color{green}309/309$
$\color{green}+100.00\%$
array/base/ones5d $\color{green}317/317$
$\color{green}+100.00\%$
$\color{green}14/14$
$\color{green}+100.00\%$
$\color{green}3/3$
$\color{green}+100.00\%$
$\color{green}317/317$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this push.

Please sign in to comment.