Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/@rescript/runtime/Stdlib_ArrayBuffer.res
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ type t
})
@send
external sliceToEnd: (t, ~start: int) => t = "slice"

external ignore: t => unit = "%ignore"
8 changes: 8 additions & 0 deletions packages/@rescript/runtime/Stdlib_ArrayBuffer.resi
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,11 @@ ArrayBuffer.byteLength(sliced) == 8
})
@send
external sliceToEnd: (t, ~start: int) => t = "slice"

/**
`ignore(arrayBuffer)` ignores the provided arrayBuffer and returns unit.

This helper is useful when you want to discard a value (for example, the result of an operation with side effects)
without having to store or process it further.
*/
external ignore: t => unit = "%ignore"
2 changes: 2 additions & 0 deletions packages/@rescript/runtime/Stdlib_Bool.res
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ let fromStringExn = fromStringOrThrow
external compare: (bool, bool) => Stdlib_Ordering.t = "%compare"

external equal: (bool, bool) => bool = "%equal"

external ignore: bool => unit = "%ignore"
8 changes: 8 additions & 0 deletions packages/@rescript/runtime/Stdlib_Bool.resi
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,11 @@ Bool.equal(false, true) == false
```
*/
external equal: (bool, bool) => bool = "%equal"

/**
`ignore(bool)` ignores the provided boolean and returns unit.

This helper is useful when you want to discard a value (for example, the result of an operation with side effects)
without having to store or process it further.
*/
external ignore: bool => unit = "%ignore"
2 changes: 2 additions & 0 deletions packages/@rescript/runtime/Stdlib_Lazy.res
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,5 @@ let from_val = (type a, value: a): t<a> => {
let make = from_fun
let get = force
let isEvaluated = is_val

external ignore: t<'a> => unit = "%ignore"
8 changes: 8 additions & 0 deletions packages/@rescript/runtime/Stdlib_Lazy.resi
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,11 @@ let from_val: 'a => t<'a>
migrate: Lazy.isEvaluated(),
})
let is_val: t<'a> => bool

/**
`ignore(lazyValue)` ignores the provided lazy value and returns unit.

This helper is useful when you want to discard a lazy value (for example, when only its side effects matter)
without having to store or process it further.
*/
external ignore: t<'a> => unit = "%ignore"
Loading