Skip to content

Commit e584301

Browse files
zthglennsl
andauthored
Array docstrings (#78)
* start working on Array docstrings * docs for indexOf and includes * remove Array.fromIterator + friends in favor of specialized functions in Iterator * more array docstrings * changelog * remove unsafe Array.from functions * more array docstrings * Apply suggestions from code review Co-authored-by: Glenn Slotte <[email protected]> * add back accidentally removed fns * fixes after PR review * more tweaks after PR comments --------- Co-authored-by: Glenn Slotte <[email protected]>
1 parent e042948 commit e584301

File tree

6 files changed

+844
-53
lines changed

6 files changed

+844
-53
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
- Add `panic`/`Error.panic`. https://github.com/rescript-association/rescript-core/pull/72
2626
- The globally available `null` value now originates from `Nullable` and not `Null`, just like the globally available `undefined` value does. https://github.com/rescript-association/rescript-core/pull/88
2727
- Add `Int.range` and `Int.rangeWithOptions`, https://github.com/rescript-association/rescript-core/pull/52
28+
- Remove `Array.fromIterator` and `Array.fromIteratorWithMap`. The same functions exist in `Iterator` as `Iterator.fromArray` and `Iterator.fromArrayWithMapper`. https://github.com/rescript-association/rescript-core/pull/78
29+
- Remove unsafe `Array.from` and `Array.fromWithMap`. https://github.com/rescript-association/rescript-core/pull/78
2830

2931
### Documentation
3032

src/Core__Array.res

-6
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,10 @@
33
external getUnsafe: (array<'a>, int) => 'a = "%array_unsafe_get"
44
external setUnsafe: (array<'a>, int, 'a) => unit = "%array_unsafe_set"
55

6-
@val external from: 'a => array<'b> = "Array.from"
7-
@val external fromWithMap: ('a, 'b => 'c) => array<'c> = "Array.from"
8-
96
@val external fromArrayLike: Js.Array2.array_like<'a> => array<'a> = "Array.from"
107
@val
118
external fromArrayLikeWithMap: (Js.Array2.array_like<'a>, 'a => 'b) => array<'b> = "Array.from"
129

13-
@val external fromIterator: Core__Iterator.t<'a> => array<'a> = "Array.from"
14-
@val external fromIteratorWithMap: (Core__Iterator.t<'a>, 'a => 'b) => array<'b> = "Array.from"
15-
1610
@send external fillAllInPlace: (array<'a>, 'a) => unit = "fill"
1711

1812
@send external fillInPlaceToEnd: (array<'a>, 'a, ~start: int) => unit = "fill"

0 commit comments

Comments
 (0)