Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 91c7c1e

Browse filesBrowse files
johanblumenbergleebyron
authored andcommitted
Provide default type to first() and last() (immutable-js#1676)
1 parent 751082f commit 91c7c1e
Copy full SHA for 91c7c1e

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎type-definitions/Immutable.d.ts

Copy file name to clipboardExpand all lines: type-definitions/Immutable.d.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3878,15 +3878,15 @@ declare module Immutable {
38783878
* In case the `Collection` is empty returns the optional default
38793879
* value if provided, if no default value is provided returns undefined.
38803880
*/
3881-
first<NSV>(notSetValue?: NSV): V | NSV;
3881+
first<NSV = undefined>(notSetValue?: NSV): V | NSV;
38823882

38833883
/**
38843884
* In case the `Collection` is not empty returns the last element of the
38853885
* `Collection`.
38863886
* In case the `Collection` is empty returns the optional default
38873887
* value if provided, if no default value is provided returns undefined.
38883888
*/
3889-
last<NSV>(notSetValue?: NSV): V | NSV;
3889+
last<NSV = undefined>(notSetValue?: NSV): V | NSV;
38903890

38913891
// Reading deep values
38923892

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.