From 37270f0d6f3dd7d522ae025ae73ef13ddd69f46e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9di-R=C3=A9mi=20Hashim?= Date: Thu, 19 Jun 2025 12:49:23 +0100 Subject: [PATCH 1/2] Remove outdated Belt.Array documentation regarding stdlib's Array.get --- runtime/Belt_Array.resi | 9 --------- 1 file changed, 9 deletions(-) diff --git a/runtime/Belt_Array.resi b/runtime/Belt_Array.resi index ad1cdeaf4b..bac8001f31 100644 --- a/runtime/Belt_Array.resi +++ b/runtime/Belt_Array.resi @@ -14,15 +14,6 @@ /*** Utilities for `Array` functions. - -### Note about index syntax - -Code like `arr[0]` does *not* compile to JavaScript `arr[0]`. Reason transforms -the `[]` index syntax into a function: `Array.get(arr, 0)`. By default, this -uses the default standard library's `Array.get` function, which may raise an -exception if the index isn't found. If you `open Belt`, it will use the -`Belt.Array.get` function which returns options instead of raising exceptions. -[See this for more information](../belt.mdx#array-access-runtime-safety). */ type t<'a> = array<'a> From ee8886127a31c65f15f8efa7bfdec0991701fc04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9di-R=C3=A9mi=20Hashim?= Date: Thu, 19 Jun 2025 16:28:00 +0100 Subject: [PATCH 2/2] Update completion snapshot test expected output --- .../analysis_tests/tests/src/expected/CompletionResolve.res.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/analysis_tests/tests/src/expected/CompletionResolve.res.txt b/tests/analysis_tests/tests/src/expected/CompletionResolve.res.txt index d0492d217b..266a68ee4b 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionResolve.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionResolve.res.txt @@ -1,5 +1,5 @@ Completion resolve: Belt_Array -"\nUtilities for `Array` functions.\n\n### Note about index syntax\n\nCode like `arr[0]` does *not* compile to JavaScript `arr[0]`. Reason transforms\nthe `[]` index syntax into a function: `Array.get(arr, 0)`. By default, this\nuses the default standard library's `Array.get` function, which may raise an\nexception if the index isn't found. If you `open Belt`, it will use the\n`Belt.Array.get` function which returns options instead of raising exceptions. \n[See this for more information](../belt.mdx#array-access-runtime-safety).\n" +"\nUtilities for `Array` functions.\n" Completion resolve: ModuleStuff " This is a top level module doc. "