Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit501eaa2

Browse files
committed
update completion
1 parent09d44ee commit501eaa2

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

‎tests/analysis_tests/tests-reanalyze/deadcode/expected/exception.txt‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
Exception Analysis
1616
Exn.res:22:5-42
17-
callsThrowWithAnnotationAndIsAnnotated mightraise Not_found (Exn.res:22:45) and is annotated with redundant @throws(A)
17+
callsThrowWithAnnotationAndIsAnnotated mightthrow Not_found (Exn.res:22:45) and is annotated with redundant @throws(A)
1818

1919
Exception Analysis
2020
Exn.res:24:5-19
@@ -38,7 +38,7 @@
3838

3939
Exception Analysis
4040
Exn.res:62:5-19
41-
throw2Annotate3 mightraise [A (Exn.res:64:4), B (Exn.res:67:4)] and is annotated with redundant @throws(C)
41+
throw2Annotate3 mightthrow [A (Exn.res:64:4), B (Exn.res:67:4)] and is annotated with redundant @throws(C)
4242

4343
Exception Analysis
4444
Exn.res:73:5-24
@@ -62,7 +62,7 @@
6262

6363
Exception Analysis
6464
Exn.res:133:5-23
65-
redundantAnnotationraises nothing and is annotated with redundant @throws(Invalid_argument)
65+
redundantAnnotationthrows nothing and is annotated with redundant @throws(Invalid_argument)
6666

6767
Exception Analysis
6868
Exn.res:135:5-6

‎tests/analysis_tests/tests/src/expected/CompletionExpressions.res.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ Path fnTakingCallback
832832
"kind": 12,
833833
"tags": [],
834834
"detail": "('a, 'a) => unit",
835-
"documentation": {"kind": "markdown", "value": "\n`assertEqual(a, b)` check if `a` is equal `b`. If notraise a panic exception\n\n## Examples\n\n```rescript\nlist{1, 2}->List.tailExn == list{2}\n```\n"}
835+
"documentation": {"kind": "markdown", "value": "\n`assertEqual(a, b)` check if `a` is equal `b`. If notthrow a panic exception\n\n## Examples\n\n```rescript\nlist{1, 2}->List.tailExn == list{2}\n```\n"}
836836
}]
837837

838838
Complete src/CompletionExpressions.res 165:22

