Skip to content

Commit 75afc52

Browse files
authored
Remove outdated Belt.Array documentation regarding stdlib's Array.get (#7570)
* Remove outdated Belt.Array documentation regarding stdlib's Array.get * Update completion snapshot test expected output
1 parent eb2c71b commit 75afc52

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

runtime/Belt_Array.resi

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,6 @@
1414

1515
/***
1616
Utilities for `Array` functions.
17-
18-
### Note about index syntax
19-
20-
Code like `arr[0]` does *not* compile to JavaScript `arr[0]`. Reason transforms
21-
the `[]` index syntax into a function: `Array.get(arr, 0)`. By default, this
22-
uses the default standard library's `Array.get` function, which may raise an
23-
exception if the index isn't found. If you `open Belt`, it will use the
24-
`Belt.Array.get` function which returns options instead of raising exceptions.
25-
[See this for more information](../belt.mdx#array-access-runtime-safety).
2617
*/
2718

2819
type t<'a> = array<'a>

tests/analysis_tests/tests/src/expected/CompletionResolve.res.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Completion resolve: Belt_Array
2-
"\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"
2+
"\nUtilities for `Array` functions.\n"
33

44
Completion resolve: ModuleStuff
55
" This is a top level module doc. "

0 commit comments

Comments
 (0)