8000 Auto-generated commit · stdlib-js/utils-unshift@3336489 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3336489

Browse files
committed
Auto-generated commit
1 parent a2ad12e commit 3336489

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

.github/.keepalive

Lines changed: 0 additions & 1 deletion
This file was deleted.

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Joey Reed <joeyrreed@gmail.com>
1616
Jordan-Gallivan <115050475+Jordan-Gallivan@users.noreply.github.com>
1717
Joris Labie <joris.labie1@gmail.com>
1818
Justin Dennison <justin1dennison@gmail.com>
19+
KATTA NAGA NITHIN <88046362+nithinkatta@users.noreply.github.com>
1920
Marcus <mfantham@users.noreply.github.com>
2021
Matt Cochrane <matthew.cochrane.eng@gmail.com>
2122
Milan Raj <rajsite@users.noreply.github.com>

docs/types/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* limitations under the License.
1717
*/
1818

19-
// TypeScript Version: 2.0
19+
// TypeScript Version: 4.1
2020

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

@@ -49,7 +49,7 @@ import { Collection } from '@stdlib/types/object';
4949
* arr = unshift( arr, 6.0, 7.0 );
5050
* // returns <Float64Array>[ 6.0, 7.0, 1.0, 2.0, 3.0, 4.0, 5.0 ]
5151
*/
52-
declare function unshift( collection: Collection, ...items: Array<any> ): Collection; // tslint-disable-line max-line-length
52+
declare function unshift<T = any, U = any>( collection: Collection<T>, ...items: Array<U> ): Collection<T | U>; // tslint-disable-line max-line-length
5353

5454

5555
// EXPORTS //

docs/types/test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ import unshift = require( './index' );
2323

2424
// The function returns the updated input collection ...
2525
{
26-
unshift( [ 2, 3 ], 1 ); // $ExpectType Collection
27-
unshift( [ 'a', 'b', 'c' ], 'z' ); // $ExpectType Collection
28-
unshift( [ true, false ], false ); // $ExpectType Collection
29-
unshift( [ true, true ], true ); // $ExpectType Collection
26+
unshift( [ 2, 3 ], 1 ); // $ExpectType Collection<number>
27+
unshift( [ 'a', 'b', 'c' ], 'z' ); // $ExpectType Collection<string>
28+
unshift( [ true, false ], false ); // $ExpectType Collection<boolean>
29+
unshift( [ true, true ], true ); // $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
< 30E2 span class="prc-VisuallyHidden-VisuallyHidden-UNWQp"> (0)
0