Skip to content

Commit 0f5ff18

Browse files
committed
fix: update import path for Collection type definition
Ref: bde4671
1 parent a2a7714 commit 0f5ff18

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/node_modules/@stdlib/utils/append/docs/types/index.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

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

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

2525
/**
2626
* Adds elements from one collection to the end of another collection.
@@ -44,7 +44,7 @@ import { Collection } from '@stdlib/types/object';
4444
* arr = append( arr, [ 6.0, 7.0 ] );
4545
* // returns <Float64Array>[ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ]
4646
*/
47-
declare function append( collection1: Collection, collection2: Collection ): Collection; // tslint-disable-line max-line-length
47+
declare function append<T = unknown, U = unknown>( collection1: Collection<T>, collection2: Collection<U> ): Collection<T | U>;
4848

4949

5050
// EXPORTS //

lib/node_modules/@stdlib/utils/append/docs/types/test.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ import append = require( './index' );
2323

2424
// The function returns a collection...
2525
{
26-
append( [ 0, 0 ], [ 1, 1 ] ); // $ExpectType Collection
27-
append( [ false, true ], [ 0, 1 ] ); // $ExpectType Collection
28-
append( [ 'abc', 'abc' ], [ 0, 1 ] ); // $ExpectType Collection
29-
append( [ true, true ], [ false, false ] ); // $ExpectType Collection
26+
append( [ 0, 0 ], [ 1, 1 ] ); // $ExpectType Collection<number>
27+
append( [ false, true ], [ 0, 1 ] ); // $ExpectType Collection<number | boolean>
28+
append( [ 'abc', 'abc' ], [ 0, 1 ] ); // $ExpectType Collection<string | number>
29+
append( [ true, true ], [ false, false ] ); // $ExpectType Collection<boolean>
3030
}
3131

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

0 commit comments

Comments
 (0)