Skip to content

Commit

Permalink
fix: changing x[0] to x[0][0][0]
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinit-Pandit committed Nov 24, 2024
1 parent 1bb0938 commit 5fa1a7c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function fcn( x: number, y: number, z: number ): number {
const shapes: [ Array<number>, Array<number>, Array<number>, Array<number> ] = [ [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ]];

bternary4d( [ x, y, z, out ], shapes, fcn ); // $ExpectType void
bternary4d( [ x[0], y, z, out ], [ shapes[ 0 ][ 2 ], shapes[ 1 ], shapes[ 2 ], shapes[ 3 ] ], fcn ); // $ExpectType void
bternary4d( [ x[0][0][0], y, z, out ], [ shapes[ 0 ][ 2 ], shapes[ 1 ], shapes[ 2 ], shapes[ 3 ] ], fcn ); // $ExpectType void
}

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

0 comments on commit 5fa1a7c

Please sign in to comment.