‎tests/analysis_tests/tests/src/expected/CompletionJsx.res.txt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ Path
285285
"kind": 12,
286286
"tags": [],
287287
"detail": "(int, int, ~options: rangeOptions=?) => array<int>",
288-
"documentation": {"kind": "markdown", "value": "\n`range(start, end, ~options=?)` returns an int array of the sequence of integers in the\nrange `[start, end)`. That is, including `start` but excluding `end`.\n\nIf `step` is not set and `start < end`, the sequence will be increasing in steps of 1.\n\nIf `step` is not set and `start > end`, the sequence will be decreasing in steps of -1.\n\nIf `step` is set, the sequence will increase or decrease by that amount for each\nstep. If `start < end` and `step` is negative, or vice versa, an empty array is\nreturned since the sequence would otherwise never reach or exceed the end value\nand hence be infinite. If `step` is `0` and `start !=` end, a `RangeError` is\nraised as the sequence would never reach or exceed the end value and hence be\ninfinite.\n\nIf `inclusive` is set to `true`, the sequence will include `end` if `step` is\nset such that the sequence includes it.\n\n## Examples\n\n```rescript\nInt.range(3, 6) == [3, 4, 5]\nInt.range(-3, -1) == [-3, -2]\nInt.range(3, 1) == [3, 2]\nInt.range(3, 7, ~options={step: 2}) == [3, 5]\nInt.range(3, 7, ~options={step: 2, inclusive: true}) == [3, 5, 7]\nInt.range(3, 6, ~options={step: -2}) // RangeError\n```\n\n## Exceptions\n\n- Raises `RangeError` if `step == 0 && start != end`.\n"}
288+
"documentation": {"kind": "markdown", "value": "\n`range(start, end, ~options=?)` returns an int array of the sequence of integers in the\nrange `[start, end)`. That is, including `start` but excluding `end`.\n\nIf `step` is not set and `start < end`, the sequence will be increasing in steps of 1.\n\nIf `step` is not set and `start > end`, the sequence will be decreasing in steps of -1.\n\nIf `step` is set, the sequence will increase or decrease by that amount for each\nstep. If `start < end` and `step` is negative, or vice versa, an empty array is\nreturned since the sequence would otherwise never reach or exceed the end value\nand hence be infinite. If `step` is `0` and `start !=` end, a `RangeError` is\nthrown as the sequence would never reach or exceed the end value and hence be\ninfinite.\n\nIf `inclusive` is set to `true`, the sequence will include `end` if `step` is\nset such that the sequence includes it.\n\n## Examples\n\n```rescript\nInt.range(3, 6) == [3, 4, 5]\nInt.range(-3, -1) == [-3, -2]\nInt.range(3, 1) == [3, 2]\nInt.range(3, 7, ~options={step: 2}) == [3, 5]\nInt.range(3, 7, ~options={step: 2, inclusive: true}) == [3, 5, 7]\nInt.range(3, 6, ~options={step: -2}) // RangeError\n```\n\n## Exceptions\n\n- Raises `RangeError` if `step == 0 && start != end`.\n"}
289289
}, {
290290
"label": "Int.toString",
291291
"kind": 12,
@@ -455,7 +455,7 @@ Path
455455
"kind": 12,
456456
"tags": [],
457457
"detail": "(int, int, ~options: rangeOptions=?) => array<int>",
458-
"documentation": {"kind": "markdown", "value": "\n`range(start, end, ~options=?)` returns an int array of the sequence of integers in the\nrange `[start, end)`. That is, including `start` but excluding `end`.\n\nIf `step` is not set and `start < end`, the sequence will be increasing in steps of 1.\n\nIf `step` is not set and `start > end`, the sequence will be decreasing in steps of -1.\n\nIf `step` is set, the sequence will increase or decrease by that amount for each\nstep. If `start < end` and `step` is negative, or vice versa, an empty array is\nreturned since the sequence would otherwise never reach or exceed the end value\nand hence be infinite. If `step` is `0` and `start !=` end, a `RangeError` is\nraised as the sequence would never reach or exceed the end value and hence be\ninfinite.\n\nIf `inclusive` is set to `true`, the sequence will include `end` if `step` is\nset such that the sequence includes it.\n\n## Examples\n\n```rescript\nInt.range(3, 6) == [3, 4, 5]\nInt.range(-3, -1) == [-3, -2]\nInt.range(3, 1) == [3, 2]\nInt.range(3, 7, ~options={step: 2}) == [3, 5]\nInt.range(3, 7, ~options={step: 2, inclusive: true}) == [3, 5, 7]\nInt.range(3, 6, ~options={step: -2}) // RangeError\n```\n\n## Exceptions\n\n- Raises `RangeError` if `step == 0 && start != end`.\n"}
458+
"documentation": {"kind": "markdown", "value": "\n`range(start, end, ~options=?)` returns an int array of the sequence of integers in the\nrange `[start, end)`. That is, including `start` but excluding `end`.\n\nIf `step` is not set and `start < end`, the sequence will be increasing in steps of 1.\n\nIf `step` is not set and `start > end`, the sequence will be decreasing in steps of -1.\n\nIf `step` is set, the sequence will increase or decrease by that amount for each\nstep. If `start < end` and `step` is negative, or vice versa, an empty array is\nreturned since the sequence would otherwise never reach or exceed the end value\nand hence be infinite. If `step` is `0` and `start !=` end, a `RangeError` is\nthrown as the sequence would never reach or exceed the end value and hence be\ninfinite.\n\nIf `inclusive` is set to `true`, the sequence will include `end` if `step` is\nset such that the sequence includes it.\n\n## Examples\n\n```rescript\nInt.range(3, 6) == [3, 4, 5]\nInt.range(-3, -1) == [-3, -2]\nInt.range(3, 1) == [3, 2]\nInt.range(3, 7, ~options={step: 2}) == [3, 5]\nInt.range(3, 7, ~options={step: 2, inclusive: true}) == [3, 5, 7]\nInt.range(3, 6, ~options={step: -2}) // RangeError\n```\n\n## Exceptions\n\n- Raises `RangeError` if `step == 0 && start != end`.\n"}
459459
}, {
460460
"label": "Int.toString",
461461
"kind": 12,

‎tests/analysis_tests/tests/src/expected/CompletionNullNullable.res.txt‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Path
2929
"kind": 12,
3030
"tags": [],
3131
"detail": "t<'a> => 'a",
32-
"documentation": {"kind": "markdown", "value": "\n`getUnsafe(value)` returns `value`.\n\n## Examples\n\n```rescript\nNull.getUnsafe(Null.make(3)) == 3\nNull.getUnsafe(Null.null) //Raises an error\n```\n\n## Important\n\n- This is an unsafe operation, it assumes `value` is not `null`.\n"},
32+
"documentation": {"kind": "markdown", "value": "\n`getUnsafe(value)` returns `value`.\n\n## Examples\n\n```rescript\nNull.getUnsafe(Null.make(3)) == 3\nNull.getUnsafe(Null.null) //Throws an error\n```\n\n## Important\n\n- This is an unsafe operation, it assumes `value` is not `null`.\n"},
3333
"sortText": "getUnsafe",
3434
"insertText": "->Null.getUnsafe",
3535
"additionalTextEdits": [{
@@ -53,7 +53,7 @@ Path
5353
"kind": 12,
5454
"tags": [1],
5555
"detail": "t<'a> => 'a",
56-
"documentation": {"kind": "markdown", "value": "Deprecated: Use `getOrThrow` instead\n\n\n`getExn(value)`raises an exception if `null`, otherwise returns the value.\n\n```rescript\nNull.getExn(Null.make(3)) == 3\n\nswitch Null.getExn(%raw(\"'ReScript'\")) {\n| exception Invalid_argument(_) => assert(false)\n| value => value == \"ReScript\"\n}\n\nswitch Null.getExn(%raw(\"null\")) {\n| exception Invalid_argument(_) => assert(true)\n| _ => assert(false)\n}\n```\n\n## Exceptions\n\n-Raises `Invalid_argument` if `value` is `null`\n"},
56+
"documentation": {"kind": "markdown", "value": "Deprecated: Use `getOrThrow` instead\n\n\n`getExn(value)`throws an exception if `null`, otherwise returns the value.\n\n```rescript\nNull.getExn(Null.make(3)) == 3\n\nswitch Null.getExn(%raw(\"'ReScript'\")) {\n| exception Invalid_argument(_) => assert(false)\n| value => value == \"ReScript\"\n}\n\nswitch Null.getExn(%raw(\"null\")) {\n| exception Invalid_argument(_) => assert(true)\n| _ => assert(false)\n}\n```\n\n## Exceptions\n\n-Throws `Invalid_argument` if `value` is `null`\n"},
5757
"sortText": "getExn",
5858
"insertText": "->Null.getExn",
5959
"additionalTextEdits": [{
@@ -89,7 +89,7 @@ Path
8989
"kind": 12,
9090
"tags": [],
9191
"detail": "t<'a> => 'a",
92-
"documentation": {"kind": "markdown", "value": "\n`getOrThrow(value)`raises an exception if `null`, otherwise returns the value.\n\n```rescript\nNull.getOrThrow(Null.make(3)) == 3\n\nswitch Null.getOrThrow(%raw(\"'ReScript'\")) {\n| exception Invalid_argument(_) => assert(false)\n| value => value == \"ReScript\"\n}\n\nswitch Null.getOrThrow(%raw(\"null\")) {\n| exception Invalid_argument(_) => assert(true)\n| _ => assert(false)\n}\n```\n\n## Exceptions\n\n-Raises `Invalid_argument` if `value` is `null`\n"},
92+
"documentation": {"kind": "markdown", "value": "\n`getOrThrow(value)`throws an exception if `null`, otherwise returns the value.\n\n```rescript\nNull.getOrThrow(Null.make(3)) == 3\n\nswitch Null.getOrThrow(%raw(\"'ReScript'\")) {\n| exception Invalid_argument(_) => assert(false)\n| value => value == \"ReScript\"\n}\n\nswitch Null.getOrThrow(%raw(\"null\")) {\n| exception Invalid_argument(_) => assert(true)\n| _ => assert(false)\n}\n```\n\n## Exceptions\n\n-Throws `Invalid_argument` if `value` is `null`\n"},
9393
"sortText": "getOrThrow",
9494
"insertText": "->Null.getOrThrow",
9595
"additionalTextEdits": [{
@@ -225,7 +225,7 @@ Path
225225
"kind": 12,
226226
"tags": [],
227227
"detail": "t<'a> => 'a",
228-
"documentation": {"kind": "markdown", "value": "\n`getUnsafe(value)` returns `value`.\n\n## Examples\n\n```rescript\nNullable.getUnsafe(Nullable.make(3)) == 3\nNullable.getUnsafe(Nullable.null) //Raises an error\n```\n\n## Important\n\n- This is an unsafe operation, it assumes `value` is not `null` or `undefined`.\n"},
228+
"documentation": {"kind": "markdown", "value": "\n`getUnsafe(value)` returns `value`.\n\n## Examples\n\n```rescript\nNullable.getUnsafe(Nullable.make(3)) == 3\nNullable.getUnsafe(Nullable.null) //Throws an error\n```\n\n## Important\n\n- This is an unsafe operation, it assumes `value` is not `null` or `undefined`.\n"},
229229
"sortText": "getUnsafe",
230230
"insertText": "->Nullable.getUnsafe",
231231
"additionalTextEdits": [{
@@ -249,7 +249,7 @@ Path
249249
"kind": 12,
250250
"tags": [1],
251251
"detail": "t<'a> => 'a",
252-
"documentation": {"kind": "markdown", "value": "Deprecated: Use `getOrThrow` instead\n\n\n`getExn(value)`raises an exception if `null` or `undefined`, otherwise returns the value.\n\n```rescript\nswitch Nullable.getExn(%raw(\"'Hello'\")) {\n| exception Invalid_argument(_) => assert(false)\n| value => value == \"Hello\"\n}\n\nswitch Nullable.getExn(%raw(\"null\")) {\n| exception Invalid_argument(_) => assert(true)\n| _ => assert(false)\n}\n\nswitch Nullable.getExn(%raw(\"undefined\")) {\n| exception Invalid_argument(_) => assert(true)\n| _ => assert(false)\n}\n```\n\n## Exceptions\n\n-Raises `Invalid_argument` if `value` is `null` or `undefined`\n"},
252+
"documentation": {"kind": "markdown", "value": "Deprecated: Use `getOrThrow` instead\n\n\n`getExn(value)`throws an exception if `null` or `undefined`, otherwise returns the value.\n\n```rescript\nswitch Nullable.getExn(%raw(\"'Hello'\")) {\n| exception Invalid_argument(_) => assert(false)\n| value => value == \"Hello\"\n}\n\nswitch Nullable.getExn(%raw(\"null\")) {\n| exception Invalid_argument(_) => assert(true)\n| _ => assert(false)\n}\n\nswitch Nullable.getExn(%raw(\"undefined\")) {\n| exception Invalid_argument(_) => assert(true)\n| _ => assert(false)\n}\n```\n\n## Exceptions\n\n-Throws `Invalid_argument` if `value` is `null` or `undefined`\n"},
253253
"sortText": "getExn",
254254
"insertText": "->Nullable.getExn",
255255
"additionalTextEdits": [{
@@ -285,7 +285,7 @@ Path
285285
"kind": 12,
286286
"tags": [],
287287
"detail": "t<'a> => 'a",
288-
"documentation": {"kind": "markdown", "value": "\n`getOrThrow(value)`raises an exception if `null` or `undefined`, otherwise returns the value.\n\n```rescript\nswitch Nullable.getOrThrow(%raw(\"'Hello'\")) {\n| exception Invalid_argument(_) => assert(false)\n| value => value == \"Hello\"\n}\n\nswitch Nullable.getOrThrow(%raw(\"null\")) {\n| exception Invalid_argument(_) => assert(true)\n| _ => assert(false)\n}\n\nswitch Nullable.getOrThrow(%raw(\"undefined\")) {\n| exception Invalid_argument(_) => assert(true)\n| _ => assert(false)\n}\n```\n\n## Exceptions\n\n-Raises `Invalid_argument` if `value` is `null` or `undefined`\n"},
288+
"documentation": {"kind": "markdown", "value": "\n`getOrThrow(value)`throws an exception if `null` or `undefined`, otherwise returns the value.\n\n```rescript\nswitch Nullable.getOrThrow(%raw(\"'Hello'\")) {\n| exception Invalid_argument(_) => assert(false)\n| value => value == \"Hello\"\n}\n\nswitch Nullable.getOrThrow(%raw(\"null\")) {\n| exception Invalid_argument(_) => assert(true)\n| _ => assert(false)\n}\n\nswitch Nullable.getOrThrow(%raw(\"undefined\")) {\n| exception Invalid_argument(_) => assert(true)\n| _ => assert(false)\n}\n```\n\n## Exceptions\n\n-Throws `Invalid_argument` if `value` is `null` or `undefined`\n"},
289289
"sortText": "getOrThrow",
290290
"insertText": "->Nullable.getOrThrow",
291291
"additionalTextEdits": [{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp