From 0ff4df7313439801db463a8ace2c5b72886d7630 Mon Sep 17 00:00:00 2001 From: tsnobip Date: Mon, 17 Mar 2025 22:19:18 +0100 Subject: [PATCH 1/3] add ignore for every stdlib type t --- lib/es6/Stdlib.js | 7 +++++++ lib/es6/Stdlib_Global.js | 13 +++++++++++- lib/js/Stdlib.js | 7 +++++++ lib/js/Stdlib_Global.js | 11 +++++++++- runtime/Stdlib_Array.res | 2 ++ runtime/Stdlib_Array.resi | 8 ++++++++ runtime/Stdlib_AsyncIterator.res | 2 ++ runtime/Stdlib_AsyncIterator.resi | 9 +++++++++ runtime/Stdlib_BigInt.res | 8 ++++++++ runtime/Stdlib_BigInt64Array.res | 8 ++++++++ runtime/Stdlib_BigUint64Array.res | 8 ++++++++ runtime/Stdlib_DataView.res | 8 ++++++++ runtime/Stdlib_Date.res | 2 ++ runtime/Stdlib_Date.resi | 8 ++++++++ runtime/Stdlib_Dict.res | 2 ++ runtime/Stdlib_Dict.resi | 8 ++++++++ runtime/Stdlib_Error.res | 2 ++ runtime/Stdlib_Error.resi | 8 ++++++++ runtime/Stdlib_Exn.res | 2 ++ runtime/Stdlib_Exn.resi | 8 ++++++++ runtime/Stdlib_Float.res | 2 ++ runtime/Stdlib_Float.resi | 8 ++++++++ runtime/Stdlib_Float32Array.res | 8 ++++++++ runtime/Stdlib_Float64Array.res | 8 ++++++++ runtime/Stdlib_Global.res | 8 ++++++++ runtime/Stdlib_Global.resi | 20 +++++++++++++++++++ runtime/Stdlib_Int.res | 2 ++ runtime/Stdlib_Int.resi | 8 ++++++++ runtime/Stdlib_Int16Array.res | 8 ++++++++ runtime/Stdlib_Int32Array.res | 8 ++++++++ runtime/Stdlib_Int8Array.res | 8 ++++++++ runtime/Stdlib_Intl_Collator.res | 8 ++++++++ runtime/Stdlib_Intl_DateTimeFormat.res | 8 ++++++++ runtime/Stdlib_Intl_ListFormat.res | 8 ++++++++ runtime/Stdlib_Intl_Locale.res | 8 ++++++++ runtime/Stdlib_Intl_NumberFormat.res | 8 ++++++++ runtime/Stdlib_Intl_NumberFormat_Grouping.res | 8 ++++++++ runtime/Stdlib_Intl_PluralRules.res | 8 ++++++++ runtime/Stdlib_Intl_RelativeTimeFormat.res | 8 ++++++++ runtime/Stdlib_Intl_Segmenter.res | 8 ++++++++ runtime/Stdlib_Intl_Segments.res | 8 ++++++++ runtime/Stdlib_Iterator.res | 2 ++ runtime/Stdlib_Iterator.resi | 8 ++++++++ runtime/Stdlib_JSON.res | 2 ++ runtime/Stdlib_JSON.resi | 8 ++++++++ runtime/Stdlib_List.res | 2 ++ runtime/Stdlib_List.resi | 8 ++++++++ runtime/Stdlib_Map.res | 2 ++ runtime/Stdlib_Map.resi | 8 ++++++++ runtime/Stdlib_Null.res | 2 ++ runtime/Stdlib_Null.resi | 8 ++++++++ runtime/Stdlib_Nullable.res | 2 ++ runtime/Stdlib_Nullable.resi | 8 ++++++++ runtime/Stdlib_Object.res | 8 ++++++++ runtime/Stdlib_Option.res | 2 ++ runtime/Stdlib_Option.resi | 8 ++++++++ runtime/Stdlib_Ordering.res | 8 ++++++++ runtime/Stdlib_Promise.res | 2 ++ runtime/Stdlib_Promise.resi | 15 +++++++++++--- runtime/Stdlib_RegExp.res | 2 ++ runtime/Stdlib_RegExp.resi | 8 ++++++++ runtime/Stdlib_Result.res | 2 ++ runtime/Stdlib_Result.resi | 8 ++++++++ runtime/Stdlib_Set.res | 2 ++ runtime/Stdlib_Set.resi | 8 ++++++++ runtime/Stdlib_String.res | 2 ++ runtime/Stdlib_String.resi | 8 ++++++++ runtime/Stdlib_Symbol.res | 2 ++ runtime/Stdlib_Symbol.resi | 8 ++++++++ runtime/Stdlib_Type.res | 2 ++ runtime/Stdlib_Type.resi | 8 ++++++++ runtime/Stdlib_TypedArray.res | 8 ++++++++ runtime/Stdlib_Uint16Array.res | 8 ++++++++ runtime/Stdlib_Uint32Array.res | 8 ++++++++ runtime/Stdlib_Uint8Array.res | 8 ++++++++ runtime/Stdlib_Uint8ClampedArray.res | 8 ++++++++ runtime/Stdlib_WeakMap.res | 8 ++++++++ runtime/Stdlib_WeakSet.res | 8 ++++++++ .../tests/src/expected/Completion.res.txt | 12 +++++++++++ .../tests/src/expected/CompletionJsx.res.txt | 12 +++++++++++ .../src/expected/CompletionJsxProps.res.txt | 6 ++++++ tests/tests/src/core/Core_PromiseTest.res | 14 ++++++------- 82 files changed, 550 insertions(+), 12 deletions(-) diff --git a/lib/es6/Stdlib.js b/lib/es6/Stdlib.js index 39bdaf88ea..3d8f644de2 100644 --- a/lib/es6/Stdlib.js +++ b/lib/es6/Stdlib.js @@ -1,6 +1,7 @@ import * as Stdlib_Error from "./Stdlib_Error.js"; +import * as Stdlib_Global from "./Stdlib_Global.js"; import * as Primitive_object from "./Primitive_object.js"; function assertEqual(a, b) { @@ -18,6 +19,10 @@ function assertEqual(a, b) { }; } +let TimeoutId = Stdlib_Global.TimeoutId; + +let IntervalId = Stdlib_Global.IntervalId; + let $$Array; let $$BigInt; @@ -109,6 +114,8 @@ let $$BigUint64Array; let panic = Stdlib_Error.panic; export { + TimeoutId, + IntervalId, $$Array, $$BigInt, Console, diff --git a/lib/es6/Stdlib_Global.js b/lib/es6/Stdlib_Global.js index ae1b9f17e6..7dc66beca0 100644 --- a/lib/es6/Stdlib_Global.js +++ b/lib/es6/Stdlib_Global.js @@ -1 +1,12 @@ -/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ + + + +let TimeoutId = {}; + +let IntervalId = {}; + +export { + TimeoutId, + IntervalId, +} +/* No side effect */ diff --git a/lib/js/Stdlib.js b/lib/js/Stdlib.js index 4ac16823db..faf8270b03 100644 --- a/lib/js/Stdlib.js +++ b/lib/js/Stdlib.js @@ -1,6 +1,7 @@ 'use strict'; let Stdlib_Error = require("./Stdlib_Error.js"); +let Stdlib_Global = require("./Stdlib_Global.js"); let Primitive_object = require("./Primitive_object.js"); function assertEqual(a, b) { @@ -18,6 +19,10 @@ function assertEqual(a, b) { }; } +let TimeoutId = Stdlib_Global.TimeoutId; + +let IntervalId = Stdlib_Global.IntervalId; + let $$Array; let $$BigInt; @@ -108,6 +113,8 @@ let $$BigUint64Array; let panic = Stdlib_Error.panic; +exports.TimeoutId = TimeoutId; +exports.IntervalId = IntervalId; exports.$$Array = $$Array; exports.$$BigInt = $$BigInt; exports.Console = Console; diff --git a/lib/js/Stdlib_Global.js b/lib/js/Stdlib_Global.js index ae1b9f17e6..fb49ea585b 100644 --- a/lib/js/Stdlib_Global.js +++ b/lib/js/Stdlib_Global.js @@ -1 +1,10 @@ -/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ +'use strict'; + + +let TimeoutId = {}; + +let IntervalId = {}; + +exports.TimeoutId = TimeoutId; +exports.IntervalId = IntervalId; +/* No side effect */ diff --git a/runtime/Stdlib_Array.res b/runtime/Stdlib_Array.res index 011d1cf564..ed6756cb30 100644 --- a/runtime/Stdlib_Array.res +++ b/runtime/Stdlib_Array.res @@ -270,3 +270,5 @@ let findMap = (arr, f) => { @send external at: (array<'a>, int) => option<'a> = "at" let last = a => a->get(a->length - 1) + +external ignore: array<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_Array.resi b/runtime/Stdlib_Array.resi index e2bb72b1e6..13b31972d2 100644 --- a/runtime/Stdlib_Array.resi +++ b/runtime/Stdlib_Array.resi @@ -1255,3 +1255,11 @@ Returns `None` if the array is empty. ``` */ let last: array<'a> => option<'a> + +/** + `ignore(array)` ignores the provided array and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: array<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_AsyncIterator.res b/runtime/Stdlib_AsyncIterator.res index 56abad2837..03504dafc0 100644 --- a/runtime/Stdlib_AsyncIterator.res +++ b/runtime/Stdlib_AsyncIterator.res @@ -35,3 +35,5 @@ let make: (unit => promise>) => t<'value> = %raw(`function makeAsy } } }`) + +external ignore: t<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_AsyncIterator.resi b/runtime/Stdlib_AsyncIterator.resi index 57277875ed..366e6674b1 100644 --- a/runtime/Stdlib_AsyncIterator.resi +++ b/runtime/Stdlib_AsyncIterator.resi @@ -186,3 +186,12 @@ main()->ignore ``` */ let forEach: (t<'a>, option<'a> => unit) => promise + +/** + `ignore(iterator)` ignores the provided async iterator and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. + +*/ +external ignore: t<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_BigInt.res b/runtime/Stdlib_BigInt.res index d5b43cc022..5dbd8ce4e6 100644 --- a/runtime/Stdlib_BigInt.res +++ b/runtime/Stdlib_BigInt.res @@ -92,3 +92,11 @@ external lsl: (bigint, bigint) => bigint = "%lslbigint" external asr: (bigint, bigint) => bigint = "%asrbigint" let lnot = x => lxor(x, -1n) + +/** + `ignore(bigint)` ignores the provided bigint and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: bigint => unit = "%ignore" diff --git a/runtime/Stdlib_BigInt64Array.res b/runtime/Stdlib_BigInt64Array.res index 79e6233ad9..e56d9b0681 100644 --- a/runtime/Stdlib_BigInt64Array.res +++ b/runtime/Stdlib_BigInt64Array.res @@ -52,3 +52,11 @@ external fromArrayLikeOrIterable: 'a => t = "BigInt64Array.from" */ @val external fromArrayLikeOrIterableWithMap: ('a, ('b, int) => bigint) => t = "BigInt64Array.from" + +/** + `ignore(bigIntArray)` ignores the provided bigIntArray and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_BigUint64Array.res b/runtime/Stdlib_BigUint64Array.res index 10d091f2b1..079cd945f3 100644 --- a/runtime/Stdlib_BigUint64Array.res +++ b/runtime/Stdlib_BigUint64Array.res @@ -52,3 +52,11 @@ external fromArrayLikeOrIterable: 'a => t = "BigUint64Array.from" */ @val external fromArrayLikeOrIterableWithMap: ('a, ('b, int) => bigint) => t = "BigUint64Array.from" + +/** + `ignore(bigUintArray)` ignores the provided bigUintArray and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_DataView.res b/runtime/Stdlib_DataView.res index 3143b6570f..7e7f7d9763 100644 --- a/runtime/Stdlib_DataView.res +++ b/runtime/Stdlib_DataView.res @@ -35,3 +35,11 @@ external fromBufferWithRange: (Stdlib_ArrayBuffer.t, ~byteOffset: int, ~length: @send external setBigInt64: (t, int, bigint) => unit = "setBigInt64" @send external setBigUint64: (t, int, bigint) => unit = "setBigUint64" + +/** + `ignore(dataView)` ignores the provided dataView and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Date.res b/runtime/Stdlib_Date.res index e54a400968..78243046df 100644 --- a/runtime/Stdlib_Date.res +++ b/runtime/Stdlib_Date.res @@ -178,3 +178,5 @@ external toLocaleTimeStringWithLocaleAndOptions: (t, string, localeOptions) => s @send external toISOString: t => string = "toISOString" @send external toUTCString: t => string = "toUTCString" @return(nullable) @send external toJSON: t => option = "toJSON" + +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Date.resi b/runtime/Stdlib_Date.resi index 421bf874bd..ac88875b54 100644 --- a/runtime/Stdlib_Date.resi +++ b/runtime/Stdlib_Date.resi @@ -1358,3 +1358,11 @@ Date.fromString("")->Date.toJSON @return(nullable) @send external toJSON: t => option = "toJSON" + +/** + `ignore(date)` ignores the provided date and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Dict.res b/runtime/Stdlib_Dict.res index 7393c4fb61..2101382fa0 100644 --- a/runtime/Stdlib_Dict.res +++ b/runtime/Stdlib_Dict.res @@ -42,3 +42,5 @@ let mapValues = (dict, f) => { } let has: (dict<'a>, string) => bool = %raw(`(dict, key) => key in dict`) + +external ignore: dict<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_Dict.resi b/runtime/Stdlib_Dict.resi index 64f3c175dc..785598bf05 100644 --- a/runtime/Stdlib_Dict.resi +++ b/runtime/Stdlib_Dict.resi @@ -257,3 +257,11 @@ dict->Dict.has("key3") // false ``` */ let has: (dict<'a>, string) => bool + +/** + `ignore(dict)` ignores the provided dict and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: dict<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_Error.res b/runtime/Stdlib_Error.res index 558a1bbb60..0934fe58f1 100644 --- a/runtime/Stdlib_Error.res +++ b/runtime/Stdlib_Error.res @@ -41,3 +41,5 @@ module URIError = { external raise: t => 'a = "%raise" let panic = msg => make(`Panic! ${msg}`)->raise + +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Error.resi b/runtime/Stdlib_Error.resi index b8bf3a5585..63dad19084 100644 --- a/runtime/Stdlib_Error.resi +++ b/runtime/Stdlib_Error.resi @@ -180,3 +180,11 @@ try { ``` */ let panic: string => 'a + +/** + `ignore(error)` ignores the provided error and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Exn.res b/runtime/Stdlib_Exn.res index 1a7f7da952..c91fe4845b 100644 --- a/runtime/Stdlib_Exn.res +++ b/runtime/Stdlib_Exn.res @@ -88,3 +88,5 @@ exception TypeError of error The URIError object represents an error when a global URI handling function was used in a wrong way. exception URIError of error */ + +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Exn.resi b/runtime/Stdlib_Exn.resi index c8bc764535..92b4e9ca58 100644 --- a/runtime/Stdlib_Exn.resi +++ b/runtime/Stdlib_Exn.resi @@ -59,3 +59,11 @@ let raiseReferenceError: string => 'a let raiseSyntaxError: string => 'a let raiseTypeError: string => 'a let raiseUriError: string => 'a + +/** + `ignore(exn)` ignores the provided exn and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Float.res b/runtime/Stdlib_Float.res index ab1504c7bb..e41be0b356 100644 --- a/runtime/Stdlib_Float.res +++ b/runtime/Stdlib_Float.res @@ -59,3 +59,5 @@ let clamp = (~min=?, ~max=?, value): float => { | _ => value } } + +external ignore: float => unit = "%ignore" diff --git a/runtime/Stdlib_Float.resi b/runtime/Stdlib_Float.resi index f6943cc3d1..2caaf12235 100644 --- a/runtime/Stdlib_Float.resi +++ b/runtime/Stdlib_Float.resi @@ -462,3 +462,11 @@ Float.clamp(4.2, ~min=4.3, ~max=4.1) == 4.3 ``` */ let clamp: (~min: float=?, ~max: float=?, float) => float + +/** + `ignore(float)` ignores the provided float and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: float => unit = "%ignore" diff --git a/runtime/Stdlib_Float32Array.res b/runtime/Stdlib_Float32Array.res index ea81017f84..7642289d59 100644 --- a/runtime/Stdlib_Float32Array.res +++ b/runtime/Stdlib_Float32Array.res @@ -52,3 +52,11 @@ external fromArrayLikeOrIterable: 'a => t = "Float32Array.from" */ @val external fromArrayLikeOrIterableWithMap: ('a, ('b, int) => float) => t = "Float32Array.from" + +/** + `ignore(floatArray)` ignores the provided floatArray and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Float64Array.res b/runtime/Stdlib_Float64Array.res index 0d48724e9a..6ea627d91d 100644 --- a/runtime/Stdlib_Float64Array.res +++ b/runtime/Stdlib_Float64Array.res @@ -52,3 +52,11 @@ external fromArrayLikeOrIterable: 'a => t = "Float64Array.from" */ @val external fromArrayLikeOrIterableWithMap: ('a, ('b, int) => float) => t = "Float64Array.from" + +/** + `ignore(floatArray)` ignores the provided floatArray and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Global.res b/runtime/Stdlib_Global.res index cdc03175b3..89cff211f0 100644 --- a/runtime/Stdlib_Global.res +++ b/runtime/Stdlib_Global.res @@ -15,3 +15,11 @@ type intervalId @val external encodeURIComponent: string => string = "encodeURIComponent" @val external decodeURIComponent: string => string = "decodeURIComponent" + +module TimeoutId = { + external ignore: timeoutId => unit = "%ignore" +} + +module IntervalId = { + external ignore: intervalId => unit = "%ignore" +} diff --git a/runtime/Stdlib_Global.resi b/runtime/Stdlib_Global.resi index 5619d08e77..917340ce51 100644 --- a/runtime/Stdlib_Global.resi +++ b/runtime/Stdlib_Global.resi @@ -199,3 +199,23 @@ Console.log(decodeURIComponent("array%3D%5BsomeValue%5D")) */ @val external decodeURIComponent: string => string = "decodeURIComponent" + +module TimeoutId: { + /** + `ignore(timeoutId)` ignores the provided timeoutId and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ + external ignore: timeoutId => unit = "%ignore" +} + +module IntervalId: { + /** + `ignore(intervalId)` ignores the provided intervalId and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. + */ + external ignore: intervalId => unit = "%ignore" +} diff --git a/runtime/Stdlib_Int.res b/runtime/Stdlib_Int.res index 569c038f44..0959a8b25f 100644 --- a/runtime/Stdlib_Int.res +++ b/runtime/Stdlib_Int.res @@ -106,3 +106,5 @@ module Bitwise = { let lnot = x => lxor(x, -1) } + +external ignore: int => unit = "%ignore" diff --git a/runtime/Stdlib_Int.resi b/runtime/Stdlib_Int.resi index a853179a9e..7563803a2f 100644 --- a/runtime/Stdlib_Int.resi +++ b/runtime/Stdlib_Int.resi @@ -471,3 +471,11 @@ module Bitwise: { */ external asr: (int, int) => int = "%asrint" } + +/** + `ignore(int)` ignores the provided int and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: int => unit = "%ignore" diff --git a/runtime/Stdlib_Int16Array.res b/runtime/Stdlib_Int16Array.res index 02a7101604..e7e667ee62 100644 --- a/runtime/Stdlib_Int16Array.res +++ b/runtime/Stdlib_Int16Array.res @@ -52,3 +52,11 @@ external fromArrayLikeOrIterable: 'a => t = "Int16Array.from" */ @val external fromArrayLikeOrIterableWithMap: ('a, ('b, int) => int) => t = "Int16Array.from" + +/** + `ignore(intArray)` ignores the provided intArray and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Int32Array.res b/runtime/Stdlib_Int32Array.res index 9c14ac358f..78dcbdb56b 100644 --- a/runtime/Stdlib_Int32Array.res +++ b/runtime/Stdlib_Int32Array.res @@ -52,3 +52,11 @@ external fromArrayLikeOrIterable: 'a => t = "Int32Array.from" */ @val external fromArrayLikeOrIterableWithMap: ('a, ('b, int) => int) => t = "Int32Array.from" + +/** + `ignore(intArray)` ignores the provided intArray and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Int8Array.res b/runtime/Stdlib_Int8Array.res index df120a6340..7eb13b4b52 100644 --- a/runtime/Stdlib_Int8Array.res +++ b/runtime/Stdlib_Int8Array.res @@ -52,3 +52,11 @@ external fromArrayLikeOrIterable: 'a => t = "Int8Array.from" */ @val external fromArrayLikeOrIterableWithMap: ('a, ('b, int) => int) => t = "Int8Array.from" + +/** + `ignore(intArray)` ignores the provided intArray and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Intl_Collator.res b/runtime/Stdlib_Intl_Collator.res index c3def972ad..552c1fcf51 100644 --- a/runtime/Stdlib_Intl_Collator.res +++ b/runtime/Stdlib_Intl_Collator.res @@ -34,3 +34,11 @@ external supportedLocalesOf: (array, ~options: supportedLocalesOptions=? @send external resolvedOptions: t => resolvedOptions = "resolvedOptions" @send external compare: (t, string, string) => int = "compare" + +/** + `ignore(collator)` ignores the provided collator and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Intl_DateTimeFormat.res b/runtime/Stdlib_Intl_DateTimeFormat.res index 445ead35d6..08c940fcf3 100644 --- a/runtime/Stdlib_Intl_DateTimeFormat.res +++ b/runtime/Stdlib_Intl_DateTimeFormat.res @@ -127,3 +127,11 @@ external formatRangeToParts: ( ~startDate: Stdlib_Date.t, ~endDate: Stdlib_Date.t, ) => array = "formatRangeToParts" + +/** + `ignore(dateTimeFormat)` ignores the provided dateTimeFormat and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Intl_ListFormat.res b/runtime/Stdlib_Intl_ListFormat.res index bbc84d8aa7..3ea9988e76 100644 --- a/runtime/Stdlib_Intl_ListFormat.res +++ b/runtime/Stdlib_Intl_ListFormat.res @@ -45,3 +45,11 @@ external supportedLocalesOf: (array, ~options: supportedLocalesOptions=? @send external format: (t, array) => string = "format" @send external formatToParts: (t, array) => array = "formatToParts" + +/** + `ignore(listFormat)` ignores the provided listFormat and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Intl_Locale.res b/runtime/Stdlib_Intl_Locale.res index 96363f5935..2979668f62 100644 --- a/runtime/Stdlib_Intl_Locale.res +++ b/runtime/Stdlib_Intl_Locale.res @@ -28,3 +28,11 @@ type options = { @send external maximize: t => t = "maximize" @send external minimize: t => t = "minimize" + +/** + `ignore(locale)` ignores the provided locale and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Intl_NumberFormat.res b/runtime/Stdlib_Intl_NumberFormat.res index 5061d5a193..cbd9d58dec 100644 --- a/runtime/Stdlib_Intl_NumberFormat.res +++ b/runtime/Stdlib_Intl_NumberFormat.res @@ -209,3 +209,11 @@ external formatBigIntRangeToParts: (t, ~start: bigint, ~end: bigint) => array array = "formatToParts" + +/** + `ignore(numberGrouping)` ignores the provided numberGrouping and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Intl_NumberFormat_Grouping.res b/runtime/Stdlib_Intl_NumberFormat_Grouping.res index 12dc872108..21ec73af87 100644 --- a/runtime/Stdlib_Intl_NumberFormat_Grouping.res +++ b/runtime/Stdlib_Intl_NumberFormat_Grouping.res @@ -13,3 +13,11 @@ let parseJsValue = value => | Bool(value) => Some(#bool(value)) | _ => None } + +/** + `ignore(grouping)` ignores the provided grouping and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Intl_PluralRules.res b/runtime/Stdlib_Intl_PluralRules.res index 943235f411..f8beae3892 100644 --- a/runtime/Stdlib_Intl_PluralRules.res +++ b/runtime/Stdlib_Intl_PluralRules.res @@ -60,3 +60,11 @@ external selectRangeInt: (t, ~start: int, ~end: int) => rule = "selectRange" @send external selectRangeBigInt: (t, ~start: bigint, ~end: bigint) => rule = "selectRange" + +/** + `ignore(pluralRules)` ignores the provided pluralRules and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Intl_RelativeTimeFormat.res b/runtime/Stdlib_Intl_RelativeTimeFormat.res index d0f5de16a8..8f60e6d030 100644 --- a/runtime/Stdlib_Intl_RelativeTimeFormat.res +++ b/runtime/Stdlib_Intl_RelativeTimeFormat.res @@ -38,3 +38,11 @@ external supportedLocalesOf: (array, ~options: supportedLocalesOptions=? @send external format: (t, int, timeUnit) => string = "format" @send external formatToParts: (t, int, timeUnit) => array = "formatToParts" + +/** + `ignore(relativeTimeFormat)` ignores the provided relativeTimeFormat and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Intl_Segmenter.res b/runtime/Stdlib_Intl_Segmenter.res index 357d489122..c969f0be58 100644 --- a/runtime/Stdlib_Intl_Segmenter.res +++ b/runtime/Stdlib_Intl_Segmenter.res @@ -32,3 +32,11 @@ external supportedLocalesOf: (array, ~options: supportedLocalesOptions=? @send external resolvedOptions: t => resolvedOptions = "resolvedOptions" @send external segment: (t, string) => Stdlib_Intl_Segments.t = "segment" + +/** + `ignore(segmenter)` ignores the provided segmenter and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Intl_Segments.res b/runtime/Stdlib_Intl_Segments.res index 33b06ea177..b44df470f0 100644 --- a/runtime/Stdlib_Intl_Segments.res +++ b/runtime/Stdlib_Intl_Segments.res @@ -16,3 +16,11 @@ external containing: t => segmentData = "containing" @send external containingWithIndex: (t, int) => segmentData = "containing" + +/** + `ignore(segments)` ignores the provided segments and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Iterator.res b/runtime/Stdlib_Iterator.res index 80b6829e12..f631b604d1 100644 --- a/runtime/Stdlib_Iterator.res +++ b/runtime/Stdlib_Iterator.res @@ -18,3 +18,5 @@ let forEach = (iterator, f) => { iteratorDone := done } } + +external ignore: t<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_Iterator.resi b/runtime/Stdlib_Iterator.resi index b201710517..8511c636ef 100644 --- a/runtime/Stdlib_Iterator.resi +++ b/runtime/Stdlib_Iterator.resi @@ -113,3 +113,11 @@ iterator->Iterator.forEach(v => { ``` */ let forEach: (t<'a>, option<'a> => unit) => unit + +/** + `ignore(iterator)` ignores the provided iterator and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_JSON.res b/runtime/Stdlib_JSON.res index 698b16fcf5..3368a65a9c 100644 --- a/runtime/Stdlib_JSON.res +++ b/runtime/Stdlib_JSON.res @@ -117,3 +117,5 @@ module Decode = { | _ => None } } + +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_JSON.resi b/runtime/Stdlib_JSON.resi index 991d086384..25b3599b21 100644 --- a/runtime/Stdlib_JSON.resi +++ b/runtime/Stdlib_JSON.resi @@ -798,3 +798,11 @@ module Decode: { */ let array: t => option> } + +/** + `ignore(json)` ignores the provided json and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_List.res b/runtime/Stdlib_List.res index a4004f4b6e..c76ba2b577 100644 --- a/runtime/Stdlib_List.res +++ b/runtime/Stdlib_List.res @@ -850,3 +850,5 @@ let zip = (l1, l2) => zipAux(l1, l2, cell) cell } + +external ignore: list<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_List.resi b/runtime/Stdlib_List.resi index 8643c9f0eb..24ccbe9dc6 100644 --- a/runtime/Stdlib_List.resi +++ b/runtime/Stdlib_List.resi @@ -898,3 +898,11 @@ List.sort(list{5, 4, 9, 3, 7}, Int.compare) // list{3, 4, 5, 7, 9} ``` */ let sort: (list<'a>, ('a, 'a) => Stdlib_Ordering.t) => list<'a> + +/** + `ignore(list)` ignores the provided list and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: list<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_Map.res b/runtime/Stdlib_Map.res index a83ef4879a..2a4ea8d8ca 100644 --- a/runtime/Stdlib_Map.res +++ b/runtime/Stdlib_Map.res @@ -19,3 +19,5 @@ type t<'k, 'v> @send external keys: t<'k, 'v> => Stdlib_Iterator.t<'k> = "keys" @send external values: t<'k, 'v> => Stdlib_Iterator.t<'v> = "values" @send external entries: t<'k, 'v> => Stdlib_Iterator.t<('k, 'v)> = "entries" + +external ignore: t<'k, 'v> => unit = "%ignore" diff --git a/runtime/Stdlib_Map.resi b/runtime/Stdlib_Map.resi index cee8853852..839110198a 100644 --- a/runtime/Stdlib_Map.resi +++ b/runtime/Stdlib_Map.resi @@ -277,3 +277,11 @@ Console.log(map->Map.entries->Iterator.toArray) */ @send external entries: t<'k, 'v> => Stdlib_Iterator.t<('k, 'v)> = "entries" + +/** + `ignore(map)` ignores the provided map and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t<'k, 'v> => unit = "%ignore" diff --git a/runtime/Stdlib_Null.res b/runtime/Stdlib_Null.res index 8ebc877df7..d6ce47b70c 100644 --- a/runtime/Stdlib_Null.res +++ b/runtime/Stdlib_Null.res @@ -62,3 +62,5 @@ let flatMap = (value, f) => | Some(x) => f(x) | None => null } + +external ignore: t<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_Null.resi b/runtime/Stdlib_Null.resi index 6b5e96781e..7f9fce1db3 100644 --- a/runtime/Stdlib_Null.resi +++ b/runtime/Stdlib_Null.resi @@ -205,3 +205,11 @@ Null.flatMap(Null.null, addIfAboveOne) // null ``` */ let flatMap: (t<'a>, 'a => t<'b>) => t<'b> + +/** + `ignore(null)` ignores the provided null and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_Nullable.res b/runtime/Stdlib_Nullable.res index 4d394cf5bb..56fd3ce2c9 100644 --- a/runtime/Stdlib_Nullable.res +++ b/runtime/Stdlib_Nullable.res @@ -65,3 +65,5 @@ let flatMap = (value, f) => | Some(x) => f(x) | None => Obj.magic(value) } + +external ignore: t<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_Nullable.resi b/runtime/Stdlib_Nullable.resi index 154feb4d5e..f78783d292 100644 --- a/runtime/Stdlib_Nullable.resi +++ b/runtime/Stdlib_Nullable.resi @@ -241,3 +241,11 @@ Nullable.flatMap(Nullable.null, addIfAboveOne) // undefined ``` */ let flatMap: (t<'a>, 'a => t<'b>) => t<'b> + +/** + `ignore(nullable)` ignores the provided nullable and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_Object.res b/runtime/Stdlib_Object.res index c8dd44ea05..83aa1ac6f1 100644 --- a/runtime/Stdlib_Object.res +++ b/runtime/Stdlib_Object.res @@ -297,3 +297,11 @@ obj->Object.isExtensible // false */ @val external isExtensible: 'a => bool = "Object.isExtensible" + +/** + `ignore(object)` ignores the provided object and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: {..} => unit = "%ignore" diff --git a/runtime/Stdlib_Option.res b/runtime/Stdlib_Option.res index da8854a9fd..299a8d941d 100644 --- a/runtime/Stdlib_Option.res +++ b/runtime/Stdlib_Option.res @@ -155,3 +155,5 @@ let all6 = ((a, b, c, d, e, f)) => { | _ => None } } + +external ignore: option<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_Option.resi b/runtime/Stdlib_Option.resi index a105381bd3..d78457572b 100644 --- a/runtime/Stdlib_Option.resi +++ b/runtime/Stdlib_Option.resi @@ -316,3 +316,11 @@ let all6: ((option<'a>, option<'b>, option<'c>, option<'d>, option<'e>, option<' 'e, 'f, )> + +/** + `ignore(option)` ignores the provided option and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: option<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_Ordering.res b/runtime/Stdlib_Ordering.res index c22a9ec4cb..32dc72eca3 100644 --- a/runtime/Stdlib_Ordering.res +++ b/runtime/Stdlib_Ordering.res @@ -11,3 +11,11 @@ let isGreater = ord => ord > equal let invert = ord => -.ord let fromInt = n => n < 0 ? less : n > 0 ? greater : equal + +/** + `ignore(ordering)` ignores the provided ordering and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Promise.res b/runtime/Stdlib_Promise.res index 9b9484a0bc..05f41fa834 100644 --- a/runtime/Stdlib_Promise.res +++ b/runtime/Stdlib_Promise.res @@ -110,3 +110,5 @@ external race: array> => t<'a> = "race" external any: array> => t<'a> = "any" external done: promise<'a> => unit = "%ignore" + +external ignore: promise<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_Promise.resi b/runtime/Stdlib_Promise.resi index cb38f15c4d..23cf2d9621 100644 --- a/runtime/Stdlib_Promise.resi +++ b/runtime/Stdlib_Promise.resi @@ -102,7 +102,7 @@ let {promise, resolve, _} = Promise.withResolvers() setTimeout(() => { resolve(. "success") -}, 1000)->ignore +}, 1000)->TimeoutId.ignore promise ->thenResolve(str => { @@ -256,7 +256,7 @@ let racer = (ms, name) => { Promise.make((resolve, _) => { setTimeout(() => { resolve(name) - }, ms)->ignore + }, ms)->TimeoutId.ignore }) } @@ -283,7 +283,7 @@ let racer = (ms, name) => { Promise.make((resolve, _) => { setTimeout(() => { resolve(name) - }, ms)->ignore + }, ms)->TimeoutId.ignore }) } @@ -451,4 +451,13 @@ external allSettled6: ((t<'a>, t<'b>, t<'c>, t<'d>, t<'e>, t<'f>)) => t<( `done(p)` is a safe way to ignore a promise. If a value is anything else than a promise, it will raise a type error. */ +@deprecated("Please use `Promise.ignore` instead") external done: promise<'a> => unit = "%ignore" + +/** + `ignore(promise)` ignores the provided promise and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: promise<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_RegExp.res b/runtime/Stdlib_RegExp.res index 3eb1aaaa2e..6d2c34f893 100644 --- a/runtime/Stdlib_RegExp.res +++ b/runtime/Stdlib_RegExp.res @@ -22,3 +22,5 @@ module Result = { @get external source: t => string = "source" @get external sticky: t => bool = "sticky" @get external unicode: t => bool = "unicode" + +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_RegExp.resi b/runtime/Stdlib_RegExp.resi index 39d7364957..d328361390 100644 --- a/runtime/Stdlib_RegExp.resi +++ b/runtime/Stdlib_RegExp.resi @@ -288,3 +288,11 @@ Console.log(regexp2->RegExp.unicode) // Logs `true`, since `u` is set */ @get external unicode: t => bool = "unicode" + +/** + `ignore(regExp)` ignores the provided regExp and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Result.res b/runtime/Stdlib_Result.res index 0c37cfabad..b06f8c0a2a 100644 --- a/runtime/Stdlib_Result.res +++ b/runtime/Stdlib_Result.res @@ -164,3 +164,5 @@ let all6 = ((a, b, c, d, e, f)) => { | (_, _, _, _, _, Error(f)) => Error(f) } } + +external ignore: result<'res, 'err> => unit = "%ignore" diff --git a/runtime/Stdlib_Result.resi b/runtime/Stdlib_Result.resi index 22de5918b7..78b26ec6ea 100644 --- a/runtime/Stdlib_Result.resi +++ b/runtime/Stdlib_Result.resi @@ -288,3 +288,11 @@ let all6: ( result<'r6, 'e>, ) ) => result<('r1, 'r2, 'r3, 'r4, 'r5, 'r6), 'e> + +/** + `ignore(result)` ignores the provided result and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: result<'res, 'err> => unit = "%ignore" diff --git a/runtime/Stdlib_Set.res b/runtime/Stdlib_Set.res index 9fd756fc6b..724058afb1 100644 --- a/runtime/Stdlib_Set.res +++ b/runtime/Stdlib_Set.res @@ -25,3 +25,5 @@ type t<'a> @send external isDisjointFrom: (t<'a>, t<'a>) => bool = "isDisjointFrom" external toArray: t<'a> => array<'a> = "Array.from" + +external ignore: t<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_Set.resi b/runtime/Stdlib_Set.resi index 506bcf6d49..27a82c9593 100644 --- a/runtime/Stdlib_Set.resi +++ b/runtime/Stdlib_Set.resi @@ -326,3 +326,11 @@ set->Set.toArray // ["apple", "orange", "banana"] ``` */ external toArray: t<'a> => array<'a> = "Array.from" + +/** + `ignore(set)` ignores the provided set and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_String.res b/runtime/Stdlib_String.res index 0fd636d742..7aaa139492 100644 --- a/runtime/Stdlib_String.res +++ b/runtime/Stdlib_String.res @@ -169,3 +169,5 @@ external splitByRegExpAtMost: (string, Stdlib_RegExp.t, ~limit: int) => array unit = "" @send external localeCompare: (string, string) => float = "localeCompare" + +external ignore: string => unit = "%ignore" diff --git a/runtime/Stdlib_String.resi b/runtime/Stdlib_String.resi index 2bb378656b..8e3a537c71 100644 --- a/runtime/Stdlib_String.resi +++ b/runtime/Stdlib_String.resi @@ -1123,3 +1123,11 @@ String.localeCompare("a", "a") == 0.0 */ @send external localeCompare: (string, string) => float = "localeCompare" + +/** + `ignore(string)` ignores the provided string and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: string => unit = "%ignore" diff --git a/runtime/Stdlib_Symbol.res b/runtime/Stdlib_Symbol.res index 37cc981a31..195f82cfe9 100644 --- a/runtime/Stdlib_Symbol.res +++ b/runtime/Stdlib_Symbol.res @@ -23,3 +23,5 @@ external hasInstance: t = "hasInstance" @val @scope("Symbol") external toPrimitive: t = "toPrimitive" @val @scope("Symbol") external toStringTag: t = "toStringTag" @val @scope("Symbol") external unscopables: t = "unscopables" + +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Symbol.resi b/runtime/Stdlib_Symbol.resi index ae3f758762..6073d62126 100644 --- a/runtime/Stdlib_Symbol.resi +++ b/runtime/Stdlib_Symbol.resi @@ -103,3 +103,11 @@ external hasInstance: t = "hasInstance" @val @scope("Symbol") external toPrimitive: t = "toPrimitive" @val @scope("Symbol") external toStringTag: t = "toStringTag" @val @scope("Symbol") external unscopables: t = "unscopables" + +/** + `ignore(symbol)` ignores the provided symbol and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Type.res b/runtime/Stdlib_Type.res index 6c2a381d63..0c6cbda8cf 100644 --- a/runtime/Stdlib_Type.res +++ b/runtime/Stdlib_Type.res @@ -43,3 +43,5 @@ module Classify = { } } } + +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Type.resi b/runtime/Stdlib_Type.resi index 19de09bddf..1dbe46d41c 100644 --- a/runtime/Stdlib_Type.resi +++ b/runtime/Stdlib_Type.resi @@ -75,3 +75,11 @@ switch %raw(`null`)->Type.Classify.classify { */ let classify: 'a => t } + +/** + `ignore(type)` ignores the provided type and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_TypedArray.res b/runtime/Stdlib_TypedArray.res index 187adfeca1..e8090e30d6 100644 --- a/runtime/Stdlib_TypedArray.res +++ b/runtime/Stdlib_TypedArray.res @@ -75,3 +75,11 @@ external copyWithin: (t<'a>, ~target: int, ~start: int, ~end: int) => array<'a> @send external some: (t<'a>, 'a => bool) => bool = "some" @send external someWithIndex: (t<'a>, ('a, int) => bool) => bool = "some" + +/** + `ignore(typedArray)` ignores the provided typedArray and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_Uint16Array.res b/runtime/Stdlib_Uint16Array.res index 66373ab703..5edbb8b6f3 100644 --- a/runtime/Stdlib_Uint16Array.res +++ b/runtime/Stdlib_Uint16Array.res @@ -52,3 +52,11 @@ external fromArrayLikeOrIterable: 'a => t = "Uint16Array.from" */ @val external fromArrayLikeOrIterableWithMap: ('a, ('b, int) => int) => t = "Uint16Array.from" + +/** + `ignore(uintArray)` ignores the provided uintArray and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Uint32Array.res b/runtime/Stdlib_Uint32Array.res index b58014cc5c..550ded3734 100644 --- a/runtime/Stdlib_Uint32Array.res +++ b/runtime/Stdlib_Uint32Array.res @@ -52,3 +52,11 @@ external fromArrayLikeOrIterable: 'a => t = "Uint32Array.from" */ @val external fromArrayLikeOrIterableWithMap: ('a, ('b, int) => int) => t = "Uint32Array.from" + +/** + `ignore(uintArray)` ignores the provided uintArray and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Uint8Array.res b/runtime/Stdlib_Uint8Array.res index d56225118b..5ee7244fbb 100644 --- a/runtime/Stdlib_Uint8Array.res +++ b/runtime/Stdlib_Uint8Array.res @@ -52,3 +52,11 @@ external fromArrayLikeOrIterable: 'a => t = "Uint8Array.from" */ @val external fromArrayLikeOrIterableWithMap: ('a, ('b, int) => int) => t = "Uint8Array.from" + +/** + `ignore(uintArray)` ignores the provided uintArray and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_Uint8ClampedArray.res b/runtime/Stdlib_Uint8ClampedArray.res index 9e280bc761..77b5c444b7 100644 --- a/runtime/Stdlib_Uint8ClampedArray.res +++ b/runtime/Stdlib_Uint8ClampedArray.res @@ -52,3 +52,11 @@ external fromArrayLikeOrIterable: 'a => t = "Uint8ClampedArray.from" */ @val external fromArrayLikeOrIterableWithMap: ('a, ('b, int) => int) => t = "Uint8ClampedArray.from" + +/** + `ignore(uintArray)` ignores the provided uintArray and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t => unit = "%ignore" diff --git a/runtime/Stdlib_WeakMap.res b/runtime/Stdlib_WeakMap.res index 42dde986a3..6bc4f9db58 100644 --- a/runtime/Stdlib_WeakMap.res +++ b/runtime/Stdlib_WeakMap.res @@ -6,3 +6,11 @@ type t<'k, 'v> @send external has: (t<'k, 'v>, 'k) => bool = "has" @send external set: (t<'k, 'v>, 'k, 'v) => t<'k, 'v> = "set" @send external delete: (t<'k, 'v>, 'k) => bool = "delete" + +/** + `ignore(weakMap)` ignores the provided weakMap and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t<'k, 'v> => unit = "%ignore" diff --git a/runtime/Stdlib_WeakSet.res b/runtime/Stdlib_WeakSet.res index b8c17e946b..18876d1a23 100644 --- a/runtime/Stdlib_WeakSet.res +++ b/runtime/Stdlib_WeakSet.res @@ -5,3 +5,11 @@ type t<'a> @send external add: (t<'a>, 'a) => t<'a> = "add" @send external delete: (t<'a>, 'a) => bool = "delete" @send external has: (t<'a>, 'a) => bool = "has" + +/** + `ignore(weakSet)` ignores the provided weakSet and returns unit. + + This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + without having to store or process it further. +*/ +external ignore: t<'a> => unit = "%ignore" diff --git a/tests/analysis_tests/tests/src/expected/Completion.res.txt b/tests/analysis_tests/tests/src/expected/Completion.res.txt index eba5c82d3d..de4e4ffe74 100644 --- a/tests/analysis_tests/tests/src/expected/Completion.res.txt +++ b/tests/analysis_tests/tests/src/expected/Completion.res.txt @@ -340,6 +340,12 @@ Path Array. "tags": [], "detail": "array<'a> => option<'a>", "documentation": {"kind": "markdown", "value": "\n`last(array)` returns the last element of `array`.\n\nReturns `None` if the array is empty.\n\n## Examples\n\n```rescript\n[\"Hello\", \"Hi\", \"Good bye\"]\n->Array.last\n->assertEqual(Some(\"Good bye\"))\n\n[]\n->Array.last\n->assertEqual(None)\n```\n"} + }, { + "label": "ignore", + "kind": 12, + "tags": [], + "detail": "array<'a> => unit", + "documentation": {"kind": "markdown", "value": "\n `ignore(array)` ignores the provided array and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of a side-effecting operation)\n without having to store or process it further.\n"} }, { "label": "isArray", "kind": 12, @@ -2041,6 +2047,12 @@ Path T "tags": [], "detail": "module TypedArray", "documentation": null + }, { + "label": "TimeoutId", + "kind": 9, + "tags": [], + "detail": "module TimeoutId", + "documentation": null }, { "label": "Type", "kind": 9, diff --git a/tests/analysis_tests/tests/src/expected/CompletionJsx.res.txt b/tests/analysis_tests/tests/src/expected/CompletionJsx.res.txt index 4a00e61ba5..5ae8565ff9 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionJsx.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionJsx.res.txt @@ -262,6 +262,12 @@ Path Stdlib.Int. "tags": [], "detail": "(int, int) => Ordering.t", "documentation": null + }, { + "label": "Int.ignore", + "kind": 12, + "tags": [], + "detail": "int => unit", + "documentation": {"kind": "markdown", "value": "\n `ignore(int)` ignores the provided int and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of a side-effecting operation)\n without having to store or process it further.\n"} }, { "label": "Int.toPrecision", "kind": 12, @@ -389,6 +395,12 @@ Path Stdlib.Int. "tags": [], "detail": "(int, int) => Ordering.t", "documentation": null + }, { + "label": "Int.ignore", + "kind": 12, + "tags": [], + "detail": "int => unit", + "documentation": {"kind": "markdown", "value": "\n `ignore(int)` ignores the provided int and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of a side-effecting operation)\n without having to store or process it further.\n"} }, { "label": "Int.toPrecision", "kind": 12, diff --git a/tests/analysis_tests/tests/src/expected/CompletionJsxProps.res.txt b/tests/analysis_tests/tests/src/expected/CompletionJsxProps.res.txt index 11d4780017..ad2b74dba3 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionJsxProps.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionJsxProps.res.txt @@ -75,6 +75,12 @@ Path CompletionSupport.TestComponent.make "tags": [], "detail": "module TypedArray", "documentation": null + }, { + "label": "TimeoutId", + "kind": 9, + "tags": [], + "detail": "module TimeoutId", + "documentation": null }, { "label": "Type", "kind": 9, diff --git a/tests/tests/src/core/Core_PromiseTest.res b/tests/tests/src/core/Core_PromiseTest.res index 6a5ad72b8c..f8bfa06a17 100644 --- a/tests/tests/src/core/Core_PromiseTest.res +++ b/tests/tests/src/core/Core_PromiseTest.res @@ -267,7 +267,7 @@ module Concurrently = { setTimeout(() => { place := place.contents + 1 resolve((place.contents, msg)) - }, ms)->ignore + }, ms)->TimeoutId.ignore }) } @@ -289,7 +289,7 @@ module Concurrently = { Promise.make((resolve, _) => { setTimeout(() => { resolve(name) - }, ms)->ignore + }, ms)->TimeoutId.ignore }) } @@ -311,7 +311,7 @@ module Concurrently = { setTimeout(() => { place := place.contents + 1 resolve((place.contents, msg)) - }, ms)->ignore + }, ms)->TimeoutId.ignore }) } @@ -335,7 +335,7 @@ module Concurrently = { setTimeout(() => { place := place.contents + 1 resolve((place.contents, msg)) - }, ms)->ignore + }, ms)->TimeoutId.ignore }) } @@ -360,7 +360,7 @@ module Concurrently = { setTimeout(() => { place := place.contents + 1 resolve((place.contents, msg)) - }, ms)->ignore + }, ms)->TimeoutId.ignore }) } @@ -386,7 +386,7 @@ module Concurrently = { setTimeout(() => { place := place.contents + 1 resolve((place.contents, msg)) - }, ms)->ignore + }, ms)->TimeoutId.ignore }) } @@ -413,7 +413,7 @@ module Concurrently = { setTimeout(() => { place := place.contents + 1 resolve((place.contents, msg)) - }, ms)->ignore + }, ms)->TimeoutId.ignore }) } From 9f8ddc1976b5a2e69bd19114de303fcce6fd9ef3 Mon Sep 17 00:00:00 2001 From: tsnobip Date: Mon, 17 Mar 2025 22:20:40 +0100 Subject: [PATCH 2/3] ignore generated_mocha_test for formatting --- scripts/format.sh | 2 +- scripts/format_check.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/format.sh b/scripts/format.sh index d5778a8732..e14fb4ae94 100755 --- a/scripts/format.sh +++ b/scripts/format.sh @@ -4,7 +4,7 @@ shopt -s extglob dune build @fmt --auto-promote -files=$(find runtime tests -type f \( -name "*.res" -o -name "*.resi" \) ! -name "syntaxErrors*" ! -path "tests/syntax_*" ! -path "tests/analysis_tests/tests*" ! -path "*/node_modules/*") +files=$(find runtime tests -type f \( -name "*.res" -o -name "*.resi" \) ! -name "syntaxErrors*" ! -name "generated_mocha_test.res" ! -path "tests/syntax_*" ! -path "tests/analysis_tests/tests*" ! -path "*/node_modules/*") ./cli/rescript format $files npm run format diff --git a/scripts/format_check.sh b/scripts/format_check.sh index cd0c347e48..903ab9d188 100755 --- a/scripts/format_check.sh +++ b/scripts/format_check.sh @@ -17,7 +17,7 @@ case "$(uname -s)" in fi echo "Checking ReScript code formatting..." - files=$(find runtime tests -type f \( -name "*.res" -o -name "*.resi" \) ! -name "syntaxErrors*" ! -path "tests/syntax_*" ! -path "tests/analysis_tests/tests*" ! -path "*/node_modules/*") + files=$(find runtime tests -type f \( -name "*.res" -o -name "*.resi" \) ! -name "syntaxErrors*" ! -name "generated_mocha_test.res" ! -path "tests/syntax_*" ! -path "tests/analysis_tests/tests*" ! -path "*/node_modules/*") if ./cli/rescript format -check $files; then printf "${successGreen}✅ ReScript code formatting ok.${reset}\n" else From 83142d31e078760e8e1f50d571d5c530b959df28 Mon Sep 17 00:00:00 2001 From: tsnobip Date: Tue, 18 Mar 2025 17:35:49 +0100 Subject: [PATCH 3/3] rephrase ignore documentation --- runtime/Stdlib_Array.resi | 2 +- runtime/Stdlib_AsyncIterator.resi | 2 +- runtime/Stdlib_BigInt.res | 2 +- runtime/Stdlib_BigInt64Array.res | 2 +- runtime/Stdlib_BigUint64Array.res | 2 +- runtime/Stdlib_DataView.res | 2 +- runtime/Stdlib_Date.resi | 2 +- runtime/Stdlib_Dict.resi | 2 +- runtime/Stdlib_Error.resi | 2 +- runtime/Stdlib_Exn.resi | 2 +- runtime/Stdlib_Float.resi | 2 +- runtime/Stdlib_Float32Array.res | 2 +- runtime/Stdlib_Float64Array.res | 2 +- runtime/Stdlib_Global.resi | 4 ++-- runtime/Stdlib_Int.resi | 2 +- runtime/Stdlib_Int16Array.res | 2 +- runtime/Stdlib_Int32Array.res | 2 +- runtime/Stdlib_Int8Array.res | 2 +- runtime/Stdlib_Intl_Collator.res | 2 +- runtime/Stdlib_Intl_DateTimeFormat.res | 2 +- runtime/Stdlib_Intl_ListFormat.res | 2 +- runtime/Stdlib_Intl_Locale.res | 2 +- runtime/Stdlib_Intl_NumberFormat.res | 2 +- runtime/Stdlib_Intl_NumberFormat_Grouping.res | 2 +- runtime/Stdlib_Intl_PluralRules.res | 2 +- runtime/Stdlib_Intl_RelativeTimeFormat.res | 2 +- runtime/Stdlib_Intl_Segmenter.res | 2 +- runtime/Stdlib_Intl_Segments.res | 2 +- runtime/Stdlib_Iterator.resi | 2 +- runtime/Stdlib_JSON.resi | 2 +- runtime/Stdlib_List.resi | 2 +- runtime/Stdlib_Map.resi | 2 +- runtime/Stdlib_Null.resi | 2 +- runtime/Stdlib_Nullable.resi | 2 +- runtime/Stdlib_Object.res | 2 +- runtime/Stdlib_Option.resi | 2 +- runtime/Stdlib_Ordering.res | 2 +- runtime/Stdlib_Promise.resi | 2 +- runtime/Stdlib_RegExp.resi | 2 +- runtime/Stdlib_Result.resi | 2 +- runtime/Stdlib_Set.resi | 2 +- runtime/Stdlib_String.resi | 2 +- runtime/Stdlib_Symbol.resi | 2 +- runtime/Stdlib_Type.resi | 2 +- runtime/Stdlib_TypedArray.res | 2 +- runtime/Stdlib_Uint16Array.res | 2 +- runtime/Stdlib_Uint32Array.res | 2 +- runtime/Stdlib_Uint8Array.res | 2 +- runtime/Stdlib_Uint8ClampedArray.res | 2 +- runtime/Stdlib_WeakMap.res | 2 +- runtime/Stdlib_WeakSet.res | 2 +- tests/analysis_tests/tests/src/expected/Completion.res.txt | 2 +- tests/analysis_tests/tests/src/expected/CompletionJsx.res.txt | 4 ++-- 53 files changed, 55 insertions(+), 55 deletions(-) diff --git a/runtime/Stdlib_Array.resi b/runtime/Stdlib_Array.resi index 13b31972d2..d534f5ca9c 100644 --- a/runtime/Stdlib_Array.resi +++ b/runtime/Stdlib_Array.resi @@ -1259,7 +1259,7 @@ let last: array<'a> => option<'a> /** `ignore(array)` ignores the provided array and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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: array<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_AsyncIterator.resi b/runtime/Stdlib_AsyncIterator.resi index 366e6674b1..50db4fdf3b 100644 --- a/runtime/Stdlib_AsyncIterator.resi +++ b/runtime/Stdlib_AsyncIterator.resi @@ -190,7 +190,7 @@ let forEach: (t<'a>, option<'a> => unit) => promise /** `ignore(iterator)` ignores the provided async iterator and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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. */ diff --git a/runtime/Stdlib_BigInt.res b/runtime/Stdlib_BigInt.res index 5dbd8ce4e6..59f1b5abe9 100644 --- a/runtime/Stdlib_BigInt.res +++ b/runtime/Stdlib_BigInt.res @@ -96,7 +96,7 @@ let lnot = x => lxor(x, -1n) /** `ignore(bigint)` ignores the provided bigint and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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: bigint => unit = "%ignore" diff --git a/runtime/Stdlib_BigInt64Array.res b/runtime/Stdlib_BigInt64Array.res index e56d9b0681..2dadb7f916 100644 --- a/runtime/Stdlib_BigInt64Array.res +++ b/runtime/Stdlib_BigInt64Array.res @@ -56,7 +56,7 @@ external fromArrayLikeOrIterableWithMap: ('a, ('b, int) => bigint) => t = "BigIn /** `ignore(bigIntArray)` ignores the provided bigIntArray and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_BigUint64Array.res b/runtime/Stdlib_BigUint64Array.res index 079cd945f3..38d5b7f301 100644 --- a/runtime/Stdlib_BigUint64Array.res +++ b/runtime/Stdlib_BigUint64Array.res @@ -56,7 +56,7 @@ external fromArrayLikeOrIterableWithMap: ('a, ('b, int) => bigint) => t = "BigUi /** `ignore(bigUintArray)` ignores the provided bigUintArray and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_DataView.res b/runtime/Stdlib_DataView.res index 7e7f7d9763..8ab0025336 100644 --- a/runtime/Stdlib_DataView.res +++ b/runtime/Stdlib_DataView.res @@ -39,7 +39,7 @@ external fromBufferWithRange: (Stdlib_ArrayBuffer.t, ~byteOffset: int, ~length: /** `ignore(dataView)` ignores the provided dataView and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_Date.resi b/runtime/Stdlib_Date.resi index ac88875b54..becef1d70c 100644 --- a/runtime/Stdlib_Date.resi +++ b/runtime/Stdlib_Date.resi @@ -1362,7 +1362,7 @@ external toJSON: t => option = "toJSON" /** `ignore(date)` ignores the provided date and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_Dict.resi b/runtime/Stdlib_Dict.resi index 785598bf05..329bce3698 100644 --- a/runtime/Stdlib_Dict.resi +++ b/runtime/Stdlib_Dict.resi @@ -261,7 +261,7 @@ let has: (dict<'a>, string) => bool /** `ignore(dict)` ignores the provided dict and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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: dict<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_Error.resi b/runtime/Stdlib_Error.resi index 63dad19084..e75c91195e 100644 --- a/runtime/Stdlib_Error.resi +++ b/runtime/Stdlib_Error.resi @@ -184,7 +184,7 @@ let panic: string => 'a /** `ignore(error)` ignores the provided error and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_Exn.resi b/runtime/Stdlib_Exn.resi index 92b4e9ca58..9f66de23c2 100644 --- a/runtime/Stdlib_Exn.resi +++ b/runtime/Stdlib_Exn.resi @@ -63,7 +63,7 @@ let raiseUriError: string => 'a /** `ignore(exn)` ignores the provided exn and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_Float.resi b/runtime/Stdlib_Float.resi index 2caaf12235..7bdc0bab49 100644 --- a/runtime/Stdlib_Float.resi +++ b/runtime/Stdlib_Float.resi @@ -466,7 +466,7 @@ let clamp: (~min: float=?, ~max: float=?, float) => float /** `ignore(float)` ignores the provided float and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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: float => unit = "%ignore" diff --git a/runtime/Stdlib_Float32Array.res b/runtime/Stdlib_Float32Array.res index 7642289d59..892f55c8f6 100644 --- a/runtime/Stdlib_Float32Array.res +++ b/runtime/Stdlib_Float32Array.res @@ -56,7 +56,7 @@ external fromArrayLikeOrIterableWithMap: ('a, ('b, int) => float) => t = "Float3 /** `ignore(floatArray)` ignores the provided floatArray and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_Float64Array.res b/runtime/Stdlib_Float64Array.res index 6ea627d91d..b7761a4fac 100644 --- a/runtime/Stdlib_Float64Array.res +++ b/runtime/Stdlib_Float64Array.res @@ -56,7 +56,7 @@ external fromArrayLikeOrIterableWithMap: ('a, ('b, int) => float) => t = "Float6 /** `ignore(floatArray)` ignores the provided floatArray and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_Global.resi b/runtime/Stdlib_Global.resi index 917340ce51..c4acd26ce6 100644 --- a/runtime/Stdlib_Global.resi +++ b/runtime/Stdlib_Global.resi @@ -204,7 +204,7 @@ module TimeoutId: { /** `ignore(timeoutId)` ignores the provided timeoutId and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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: timeoutId => unit = "%ignore" @@ -214,7 +214,7 @@ module IntervalId: { /** `ignore(intervalId)` ignores the provided intervalId and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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: intervalId => unit = "%ignore" diff --git a/runtime/Stdlib_Int.resi b/runtime/Stdlib_Int.resi index 7563803a2f..83783b4391 100644 --- a/runtime/Stdlib_Int.resi +++ b/runtime/Stdlib_Int.resi @@ -475,7 +475,7 @@ module Bitwise: { /** `ignore(int)` ignores the provided int and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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: int => unit = "%ignore" diff --git a/runtime/Stdlib_Int16Array.res b/runtime/Stdlib_Int16Array.res index e7e667ee62..8672da86d3 100644 --- a/runtime/Stdlib_Int16Array.res +++ b/runtime/Stdlib_Int16Array.res @@ -56,7 +56,7 @@ external fromArrayLikeOrIterableWithMap: ('a, ('b, int) => int) => t = "Int16Arr /** `ignore(intArray)` ignores the provided intArray and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_Int32Array.res b/runtime/Stdlib_Int32Array.res index 78dcbdb56b..ae9cc4321e 100644 --- a/runtime/Stdlib_Int32Array.res +++ b/runtime/Stdlib_Int32Array.res @@ -56,7 +56,7 @@ external fromArrayLikeOrIterableWithMap: ('a, ('b, int) => int) => t = "Int32Arr /** `ignore(intArray)` ignores the provided intArray and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_Int8Array.res b/runtime/Stdlib_Int8Array.res index 7eb13b4b52..db9c9c36c3 100644 --- a/runtime/Stdlib_Int8Array.res +++ b/runtime/Stdlib_Int8Array.res @@ -56,7 +56,7 @@ external fromArrayLikeOrIterableWithMap: ('a, ('b, int) => int) => t = "Int8Arra /** `ignore(intArray)` ignores the provided intArray and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_Intl_Collator.res b/runtime/Stdlib_Intl_Collator.res index 552c1fcf51..f457c247f7 100644 --- a/runtime/Stdlib_Intl_Collator.res +++ b/runtime/Stdlib_Intl_Collator.res @@ -38,7 +38,7 @@ external supportedLocalesOf: (array, ~options: supportedLocalesOptions=? /** `ignore(collator)` ignores the provided collator and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_Intl_DateTimeFormat.res b/runtime/Stdlib_Intl_DateTimeFormat.res index 08c940fcf3..9c2be84b11 100644 --- a/runtime/Stdlib_Intl_DateTimeFormat.res +++ b/runtime/Stdlib_Intl_DateTimeFormat.res @@ -131,7 +131,7 @@ external formatRangeToParts: ( /** `ignore(dateTimeFormat)` ignores the provided dateTimeFormat and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_Intl_ListFormat.res b/runtime/Stdlib_Intl_ListFormat.res index 3ea9988e76..3dd0b280e6 100644 --- a/runtime/Stdlib_Intl_ListFormat.res +++ b/runtime/Stdlib_Intl_ListFormat.res @@ -49,7 +49,7 @@ external supportedLocalesOf: (array, ~options: supportedLocalesOptions=? /** `ignore(listFormat)` ignores the provided listFormat and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_Intl_Locale.res b/runtime/Stdlib_Intl_Locale.res index 2979668f62..45c9388e29 100644 --- a/runtime/Stdlib_Intl_Locale.res +++ b/runtime/Stdlib_Intl_Locale.res @@ -32,7 +32,7 @@ type options = { /** `ignore(locale)` ignores the provided locale and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_Intl_NumberFormat.res b/runtime/Stdlib_Intl_NumberFormat.res index cbd9d58dec..f69d7f1148 100644 --- a/runtime/Stdlib_Intl_NumberFormat.res +++ b/runtime/Stdlib_Intl_NumberFormat.res @@ -213,7 +213,7 @@ external formatStringToParts: (t, string) => array = "for /** `ignore(numberGrouping)` ignores the provided numberGrouping and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_Intl_NumberFormat_Grouping.res b/runtime/Stdlib_Intl_NumberFormat_Grouping.res index 21ec73af87..47227b6e7f 100644 --- a/runtime/Stdlib_Intl_NumberFormat_Grouping.res +++ b/runtime/Stdlib_Intl_NumberFormat_Grouping.res @@ -17,7 +17,7 @@ let parseJsValue = value => /** `ignore(grouping)` ignores the provided grouping and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_Intl_PluralRules.res b/runtime/Stdlib_Intl_PluralRules.res index f8beae3892..8e52f7d98a 100644 --- a/runtime/Stdlib_Intl_PluralRules.res +++ b/runtime/Stdlib_Intl_PluralRules.res @@ -64,7 +64,7 @@ external selectRangeBigInt: (t, ~start: bigint, ~end: bigint) => rule = "selectR /** `ignore(pluralRules)` ignores the provided pluralRules and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_Intl_RelativeTimeFormat.res b/runtime/Stdlib_Intl_RelativeTimeFormat.res index 8f60e6d030..f3173520d7 100644 --- a/runtime/Stdlib_Intl_RelativeTimeFormat.res +++ b/runtime/Stdlib_Intl_RelativeTimeFormat.res @@ -42,7 +42,7 @@ external formatToParts: (t, int, timeUnit) => array = "formatT /** `ignore(relativeTimeFormat)` ignores the provided relativeTimeFormat and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_Intl_Segmenter.res b/runtime/Stdlib_Intl_Segmenter.res index c969f0be58..fd79657ef0 100644 --- a/runtime/Stdlib_Intl_Segmenter.res +++ b/runtime/Stdlib_Intl_Segmenter.res @@ -36,7 +36,7 @@ external supportedLocalesOf: (array, ~options: supportedLocalesOptions=? /** `ignore(segmenter)` ignores the provided segmenter and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_Intl_Segments.res b/runtime/Stdlib_Intl_Segments.res index b44df470f0..32b0d4cb0e 100644 --- a/runtime/Stdlib_Intl_Segments.res +++ b/runtime/Stdlib_Intl_Segments.res @@ -20,7 +20,7 @@ external containingWithIndex: (t, int) => segmentData = "containing" /** `ignore(segments)` ignores the provided segments and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_Iterator.resi b/runtime/Stdlib_Iterator.resi index 8511c636ef..359039a588 100644 --- a/runtime/Stdlib_Iterator.resi +++ b/runtime/Stdlib_Iterator.resi @@ -117,7 +117,7 @@ let forEach: (t<'a>, option<'a> => unit) => unit /** `ignore(iterator)` ignores the provided iterator and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_JSON.resi b/runtime/Stdlib_JSON.resi index 25b3599b21..d0218ac3d0 100644 --- a/runtime/Stdlib_JSON.resi +++ b/runtime/Stdlib_JSON.resi @@ -802,7 +802,7 @@ module Decode: { /** `ignore(json)` ignores the provided json and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_List.resi b/runtime/Stdlib_List.resi index 24ccbe9dc6..1b05db8d19 100644 --- a/runtime/Stdlib_List.resi +++ b/runtime/Stdlib_List.resi @@ -902,7 +902,7 @@ let sort: (list<'a>, ('a, 'a) => Stdlib_Ordering.t) => list<'a> /** `ignore(list)` ignores the provided list and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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: list<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_Map.resi b/runtime/Stdlib_Map.resi index 839110198a..3fc56d3f1a 100644 --- a/runtime/Stdlib_Map.resi +++ b/runtime/Stdlib_Map.resi @@ -281,7 +281,7 @@ external entries: t<'k, 'v> => Stdlib_Iterator.t<('k, 'v)> = "entries" /** `ignore(map)` ignores the provided map and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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<'k, 'v> => unit = "%ignore" diff --git a/runtime/Stdlib_Null.resi b/runtime/Stdlib_Null.resi index 7f9fce1db3..ebe95b03ac 100644 --- a/runtime/Stdlib_Null.resi +++ b/runtime/Stdlib_Null.resi @@ -209,7 +209,7 @@ let flatMap: (t<'a>, 'a => t<'b>) => t<'b> /** `ignore(null)` ignores the provided null and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_Nullable.resi b/runtime/Stdlib_Nullable.resi index f78783d292..5e3dfbcae0 100644 --- a/runtime/Stdlib_Nullable.resi +++ b/runtime/Stdlib_Nullable.resi @@ -245,7 +245,7 @@ let flatMap: (t<'a>, 'a => t<'b>) => t<'b> /** `ignore(nullable)` ignores the provided nullable and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_Object.res b/runtime/Stdlib_Object.res index 83aa1ac6f1..84ec1220e9 100644 --- a/runtime/Stdlib_Object.res +++ b/runtime/Stdlib_Object.res @@ -301,7 +301,7 @@ external isExtensible: 'a => bool = "Object.isExtensible" /** `ignore(object)` ignores the provided object and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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: {..} => unit = "%ignore" diff --git a/runtime/Stdlib_Option.resi b/runtime/Stdlib_Option.resi index d78457572b..126bcce0bd 100644 --- a/runtime/Stdlib_Option.resi +++ b/runtime/Stdlib_Option.resi @@ -320,7 +320,7 @@ let all6: ((option<'a>, option<'b>, option<'c>, option<'d>, option<'e>, option<' /** `ignore(option)` ignores the provided option and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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: option<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_Ordering.res b/runtime/Stdlib_Ordering.res index 32dc72eca3..e6a871d29e 100644 --- a/runtime/Stdlib_Ordering.res +++ b/runtime/Stdlib_Ordering.res @@ -15,7 +15,7 @@ let fromInt = n => n < 0 ? less : n > 0 ? greater : equal /** `ignore(ordering)` ignores the provided ordering and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_Promise.resi b/runtime/Stdlib_Promise.resi index 23cf2d9621..6de24738c5 100644 --- a/runtime/Stdlib_Promise.resi +++ b/runtime/Stdlib_Promise.resi @@ -457,7 +457,7 @@ external done: promise<'a> => unit = "%ignore" /** `ignore(promise)` ignores the provided promise and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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: promise<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_RegExp.resi b/runtime/Stdlib_RegExp.resi index d328361390..62ce2dd19e 100644 --- a/runtime/Stdlib_RegExp.resi +++ b/runtime/Stdlib_RegExp.resi @@ -292,7 +292,7 @@ external unicode: t => bool = "unicode" /** `ignore(regExp)` ignores the provided regExp and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_Result.resi b/runtime/Stdlib_Result.resi index 78b26ec6ea..6b98634de7 100644 --- a/runtime/Stdlib_Result.resi +++ b/runtime/Stdlib_Result.resi @@ -292,7 +292,7 @@ let all6: ( /** `ignore(result)` ignores the provided result and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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: result<'res, 'err> => unit = "%ignore" diff --git a/runtime/Stdlib_Set.resi b/runtime/Stdlib_Set.resi index 27a82c9593..9437fe85e1 100644 --- a/runtime/Stdlib_Set.resi +++ b/runtime/Stdlib_Set.resi @@ -330,7 +330,7 @@ external toArray: t<'a> => array<'a> = "Array.from" /** `ignore(set)` ignores the provided set and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_String.resi b/runtime/Stdlib_String.resi index 8e3a537c71..c74996dea3 100644 --- a/runtime/Stdlib_String.resi +++ b/runtime/Stdlib_String.resi @@ -1127,7 +1127,7 @@ external localeCompare: (string, string) => float = "localeCompare" /** `ignore(string)` ignores the provided string and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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: string => unit = "%ignore" diff --git a/runtime/Stdlib_Symbol.resi b/runtime/Stdlib_Symbol.resi index 6073d62126..5dceef04c3 100644 --- a/runtime/Stdlib_Symbol.resi +++ b/runtime/Stdlib_Symbol.resi @@ -107,7 +107,7 @@ external hasInstance: t = "hasInstance" /** `ignore(symbol)` ignores the provided symbol and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_Type.resi b/runtime/Stdlib_Type.resi index 1dbe46d41c..0627dac315 100644 --- a/runtime/Stdlib_Type.resi +++ b/runtime/Stdlib_Type.resi @@ -79,7 +79,7 @@ switch %raw(`null`)->Type.Classify.classify { /** `ignore(type)` ignores the provided type and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_TypedArray.res b/runtime/Stdlib_TypedArray.res index e8090e30d6..2d9a5add76 100644 --- a/runtime/Stdlib_TypedArray.res +++ b/runtime/Stdlib_TypedArray.res @@ -79,7 +79,7 @@ external copyWithin: (t<'a>, ~target: int, ~start: int, ~end: int) => array<'a> /** `ignore(typedArray)` ignores the provided typedArray and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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<'a> => unit = "%ignore" diff --git a/runtime/Stdlib_Uint16Array.res b/runtime/Stdlib_Uint16Array.res index 5edbb8b6f3..5964328694 100644 --- a/runtime/Stdlib_Uint16Array.res +++ b/runtime/Stdlib_Uint16Array.res @@ -56,7 +56,7 @@ external fromArrayLikeOrIterableWithMap: ('a, ('b, int) => int) => t = "Uint16Ar /** `ignore(uintArray)` ignores the provided uintArray and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_Uint32Array.res b/runtime/Stdlib_Uint32Array.res index 550ded3734..3801a0407d 100644 --- a/runtime/Stdlib_Uint32Array.res +++ b/runtime/Stdlib_Uint32Array.res @@ -56,7 +56,7 @@ external fromArrayLikeOrIterableWithMap: ('a, ('b, int) => int) => t = "Uint32Ar /** `ignore(uintArray)` ignores the provided uintArray and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_Uint8Array.res b/runtime/Stdlib_Uint8Array.res index 5ee7244fbb..94c52c83e0 100644 --- a/runtime/Stdlib_Uint8Array.res +++ b/runtime/Stdlib_Uint8Array.res @@ -56,7 +56,7 @@ external fromArrayLikeOrIterableWithMap: ('a, ('b, int) => int) => t = "Uint8Arr /** `ignore(uintArray)` ignores the provided uintArray and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_Uint8ClampedArray.res b/runtime/Stdlib_Uint8ClampedArray.res index 77b5c444b7..ea32fab206 100644 --- a/runtime/Stdlib_Uint8ClampedArray.res +++ b/runtime/Stdlib_Uint8ClampedArray.res @@ -56,7 +56,7 @@ external fromArrayLikeOrIterableWithMap: ('a, ('b, int) => int) => t = "Uint8Cla /** `ignore(uintArray)` ignores the provided uintArray and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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" diff --git a/runtime/Stdlib_WeakMap.res b/runtime/Stdlib_WeakMap.res index 6bc4f9db58..f6846eb17a 100644 --- a/runtime/Stdlib_WeakMap.res +++ b/runtime/Stdlib_WeakMap.res @@ -10,7 +10,7 @@ type t<'k, 'v> /** `ignore(weakMap)` ignores the provided weakMap and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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<'k, 'v> => unit = "%ignore" diff --git a/runtime/Stdlib_WeakSet.res b/runtime/Stdlib_WeakSet.res index 18876d1a23..6d6deefdfd 100644 --- a/runtime/Stdlib_WeakSet.res +++ b/runtime/Stdlib_WeakSet.res @@ -9,7 +9,7 @@ type t<'a> /** `ignore(weakSet)` ignores the provided weakSet and returns unit. - This helper is useful when you want to discard a value (for example, the result of a side-effecting operation) + 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<'a> => unit = "%ignore" diff --git a/tests/analysis_tests/tests/src/expected/Completion.res.txt b/tests/analysis_tests/tests/src/expected/Completion.res.txt index de4e4ffe74..12ed2be02a 100644 --- a/tests/analysis_tests/tests/src/expected/Completion.res.txt +++ b/tests/analysis_tests/tests/src/expected/Completion.res.txt @@ -345,7 +345,7 @@ Path Array. "kind": 12, "tags": [], "detail": "array<'a> => unit", - "documentation": {"kind": "markdown", "value": "\n `ignore(array)` ignores the provided array and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of a side-effecting operation)\n without having to store or process it further.\n"} + "documentation": {"kind": "markdown", "value": "\n `ignore(array)` ignores the provided array and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n"} }, { "label": "isArray", "kind": 12, diff --git a/tests/analysis_tests/tests/src/expected/CompletionJsx.res.txt b/tests/analysis_tests/tests/src/expected/CompletionJsx.res.txt index 5ae8565ff9..4a4fbf4b96 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionJsx.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionJsx.res.txt @@ -267,7 +267,7 @@ Path Stdlib.Int. "kind": 12, "tags": [], "detail": "int => unit", - "documentation": {"kind": "markdown", "value": "\n `ignore(int)` ignores the provided int and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of a side-effecting operation)\n without having to store or process it further.\n"} + "documentation": {"kind": "markdown", "value": "\n `ignore(int)` ignores the provided int and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n"} }, { "label": "Int.toPrecision", "kind": 12, @@ -400,7 +400,7 @@ Path Stdlib.Int. "kind": 12, "tags": [], "detail": "int => unit", - "documentation": {"kind": "markdown", "value": "\n `ignore(int)` ignores the provided int and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of a side-effecting operation)\n without having to store or process it further.\n"} + "documentation": {"kind": "markdown", "value": "\n `ignore(int)` ignores the provided int and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n"} }, { "label": "Int.toPrecision", "kind": 12,