Skip to content

Commit f910a92

Browse files
committed
feat: support boolean arrays
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed ---
1 parent 22271ae commit f910a92

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/node_modules/@stdlib/array/base/slice/docs/types/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

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

23-
import { Collection, TypedArray, ComplexTypedArray } from '@stdlib/types/array';
23+
import { Collection, TypedArray, ComplexTypedArray, BooleanTypedArray } from '@stdlib/types/array';
2424

2525
/**
2626
* Returns a shallow copy of a portion of an array.
@@ -46,7 +46,7 @@ import { Collection, TypedArray, ComplexTypedArray } from '@stdlib/types/array';
4646
* var out = slice( x, 0, 3 );
4747
* // returns <Complex128Array>[ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ]
4848
*/
49-
declare function slice<T extends TypedArray | ComplexTypedArray>( x: T, start: number, end: number ): T;
49+
declare function slice<T extends TypedArray | ComplexTypedArray | BooleanTypedArray>( x: T, start: number, end: number ): T;
5050

5151
/**
5252
* Returns a shallow copy of a portion of an array.

lib/node_modules/@stdlib/array/base/slice/docs/types/test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import Complex128Array = require( '@stdlib/array/complex128' );
2020
import Complex64Array = require( '@stdlib/array/complex64' );
21+
import BooleanArray = require( '@stdlib/array/bool' );
2122
import slice = require( './index' );
2223

2324

@@ -37,6 +38,7 @@ import slice = require( './index' );
3738
slice( new Uint8ClampedArray( [ 1, 2, 3 ] ), 0, 3 ); // $ExpectType Uint8ClampedArray
3839
slice( new Complex128Array( [ 1, 2, 3, 4, 5, 6 ] ), 0, 3 ); // $ExpectType Complex128Array
3940
slice( new Complex64Array( [ 1, 2, 3, 4, 5, 6 ] ), 0, 3 ); // $ExpectType Complex64Array
41+
slice( new BooleanArray( [ true, false, true, false ] ), 0, 3 ); // $ExpectType BooleanArray
4042
}
4143

4244
// The compiler throws an error if the function is provided a first argument which is not a collection...

0 commit comments

Comments
 (0)