diff --git a/runtime/Stdlib_Bool.resi b/runtime/Stdlib_Bool.resi index f5f3bcea4b..a34dc43a7d 100644 --- a/runtime/Stdlib_Bool.resi +++ b/runtime/Stdlib_Bool.resi @@ -13,8 +13,8 @@ Converts a boolean to a string. ## Examples ```rescript -Bool.toString(true)->assertEqual("true") -Bool.toString(false)->assertEqual("false") +Bool.toString(true) == "true" +Bool.toString(false) == "false" ``` */ let toString: bool => string @@ -24,9 +24,9 @@ Converts a string to a boolean. ## Examples ```rescript -Bool.fromString("true")->assertEqual(Some(true)) -Bool.fromString("false")->assertEqual(Some(false)) -Bool.fromString("notAValidBoolean")->assertEqual(None) +Bool.fromString("true") == Some(true) +Bool.fromString("false") == Some(false) +Bool.fromString("notAValidBoolean") == None ``` */ let fromString: string => option @@ -37,8 +37,8 @@ Throws an `Invalid_argument` exception if the string is not a valid boolean. ## Examples ```rescript -Bool.fromStringOrThrow("true")->assertEqual(true) -Bool.fromStringOrThrow("false")->assertEqual(false) +Bool.fromStringOrThrow("true") == true +Bool.fromStringOrThrow("false") == false switch Bool.fromStringOrThrow("notAValidBoolean") { | exception Invalid_argument(_) => assert(true) | _ => assert(false) @@ -54,8 +54,8 @@ if the string is not a valid boolean. ## Examples ```rescript -Bool.fromStringExn("true")->assertEqual(true) -Bool.fromStringExn("false")->assertEqual(false) +Bool.fromStringExn("true") == true +Bool.fromStringExn("false") == false switch Bool.fromStringExn("notAValidBoolean") { | exception Invalid_argument(_) => assert(true) | _ => assert(false) @@ -70,10 +70,10 @@ Compares two booleans, returns an `Ordering.t` value. ## Examples ```rescript -Bool.compare(true, true)->assertEqual(Ordering.equal) -Bool.compare(false, false)->assertEqual(Ordering.equal) -Bool.compare(true, false)->assertEqual(Ordering.greater) -Bool.compare(false, true)->assertEqual(Ordering.less) +Bool.compare(true, true) == Ordering.equal +Bool.compare(false, false) == Ordering.equal +Bool.compare(true, false) == Ordering.greater +Bool.compare(false, true) == Ordering.less ``` */ external compare: (bool, bool) => Stdlib_Ordering.t = "%compare" @@ -83,10 +83,10 @@ Checks if two booleans are equal and have the same value. ## Examples ```rescript -Bool.equal(true, true)->assertEqual(true) -Bool.equal(false, false)->assertEqual(true) -Bool.equal(true, false)->assertEqual(false) -Bool.equal(false, true)->assertEqual(false) +Bool.equal(true, true) == true +Bool.equal(false, false) == true +Bool.equal(true, false) == false +Bool.equal(false, true) == false ``` */ external equal: (bool, bool) => bool = "%equal" diff --git a/runtime/Stdlib_Date.resi b/runtime/Stdlib_Date.resi index 33bbf4ce4e..39b8121597 100644 --- a/runtime/Stdlib_Date.resi +++ b/runtime/Stdlib_Date.resi @@ -428,8 +428,27 @@ Returns the time, in milliseconds, between UNIX epoch (January 1, 1970 00:00:00 @val external now: unit => msSinceEpoch = "Date.now" +/** +`equal(date1, date2)` checks if two dates represent the same point in time. + +## Examples +```rescript +Date.equal(Date.fromString("2023-01-01"), Date.fromString("2023-01-01")) == true +Date.equal(Date.fromString("2023-01-01"), Date.fromString("2023-01-02")) == false +``` +*/ let equal: (t, t) => bool +/** +`compare(date1, date2)` compares two dates chronologically, returns an `Ordering.t` value. + +## Examples +```rescript +Date.compare(Date.fromString("2023-01-01"), Date.fromString("2023-01-01")) == Ordering.equal +Date.compare(Date.fromString("2023-01-01"), Date.fromString("2023-01-02")) == Ordering.less +Date.compare(Date.fromString("2023-01-02"), Date.fromString("2023-01-01")) == Ordering.greater +``` +*/ let compare: (t, t) => Stdlib_Ordering.t /** diff --git a/runtime/Stdlib_Float.resi b/runtime/Stdlib_Float.resi index 8b653af100..b9e19f3981 100644 --- a/runtime/Stdlib_Float.resi +++ b/runtime/Stdlib_Float.resi @@ -114,8 +114,27 @@ module Constants: { external maxValue: float = "Number.MAX_VALUE" } +/** +Checks if two floating point numbers are equal. + +## Examples +```rescript +Float.equal(1.0, 1.0) == true +Float.equal(1.0, 2.0) == false +``` +*/ external equal: (float, float) => bool = "%equal" +/** +Compares two floating point numbers, returns an `Ordering.t` value. + +## Examples +```rescript +Float.compare(1.0, 1.0) == Ordering.equal +Float.compare(1.0, 2.0) == Ordering.less +Float.compare(2.0, 1.0) == Ordering.greater +``` +*/ external compare: (float, float) => Stdlib_Ordering.t = "%compare" /** @@ -139,9 +158,9 @@ See [`isFinite`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Referen ## Examples ```rescript -Float.isFinite(1.0) // true -Float.isFinite(Float.Constants.nan) // false -Float.isFinite(Float.Constants.positiveInfinity) // false +Float.isFinite(1.0) == true +Float.isFinite(Float.Constants.nan) == false +Float.isFinite(Float.Constants.positiveInfinity) == false ``` */ @val @@ -156,11 +175,11 @@ See [`parseFloat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refer ## Examples ```rescript -Float.parseFloat("1.0") // 1.0 -Float.parseFloat(" 3.14 ") // 3.14 -Float.parseFloat("3.0") // 3.0 -Float.parseFloat("3.14some non-digit characters") // 3.14 -Float.parseFloat("error")->Float.isNaN // true +Float.parseFloat("1.0") == 1.0 +Float.parseFloat(" 3.14 ") == 3.14 +Float.parseFloat("3.0") == 3.0 +Float.parseFloat("3.14some non-digit characters") == 3.14 +Float.parseFloat("error")->Float.isNaN == true ``` */ @val @@ -177,15 +196,15 @@ See [`parseInt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Referen ## Examples ```rescript -Float.parseInt("1.0") // 1.0 -Float.parseInt(" 3.14 ") // 3.0 -Float.parseInt(3) // 3.0 -Float.parseInt("3.14some non-digit characters") // 3.0 -Float.parseInt("error")->Float.isNaN // true -Float.parseInt("10.0", ~radix=2) // 2.0 -Float.parseInt("15 * 3", ~radix=10) // 15.0 -Float.parseInt("12", ~radix=13) // 15.0 -Float.parseInt("17", ~radix=40)->Float.isNaN // true +Float.parseInt("1.0") == 1.0 +Float.parseInt(" 3.14 ") == 3.0 +Float.parseInt(3) == 3.0 +Float.parseInt("3.14some non-digit characters") == 3.0 +Float.parseInt("error")->Float.isNaN == true +Float.parseInt("10.0", ~radix=2) == 2.0 +Float.parseInt("15 * 3", ~radix=10) == 15.0 +Float.parseInt("12", ~radix=13) == 15.0 +Float.parseInt("17", ~radix=40)->Float.isNaN == true ``` */ @val @@ -202,10 +221,10 @@ See [`parseInt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Referen ## Examples ```rescript -Float.parseIntWithRadix("10.0", ~radix=2) // 2.0 -Float.parseIntWithRadix("15 * 3", ~radix=10) // 15.0 -Float.parseIntWithRadix("12", ~radix=13) // 15.0 -Float.parseIntWithRadix("17", ~radix=40)->Float.isNaN // true +Float.parseIntWithRadix("10.0", ~radix=2) == 2.0 +Float.parseIntWithRadix("15 * 3", ~radix=10) == 15.0 +Float.parseIntWithRadix("12", ~radix=13) == 15.0 +Float.parseIntWithRadix("17", ~radix=40)->Float.isNaN == true ``` */ @deprecated("Use `parseInt` instead") @val @@ -220,10 +239,10 @@ See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaSc ## Examples ```rescript -Float.toExponential(1000.0) // "1e+3" -Float.toExponential(-1000.0) // "-1e+3" -Float.toExponential(77.0, ~digits=2) // "7.70e+1" -Float.toExponential(5678.0, ~digits=2) // "5.68e+3" +Float.toExponential(1000.0) == "1e+3" +Float.toExponential(-1000.0) == "-1e+3" +Float.toExponential(77.0, ~digits=2) == "7.70e+1" +Float.toExponential(5678.0, ~digits=2) == "5.68e+3" ``` ## Exceptions @@ -242,8 +261,8 @@ See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaSc ## Examples ```rescript -Float.toExponentialWithPrecision(77.0, ~digits=2) // "7.70e+1" -Float.toExponentialWithPrecision(5678.0, ~digits=2) // "5.68e+3" +Float.toExponentialWithPrecision(77.0, ~digits=2) == "7.70e+1" +Float.toExponentialWithPrecision(5678.0, ~digits=2) == "5.68e+3" ``` ## Exceptions @@ -262,10 +281,10 @@ See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/R ## Examples ```rescript -Float.toFixed(123456.0) // "123456.00" -Float.toFixed(10.0) // "10.00" -Float.toFixed(300.0, ~digits=4) // "300.0000" -Float.toFixed(300.0, ~digits=1) // "300.0" +Float.toFixed(123456.0) == "123456" +Float.toFixed(10.0) == "10" +Float.toFixed(300.0, ~digits=4) == "300.0000" +Float.toFixed(300.0, ~digits=1) == "300.0" ``` ## Exceptions @@ -284,8 +303,8 @@ See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/R ## Examples ```rescript -Float.toFixedWithPrecision(300.0, ~digits=4) // "300.0000" -Float.toFixedWithPrecision(300.0, ~digits=1) // "300.0" +Float.toFixedWithPrecision(300.0, ~digits=4) == "300.0000" +Float.toFixedWithPrecision(300.0, ~digits=1) == "300.0" ``` ## Exceptions @@ -303,10 +322,10 @@ See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScri ## Examples ```rescript -Float.toPrecision(100.0) // "100" -Float.toPrecision(1.0) // "1" -Float.toPrecision(100.0, ~digits=2) // "1.0e+2" -Float.toPrecision(1.0, ~digits=1) // "1" +Float.toPrecision(100.0) == "100" +Float.toPrecision(1.0) == "1" +Float.toPrecision(100.0, ~digits=2) == "1.0e+2" +Float.toPrecision(1.0, ~digits=1) == "1" ``` ## Exceptions @@ -326,8 +345,8 @@ See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScri ## Examples ```rescript -Float.toPrecisionWithPrecision(100.0, ~digits=2) // "1.0e+2" -Float.toPrecisionWithPrecision(1.0, ~digits=1) // "1" +Float.toPrecisionWithPrecision(100.0, ~digits=2) == "1.0e+2" +Float.toPrecisionWithPrecision(1.0, ~digits=1) == "1" ``` ## Exceptions @@ -347,8 +366,8 @@ See [`Number.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/ ## Examples ```rescript -Float.toString(1000.0) // "1000" -Float.toString(-1000.0) // "-1000" +Float.toString(1000.0) == "1000" +Float.toString(-1000.0) == "-1000" ``` */ @send @@ -362,9 +381,9 @@ See [`Number.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/ ## Examples ```rescript -Float.toStringWithRadix(6.0, ~radix=2) // "110" -Float.toStringWithRadix(3735928559.0, ~radix=16) // "deadbeef" -Float.toStringWithRadix(123456.0, ~radix=36) // "2n9c" +Float.toStringWithRadix(6.0, ~radix=2) == "110" +Float.toStringWithRadix(3735928559.0, ~radix=16) == "deadbeef" +Float.toStringWithRadix(123456.0, ~radix=36) == "2n9c" ``` ## Exceptions diff --git a/tests/analysis_tests/tests/src/expected/Completion.res.txt b/tests/analysis_tests/tests/src/expected/Completion.res.txt index ce1e24bdf9..f26d64ee76 100644 --- a/tests/analysis_tests/tests/src/expected/Completion.res.txt +++ b/tests/analysis_tests/tests/src/expected/Completion.res.txt @@ -2515,13 +2515,13 @@ Path t "kind": 12, "tags": [1], "detail": "(float, ~radix: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toString` with `~radix` instead\n\n\n`toStringWithRadix(v, ~radix)` return a `string` representing the given value.\n`~radix` specifies the radix base to use for the formatted number.\nSee [`Number.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString) on MDN.\n\n## Examples\n\n```rescript\nFloat.toStringWithRadix(6.0, ~radix=2) // \"110\"\nFloat.toStringWithRadix(3735928559.0, ~radix=16) // \"deadbeef\"\nFloat.toStringWithRadix(123456.0, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n"} + "documentation": {"kind": "markdown", "value": "Deprecated: Use `toString` with `~radix` instead\n\n\n`toStringWithRadix(v, ~radix)` return a `string` representing the given value.\n`~radix` specifies the radix base to use for the formatted number.\nSee [`Number.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString) on MDN.\n\n## Examples\n\n```rescript\nFloat.toStringWithRadix(6.0, ~radix=2) == \"110\"\nFloat.toStringWithRadix(3735928559.0, ~radix=16) == \"deadbeef\"\nFloat.toStringWithRadix(123456.0, ~radix=36) == \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n"} }, { "label": "Float.toExponentialWithPrecision", "kind": 12, "tags": [1], "detail": "(float, ~digits: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toExponential` instead\n\n\n`toExponential(v, ~digits)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point.\nSee [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential) on MDN.\n\n## Examples\n\n```rescript\nFloat.toExponentialWithPrecision(77.0, ~digits=2) // \"7.70e+1\"\nFloat.toExponentialWithPrecision(5678.0, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10.\n"} + "documentation": {"kind": "markdown", "value": "Deprecated: Use `toExponential` instead\n\n\n`toExponential(v, ~digits)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point.\nSee [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential) on MDN.\n\n## Examples\n\n```rescript\nFloat.toExponentialWithPrecision(77.0, ~digits=2) == \"7.70e+1\"\nFloat.toExponentialWithPrecision(5678.0, ~digits=2) == \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10.\n"} }, { "label": "Float.toInt", "kind": 12, @@ -2533,25 +2533,25 @@ Path t "kind": 12, "tags": [1], "detail": "(float, ~digits: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toFixed` instead\n\n\n`toFixedWithPrecision(v, ~digits)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point.\nSee [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed) on MDN.\n\n## Examples\n\n```rescript\nFloat.toFixedWithPrecision(300.0, ~digits=4) // \"300.0000\"\nFloat.toFixedWithPrecision(300.0, ~digits=1) // \"300.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is less than 0 or larger than 100.\n"} + "documentation": {"kind": "markdown", "value": "Deprecated: Use `toFixed` instead\n\n\n`toFixedWithPrecision(v, ~digits)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point.\nSee [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed) on MDN.\n\n## Examples\n\n```rescript\nFloat.toFixedWithPrecision(300.0, ~digits=4) == \"300.0000\"\nFloat.toFixedWithPrecision(300.0, ~digits=1) == \"300.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is less than 0 or larger than 100.\n"} }, { "label": "Float.toPrecisionWithPrecision", "kind": 12, "tags": [1], "detail": "(float, ~digits: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toPrecision` instead\n\n\n`toPrecisionWithPrecision(v, ~digits)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits.\nSee [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nFloat.toPrecisionWithPrecision(100.0, ~digits=2) // \"1.0e+2\"\nFloat.toPrecisionWithPrecision(1.0, ~digits=1) // \"1\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\nImplementations are allowed to support larger and smaller values as well.\nECMA-262 only requires a precision of up to 21 significant digits.\n\n"} + "documentation": {"kind": "markdown", "value": "Deprecated: Use `toPrecision` instead\n\n\n`toPrecisionWithPrecision(v, ~digits)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits.\nSee [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nFloat.toPrecisionWithPrecision(100.0, ~digits=2) == \"1.0e+2\"\nFloat.toPrecisionWithPrecision(1.0, ~digits=1) == \"1\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\nImplementations are allowed to support larger and smaller values as well.\nECMA-262 only requires a precision of up to 21 significant digits.\n\n"} }, { "label": "Float.toPrecision", "kind": 12, "tags": [], "detail": "(float, ~digits: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toPrecision(v, ~digits=?)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits.\nSee [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nFloat.toPrecision(100.0) // \"100\"\nFloat.toPrecision(1.0) // \"1\"\nFloat.toPrecision(100.0, ~digits=2) // \"1.0e+2\"\nFloat.toPrecision(1.0, ~digits=1) // \"1\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\nImplementations are allowed to support larger and smaller values as well.\nECMA-262 only requires a precision of up to 21 significant digits.\n"} + "documentation": {"kind": "markdown", "value": "\n`toPrecision(v, ~digits=?)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits.\nSee [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nFloat.toPrecision(100.0) == \"100\"\nFloat.toPrecision(1.0) == \"1\"\nFloat.toPrecision(100.0, ~digits=2) == \"1.0e+2\"\nFloat.toPrecision(1.0, ~digits=1) == \"1\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\nImplementations are allowed to support larger and smaller values as well.\nECMA-262 only requires a precision of up to 21 significant digits.\n"} }, { "label": "Float.toString", "kind": 12, "tags": [], "detail": "(float, ~radix: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toString(v)` return a `string` representing the given value.\nSee [`Number.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString) on MDN.\n\n## Examples\n\n```rescript\nFloat.toString(1000.0) // \"1000\"\nFloat.toString(-1000.0) // \"-1000\"\n```\n"} + "documentation": {"kind": "markdown", "value": "\n`toString(v)` return a `string` representing the given value.\nSee [`Number.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString) on MDN.\n\n## Examples\n\n```rescript\nFloat.toString(1000.0) == \"1000\"\nFloat.toString(-1000.0) == \"-1000\"\n```\n"} }, { "label": "Float.toLocaleString", "kind": 12, @@ -2563,13 +2563,13 @@ Path t "kind": 12, "tags": [], "detail": "(float, ~digits: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toExponential(v, ~digits=?)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point.\nSee [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential) on MDN.\n\n## Examples\n\n```rescript\nFloat.toExponential(1000.0) // \"1e+3\"\nFloat.toExponential(-1000.0) // \"-1e+3\"\nFloat.toExponential(77.0, ~digits=2) // \"7.70e+1\"\nFloat.toExponential(5678.0, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10.\n"} + "documentation": {"kind": "markdown", "value": "\n`toExponential(v, ~digits=?)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point.\nSee [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential) on MDN.\n\n## Examples\n\n```rescript\nFloat.toExponential(1000.0) == \"1e+3\"\nFloat.toExponential(-1000.0) == \"-1e+3\"\nFloat.toExponential(77.0, ~digits=2) == \"7.70e+1\"\nFloat.toExponential(5678.0, ~digits=2) == \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10.\n"} }, { "label": "Float.toFixed", "kind": 12, "tags": [], "detail": "(float, ~digits: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toFixed(v, ~digits=?)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point.\nSee [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed) on MDN.\n\n## Examples\n\n```rescript\nFloat.toFixed(123456.0) // \"123456.00\"\nFloat.toFixed(10.0) // \"10.00\"\nFloat.toFixed(300.0, ~digits=4) // \"300.0000\"\nFloat.toFixed(300.0, ~digits=1) // \"300.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is less than 0 or larger than 100.\n"} + "documentation": {"kind": "markdown", "value": "\n`toFixed(v, ~digits=?)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point.\nSee [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed) on MDN.\n\n## Examples\n\n```rescript\nFloat.toFixed(123456.0) == \"123456\"\nFloat.toFixed(10.0) == \"10\"\nFloat.toFixed(300.0, ~digits=4) == \"300.0000\"\nFloat.toFixed(300.0, ~digits=1) == \"300.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is less than 0 or larger than 100.\n"} }] Complete src/Completion.res 427:8