Skip to content

Commit 4673f3c

Browse files
committed
style: resolve lint failures
--- 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 4b9e23e commit 4673f3c

2 files changed

Lines changed: 5 additions & 97 deletions

File tree

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

Lines changed: 5 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -621,9 +621,6 @@ declare class Float16Array {
621621
* var arr = new Float16Array( [ 1.0, 2.0, 3.0 ] );
622622
*
623623
* arr.forEach( log );
624-
* // => 0: 1
625-
* // => 1: 2
626-
* // => 2: 3
627624
*/
628625
forEach<U = unknown>( fcn: Callback<U>, thisArg?: ThisParameterType<Callback<U>> ): void;
629626

@@ -742,13 +739,13 @@ declare class Float16Array {
742739
* var out = arr.map( scale );
743740
* // returns <Float16Array>
744741
*
745-
* var v = out.get( 0 );
742+
* var v = out[ 0 ];
746743
* // returns 2.0
747744
*
748-
* v = out.get( 1 );
745+
* v = out[ 1 ];
749746
* // returns 4.0
750747
*
751-
* v = out.get( 2 );
748+
* v = out[ 2 ];
752749
* // returns 6.0
753750
*/
754751
map<U = unknown>( fcn: MapFcn<U>, thisArg?: ThisParameterType<MapFcn<U>> ): Float16Array;
@@ -1178,70 +1175,6 @@ interface Float16ArrayConstructor {
11781175
*/
11791176
new( arg?: number | ArrayLike<number> | ArrayBuffer | Iterable<number>, byteOffset?: number, length?: number ): Float16Array;
11801177

1181-
/**
1182-
* Half-precision floating-point number array constructor.
1183-
*
1184-
* @param arg - length, typed array, array-like object, or buffer
1185-
* @param byteOffset - byte offset (default: 0)
1186-
* @param length - view length
1187-
* @throws if provided only a single argument, must provide a valid argument
1188-
* @throws byte offset must be a nonnegative integer
1189-
* @throws must provide sufficient memory to accommodate byte offset and view length requirements
1190-
* @returns half-precision floating-point number array
1191-
*
1192-
* @example
1193-
* var arr = new Float16Array();
1194-
* // returns <Float16Array>
1195-
*
1196-
* var len = arr.length;
1197-
* // returns 0
1198-
*
1199-
* @example
1200-
* var arr = new Float16Array( 2 );
1201-
* // returns <Float16Array>
1202-
*
1203-
* var len = arr.length;
1204-
* // returns 2
1205-
*
1206-
* @example
1207-
* var arr = new Float16Array( [ 1.0, 2.0 ] );
1208-
* // returns <Float16Array>
1209-
*
1210-
* var len = arr.length;
1211-
* // returns 2
1212-
*
1213-
* @example
1214-
* var ArrayBuffer = require( '@stdlib/array/buffer' );
1215-
*
1216-
* var buf = new ArrayBuffer( 16 );
1217-
* var arr = new Float16Array( buf );
1218-
* // returns <Float16Array>
1219-
*
1220-
* var len = arr.length;
1221-
* // returns 8
1222-
*
1223-
* @example
1224-
* var ArrayBuffer = require( '@stdlib/array/buffer' );
1225-
*
1226-
* var buf = new ArrayBuffer( 16 );
1227-
* var arr = new Float16Array( buf, 8 );
1228-
* // returns <Float16Array>
1229-
*
1230-
* var len = arr.length;
1231-
* // returns 4
1232-
*
1233-
* @example
1234-
* var ArrayBuffer = require( '@stdlib/array/buffer' );
1235-
*
1236-
* var buf = new ArrayBuffer( 32 );
1237-
* var arr = new Float16Array( buf, 8, 2 );
1238-
* // returns <Float16Array>
1239-
*
1240-
* var len = arr.length;
1241-
* // returns 2
1242-
*/
1243-
( arg?: number | ArrayLike<number> | ArrayBuffer | Iterable<number>, byteOffset?: number, length?: number ): Float16Array;
1244-
12451178
/**
12461179
* Constructor name.
12471180
*
@@ -1375,3 +1308,5 @@ declare var ctor: Float16ArrayConstructor;
13751308
// EXPORTS //
13761309

13771310
export = ctor;
1311+
1312+
// eslint-doctest-alias: Float16Array

lib/node_modules/@stdlib/array/float16/docs/types/test.ts

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,13 @@ function clbk( v: number ): number {
3737
// The function returns a half-precision floating-point number array...
3838
{
3939
new Float16Array(); // $ExpectType Float16Array
40-
Float16Array(); // $ExpectType Float16Array
4140
new Float16Array( 2 ); // $ExpectType Float16Array
42-
Float16Array( 2 ); // $ExpectType Float16Array
4341
new Float16Array( [ 1.0, -1.0 ] ); // $ExpectType Float16Array
44-
Float16Array( [ 1.0, -1.0 ] ); // $ExpectType Float16Array
4542

4643
const buf = new ArrayBuffer( 16 );
4744
new Float16Array( buf ); // $ExpectType Float16Array
48-
Float16Array( buf ); // $ExpectType Float16Array
4945
new Float16Array( buf, 8 ); // $ExpectType Float16Array
50-
Float16Array( buf, 8 ); // $ExpectType Float16Array
5146
new Float16Array( buf, 8, 2 ); // $ExpectType Float16Array
52-
Float16Array( buf, 8, 2 ); // $ExpectType Float16Array
5347
}
5448

5549
// The compiler throws an error if the function is provided a first argument that is not a number, typed array, array-like object, or array buffer...
@@ -60,13 +54,6 @@ function clbk( v: number ): number {
6054
new Float16Array( 'abc' ); // $ExpectError
6155
new Float16Array( {} ); // $ExpectError
6256
new Float16Array( ( x: number ): number => x ); // $ExpectError
63-
64-
Float16Array( true ); // $ExpectError
65-
Float16Array( false ); // $ExpectError
66-
Float16Array( null ); // $ExpectError
67-
Float16Array( 'abc' ); // $ExpectError
68-
Float16Array( {} ); // $ExpectError
69-
Float16Array( ( x: number ): number => x ); // $ExpectError
7057
}
7158

7259
// The compiler throws an error if the function is provided a second argument that is not a number...
@@ -78,13 +65,6 @@ function clbk( v: number ): number {
7865
new Float16Array( buf, 'abc' ); // $ExpectError
7966
new Float16Array( buf, {} ); // $ExpectError
8067
new Float16Array( buf, ( x: number ): number => x ); // $ExpectError
81-
82-
Float16Array( buf, true ); // $ExpectError
83-
Float16Array( buf, false ); // $ExpectError
84-
Float16Array( buf, null ); // $ExpectError
85-
Float16Array( buf, 'abc' ); // $ExpectError
86-
Float16Array( buf, {} ); // $ExpectError
87-
Float16Array( buf, ( x: number ): number => x ); // $ExpectError
8868
}
8969

9070
// The compiler throws an error if the function is provided a third argument that is not a number...
@@ -96,13 +76,6 @@ function clbk( v: number ): number {
9676
new Float16Array( buf, 8, 'abc' ); // $ExpectError
9777
new Float16Array( buf, 8, {} ); // $ExpectError
9878
new Float16Array( buf, 8, ( x: number ): number => x ); // $ExpectError
99-
100-
Float16Array( buf, 8, true ); // $ExpectError
101-
Float16Array( buf, 8, false ); // $ExpectError
102-
Float16Array( buf, 8, null ); // $ExpectError
103-
Float16Array( buf, 8, 'abc' ); // $ExpectError
104-
Float16Array( buf, 8, {} ); // $ExpectError
105-
Float16Array( buf, 8, ( x: number ): number => x ); // $ExpectError
10679
}
10780

10881
// The `from` method returns a half-precision floating-point number array...

0 commit comments

Comments
 (0)