From 514755f2b5e3942227f5d0ea176c03b19a9e0d17 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sat, 23 May 2026 00:54:16 -0300 Subject: [PATCH 01/24] Use Yojson and lsp types for analysis JSON output Replace the vendored JSON helpers with Yojson and the OCaml lsp types across analysis, reanalyze, and tools JSON handling. This updates LSP response construction for completions, hovers, diagnostics, code actions, symbols, signature help, and related CLI commands, refreshes analysis snapshots, and adjusts extract-codeblocks decoding for the new serialized output. --- analysis.opam | 1 + analysis/bin/main.ml | 18 +- analysis/reanalyze/src/Log_.ml | 4 +- analysis/reanalyze/src/Paths.ml | 80 +- analysis/reanalyze/src/dune | 2 +- analysis/src/Cli.ml | 221 +- analysis/src/CodeActions.ml | 32 +- analysis/src/Commands.ml | 93 +- analysis/src/CompletionBackEnd.ml | 38 +- analysis/src/Diagnostics.ml | 22 +- analysis/src/DocumentSymbol.ml | 45 +- analysis/src/FindFiles.ml | 79 +- analysis/src/Hint.ml | 46 +- analysis/src/Loc.ml | 7 +- analysis/src/Markdown.ml | 2 +- analysis/src/Packages.ml | 35 +- analysis/src/Protocol.ml | 6 +- analysis/src/SemanticTokens.ml | 2 +- analysis/src/SharedTypes.ml | 26 +- analysis/src/SignatureHelp.ml | 202 +- analysis/src/TypeUtils.ml | 22 +- analysis/src/Utils.ml | 11 +- analysis/src/Xform.ml | 78 +- analysis/src/YojsonHelpers.ml | 9 + analysis/src/dune | 2 +- analysis/vendor/.ocamlformat | 1 - analysis/vendor/dune | 1 - analysis/vendor/json/Json.ml | 536 - analysis/vendor/json/dune | 5 - dune-project | 4 +- .../RescriptTools_ExtractCodeBlocks.res | 15 +- .../es6/RescriptTools_ExtractCodeBlocks.mjs | 51 +- .../js/RescriptTools_ExtractCodeBlocks.cjs | 49 +- .../not_compiled/expected/Diagnostics.res.txt | 43 +- .../not_compiled/expected/DocTemplate.res.txt | 49 +- .../expected/DocTemplate.resi.txt | 29 +- .../expected/SemanticTokens.res.txt | 4 +- .../expected/SemanticTokensArray.res.txt | 4 +- .../SemanticTokensArrayAccess.res.txt | 8 +- .../SemanticTokensArrayMutation.res.txt | 4 +- .../expected/SemanticTokensDict.res.txt | 4 +- .../tests/src/expected/ArrayUtils.res.txt | 1 + .../tests/src/expected/Auto.res.txt | 8 +- .../src/expected/BrokenParserCases.res.txt | 1 + .../tests/src/expected/CodeLens.res.txt | 40 +- .../tests/src/expected/Codemod.res.txt | 1 + .../src/expected/CompletableComponent.res.txt | 1 + .../src/expected/CompletePrioritize1.res.txt | 17 +- .../src/expected/CompletePrioritize2.res.txt | 36 +- .../tests/src/expected/Completion.res.txt | 4154 ++-- .../src/expected/CompletionAttributes.res.txt | 396 +- .../CompletionConfiguredBuiltins.res.txt | 33 +- .../src/expected/CompletionDicts.res.txt | 64 +- .../expected/CompletionExpressions.res.txt | 1991 +- .../src/expected/CompletionFromModule.res.txt | 243 +- .../expected/CompletionFromModule2.res.txt | 227 +- .../CompletionFunctionArguments.res.txt | 619 +- .../expected/CompletionInferValues.res.txt | 1028 +- .../tests/src/expected/CompletionJsx.res.txt | 1647 +- .../src/expected/CompletionJsxProps.res.txt | 602 +- ...mpletionMultipleEditorCompleteFrom.res.txt | 58 +- .../expected/CompletionNullNullable.res.txt | 875 +- .../src/expected/CompletionObjects.res.txt | 54 +- .../src/expected/CompletionPattern.res.txt | 1620 +- .../src/expected/CompletionPipeChain.res.txt | 690 +- .../expected/CompletionPipeProperty.res.txt | 88 +- .../expected/CompletionPipeSubmodules.res.txt | 65 +- .../src/expected/CompletionRegexp.res.txt | 174 +- .../src/expected/CompletionResolve.res.txt | 1 + .../src/expected/CompletionSupport.res.txt | 1 + .../src/expected/CompletionSupport2.res.txt | 1 + .../expected/CompletionTaggedTemplate.res.txt | 167 +- .../expected/CompletionTypeAnnotation.res.txt | 555 +- .../src/expected/CompletionTypeT.res.txt | 173 +- .../expected/CompletionTypedArrays.res.txt | 17920 +++++++++++----- .../tests/src/expected/Component.res.txt | 1 + .../tests/src/expected/Component.resi.txt | 1 + .../src/expected/CreateInterface.res.txt | 1 + .../tests/src/expected/Cross.res.txt | 249 +- .../tests/src/expected/Dce.res.txt | 1 + .../tests/src/expected/Debug.res.txt | 42 +- .../tests/src/expected/Definition.res.txt | 46 +- .../expected/DefinitionWithInterface.res.txt | 17 +- .../expected/DefinitionWithInterface.resi.txt | 17 +- .../tests/src/expected/Destructuring.res.txt | 138 +- .../tests/src/expected/Div.res.txt | 19 +- .../tests/src/expected/DocComments.res.txt | 36 +- .../tests/src/expected/DocumentSymbol.res.txt | 106 +- .../DotPipeCompleteFromCurrentModule.res.txt | 32 +- .../expected/DotPipeCompletionSpec.res.txt | 1220 +- .../tests/src/expected/EnvCompletion.res.txt | 490 +- .../expected/EnvCompletionOtherFile.res.txt | 1 + .../src/expected/ExhaustiveSwitch.res.txt | 170 +- .../tests/src/expected/Fastify.res.txt | 1 + .../tests/src/expected/FastifyExt.res.txt | 1 + .../tests/src/expected/Firebase.res.txt | 62 +- .../src/expected/FirstClassModules.res.txt | 416 +- .../tests/src/expected/Fragment.res.txt | 15 +- .../tests/src/expected/Highlight.res.txt | 1 + .../tests/src/expected/Hover.res.txt | 343 +- .../expected/IncludeModuleCompletion.res.txt | 357 +- .../tests/src/expected/InlayHint.res.txt | 121 +- .../tests/src/expected/Jsx2.res.txt | 535 +- .../tests/src/expected/Jsx2.resi.txt | 48 +- .../tests/src/expected/JsxV4.res.txt | 32 +- .../tests/src/expected/LongIdentTest.res.txt | 3 +- .../tests/src/expected/ModuleStuff.res.txt | 1 + .../tests/src/expected/NestedRecords.res.txt | 24 +- .../src/expected/NestedRecordsHover.res.txt | 36 +- .../tests/src/expected/Objects.res.txt | 1 + .../tests/src/expected/Patterns.res.txt | 33 +- .../tests/src/expected/PolyRec.res.txt | 8 +- .../tests/src/expected/PrepareRename.res.txt | 13 +- .../tests/src/expected/QueryFile.res.txt | 1 + .../tests/src/expected/RecModules.res.txt | 15 +- .../src/expected/RecordCompletion.res.txt | 105 +- .../tests/src/expected/RecoveryOnProp.res.txt | 87 +- .../tests/src/expected/References.res.txt | 121 +- .../expected/ReferencesWithInterface.res.txt | 41 +- .../expected/ReferencesWithInterface.resi.txt | 41 +- .../tests/src/expected/Rename.res.txt | 71 +- .../src/expected/RenameWithInterface.res.txt | 71 +- .../src/expected/RenameWithInterface.resi.txt | 71 +- .../tests/src/expected/Reprod.res.txt | 344 +- .../tests/src/expected/Rxjs.res.txt | 1 + .../tests/src/expected/RxjsCompletion.res.txt | 271 +- .../tests/src/expected/SchemaAssets.res.txt | 1 + .../tests/src/expected/ShadowedBelt.res.txt | 1 + .../tests/src/expected/SignatureHelp.res.txt | 1016 +- .../tests/src/expected/Support.res.txt | 1 + .../tests/src/expected/TableclothMap.res.txt | 1 + .../tests/src/expected/TableclothMap.resi.txt | 1 + .../tests/src/expected/TypeArgCtx.res.txt | 24 +- .../src/expected/TypeAtPosCompletion.res.txt | 90 +- .../tests/src/expected/TypeDefinition.res.txt | 49 +- .../tests/src/expected/Xform.res.txt | 103 +- .../tests/src/expected/typeConstraint.res.txt | 1 + tests/docstring_tests/DocTest.res.js | 3 +- tests/ounit_tests/ounit_json_tests.ml | 8 +- tools/bin/main.ml | 15 +- tools/src/tools.ml | 315 +- 141 files changed, 28705 insertions(+), 14243 deletions(-) create mode 100644 analysis/src/YojsonHelpers.ml delete mode 100644 analysis/vendor/.ocamlformat delete mode 100644 analysis/vendor/dune delete mode 100644 analysis/vendor/json/Json.ml delete mode 100644 analysis/vendor/json/dune diff --git a/analysis.opam b/analysis.opam index 8350d0a8a98..fe31c79fa42 100644 --- a/analysis.opam +++ b/analysis.opam @@ -11,6 +11,7 @@ depends: [ "ocaml" {>= "5.0.0"} "cppo" {= "1.8.0"} "odoc" {with-doc} + "lsp" {= "1.22.0"} ] build: [ ["dune" "subst"] {dev} diff --git a/analysis/bin/main.ml b/analysis/bin/main.ml index 0afe23855ab..98b66acc7fa 100644 --- a/analysis/bin/main.ml +++ b/analysis/bin/main.ml @@ -180,13 +180,12 @@ let main () = | _ -> raise (Failure "unsupported type") in let source = Files.readFile path |> Option.value ~default:"" in - let res = - Codemod.transform ~source - ~pos:(int_of_string line, int_of_string col) - ~debug ~typ ~hint - |> Json.escape - in - Printf.printf "\"%s\"" res + `String + (Codemod.transform ~source + ~pos:(int_of_string line, int_of_string col) + ~debug ~typ ~hint) + |> Yojson.Safe.pretty_to_string ~std:true + |> print_endline | [_; "diagnosticSyntax"; path] -> Cli.diagnosticSyntax ~path | [_; "references"; path; line; col] -> Cli.references ~path ~pos:(int_of_string line, int_of_string col) ~debug @@ -198,8 +197,9 @@ let main () = ~newName ~debug | [_; "semanticTokens"; currentFile] -> Cli.semanticTokens ~path:currentFile | [_; "createInterface"; path; cmiFile] -> - Printf.printf "\"%s\"" - (Json.escape (CreateInterface.command ~path ~cmiFile)) + `String (CreateInterface.command ~path ~cmiFile) + |> Yojson.Safe.pretty_to_string ~std:true + |> print_endline | [_; "format"; path] -> Cli.format ~path | [_; "test"; path] -> Cli.test ~path | [_; "cmt"; rescript_json; cmt_path] -> CmtViewer.dump rescript_json cmt_path diff --git a/analysis/reanalyze/src/Log_.ml b/analysis/reanalyze/src/Log_.ml index 5a03ae55515..19e03cf8aef 100644 --- a/analysis/reanalyze/src/Log_.ml +++ b/analysis/reanalyze/src/Log_.ml @@ -164,12 +164,12 @@ let logIssue ~config ~(issue : Issue.t) = let open Format in let loc = issue.loc in if config.DceConfig.cli.json then - let file = Json.escape loc.loc_start.pos_fname in + let file = loc.loc_start.pos_fname in let startLine = loc.loc_start.pos_lnum - 1 in let startCharacter = loc.loc_start.pos_cnum - loc.loc_start.pos_bol in let endLine = loc.loc_end.pos_lnum - 1 in let endCharacter = loc.loc_end.pos_cnum - loc.loc_start.pos_bol in - let message = Json.escape (descriptionToMessage issue.description) in + let message = descriptionToMessage issue.description in Format.asprintf "%a%s%s" (fun ppf () -> EmitJson.emitItem ~ppf ~name:issue.name diff --git a/analysis/reanalyze/src/Paths.ml b/analysis/reanalyze/src/Paths.ml index 8e0f51ef7a4..e8a83d8793b 100644 --- a/analysis/reanalyze/src/Paths.ml +++ b/analysis/reanalyze/src/Paths.ml @@ -1,5 +1,10 @@ let rescriptJson = "rescript.json" +let get key (t : Yojson.Safe.t) : Yojson.Safe.t option = + match t with + | `Assoc items -> List.assoc_opt key items + | _ -> None + let readFile filename = try (* windows can't use open_in *) @@ -32,51 +37,51 @@ let setProjectRootFromCwd () = let setReScriptProjectRoot = lazy (setProjectRootFromCwd ()) module Config = struct - let readSuppress conf = - match Json.get "suppress" conf with - | Some (Array elements) -> + let readSuppress (conf : Yojson.Safe.t) = + match conf |> get "suppress" with + | Some (`List elements) -> let names = elements - |> List.filter_map (fun (x : Json.t) -> + |> List.filter_map (fun (x : Yojson.Safe.t) -> match x with - | String s -> Some s + | `String s -> Some s | _ -> None) in runConfig.suppress <- names @ runConfig.suppress | _ -> () - let readUnsuppress conf = - match Json.get "unsuppress" conf with - | Some (Array elements) -> + let readUnsuppress (conf : Yojson.Safe.t) = + match conf |> get "unsuppress" with + | Some (`List elements) -> let names = elements - |> List.filter_map (fun (x : Json.t) -> + |> List.filter_map (fun (x : Yojson.Safe.t) -> match x with - | String s -> Some s + | `String s -> Some s | _ -> None) in runConfig.unsuppress <- names @ runConfig.unsuppress | _ -> () let readAnalysis conf = - match Json.get "analysis" conf with - | Some (Array elements) -> + match conf |> get "analysis" with + | Some (`List elements) -> elements - |> List.iter (fun (x : Json.t) -> + |> List.iter (fun (x : Yojson.Safe.t) -> match x with - | String "all" -> RunConfig.all () - | String "dce" -> RunConfig.dce () - | String "exception" -> RunConfig.exception_ () - | String "termination" -> RunConfig.termination () + | `String "all" -> RunConfig.all () + | `String "dce" -> RunConfig.dce () + | `String "exception" -> RunConfig.exception_ () + | `String "termination" -> RunConfig.termination () | _ -> ()) | _ -> (* if no "analysis" specified, default to dce *) RunConfig.dce () let readTransitive conf = - match Json.get "transitive" conf with - | Some True -> RunConfig.transitive true - | Some False -> RunConfig.transitive false + match conf |> get "transitive" with + | Some (`Bool true) -> RunConfig.transitive true + | Some (`Bool false) -> RunConfig.transitive false | _ -> () (* Read the config from rescript.json and apply it to runConfig and suppress and unsuppress *) @@ -85,10 +90,9 @@ module Config = struct let rescriptFile = Filename.concat runConfig.projectRoot rescriptJson in let processText text = - match Json.parse text with - | None -> () + match try Some (Yojson.Safe.from_string text) with _ -> None with | Some json -> ( - match Json.get "reanalyze" json with + match get "reanalyze" json with | Some conf -> readSuppress conf; readUnsuppress conf; @@ -97,6 +101,7 @@ module Config = struct | None -> (* if no "analysis" specified, default to dce *) RunConfig.dce ()) + | _ -> () in match readFile rescriptFile with @@ -145,18 +150,27 @@ let readCmtScan () = ["lib"; "bs"; ".sourcedirs.json"] |> List.fold_left Filename.concat runConfig.bsbProjectRoot in - let get key fn json = - Json.get key json |> Option.to_list |> List.filter_map fn + let get_fn key fn json = + get key json |> Option.to_list |> List.filter_map fn in - let read_entry (json : Json.t) = - let build_root = json |> get "build_root" Json.string in + let read_entry (json : Yojson.Safe.t) = + let build_root = + json |> get_fn "build_root" Yojson.Safe.Util.to_string_option + in let scan_dirs = - match json |> get "scan_dirs" Json.array with - | [arr] -> arr |> List.filter_map Json.string + match + json + |> get_fn "scan_dirs" (function + | `List f -> Some f + | _ -> None) + with + | [arr] -> arr |> List.filter_map Yojson.Safe.Util.to_string_option | _ -> [] in let also_scan_build_root = - match json |> get "also_scan_build_root" Json.bool with + match + json |> get_fn "also_scan_build_root" Yojson.Safe.Util.to_bool_option + with | [b] -> b | _ -> false in @@ -167,9 +181,9 @@ let readCmtScan () = match readFile sourceDirsFile with | None -> [] | Some text -> ( - match Json.parse text with + match try Some (Yojson.Safe.from_string text) with _ -> None with | None -> [] | Some json -> ( - match json |> get "cmt_scan" Json.array with - | [arr] -> arr |> List.filter_map read_entry + match get "cmt_scan" json with + | Some (`List arr) -> arr |> List.filter_map read_entry | _ -> [])) diff --git a/analysis/reanalyze/src/dune b/analysis/reanalyze/src/dune index 3106987397f..7573766dfb3 100644 --- a/analysis/reanalyze/src/dune +++ b/analysis/reanalyze/src/dune @@ -2,4 +2,4 @@ (name reanalyze) (flags (-w "+6+26+27+32+33+39")) - (libraries reactive jsonlib ml str unix)) + (libraries reactive yojson ml str unix)) diff --git a/analysis/src/Cli.ml b/analysis/src/Cli.ml index bd8ced94a14..2cc0bd6cb1b 100644 --- a/analysis/src/Cli.ml +++ b/analysis/src/Cli.ml @@ -1,164 +1,154 @@ +let print_null = + `Null |> Yojson.Safe.pretty_to_string ~std:true |> print_endline +let print_list l = + `List l |> Yojson.Safe.pretty_to_string ~std:true |> print_endline +let print_string json = + Yojson.Safe.pretty_to_string ~std:true json |> print_endline + let completion ~debug ~path ~pos ~currentFile = let full = Cmt.loadFullCmtFromPath ~path in let kindFile = Files.classifySourceFile currentFile in match Files.readFile currentFile with - | None | Some "" -> Protocol.null |> print_endline + | None | Some "" -> print_null | Some source -> Commands.completion ~debug ~source ~kindFile ~pos ~full - |> List.map Protocol.stringifyCompletionItem - |> Protocol.array |> print_endline + |> List.map (fun c -> Lsp.Types.CompletionItem.yojson_of_t c) + |> print_list let completionResolve ~path ~modulePath = let full = Cmt.loadFullCmtFromPath ~path in - let result = - match Commands.completionResolve ~full ~modulePath with - | None -> Protocol.null - | Some content -> Protocol.wrapInQuotes content - in - print_endline result + match Commands.completionResolve ~full ~modulePath with + | None -> print_null + | Some (`MarkupContent {value}) -> `String value |> print_string let inlayhint ~path ~pos ~maxLength ~debug = let full = Cmt.loadFullCmtFromPath ~path in let kindFile = Files.classifySourceFile path in match Files.readFile path with - | None -> Protocol.null |> print_endline + | None -> print_null | Some source -> ( match Hint.inlay ~source ~kindFile ~pos ~maxLength ~full ~debug with | Some hints -> hints - |> List.map Protocol.stringifyHint - |> Protocol.array |> print_endline - | None -> Protocol.null |> print_endline) + |> List.map (fun h -> Lsp.Types.InlayHint.yojson_of_t h) + |> print_list + | None -> print_null) let codeLens ~path ~debug = let full = Cmt.loadFullCmtFromPath ~path in let kindFile = Files.classifySourceFile path in match Files.readFile path with - | None -> Protocol.null |> print_endline + | None -> print_null | Some source -> ( match Hint.codeLens ~source ~kindFile ~full ~debug with | Some lens -> - lens - |> List.map Protocol.stringifyCodeLens - |> Protocol.array |> print_endline - | None -> Protocol.null |> print_endline) + lens |> List.map (fun l -> Lsp.Types.CodeLens.yojson_of_t l) |> print_list + | None -> print_null) let hover ~path ~pos ~currentFile ~debug ~supportsMarkdownLinks = let full = Cmt.loadFullCmtFromPath ~path in let kindFile = Files.classifySourceFile currentFile in match Files.readFile currentFile with - | None -> Protocol.null |> print_endline - | Some source -> - let result = - match - Commands.hover ~source ~kindFile ~pos ~debug ~supportsMarkdownLinks - ~full - with - | Some value -> Protocol.stringifyHover value - | None -> Protocol.null - in - print_endline result + | None -> print_null + | Some source -> ( + match + Commands.hover ~source ~kindFile ~pos ~debug ~supportsMarkdownLinks ~full + with + | Some value -> Lsp.Types.Hover.yojson_of_t value |> print_string + | None -> print_null) let signatureHelp ~path ~pos ~currentFile ~debug ~allowForConstructorPayloads = let full = Cmt.loadFullCmtFromPath ~path in let kindFile = Files.classifySourceFile currentFile in match Files.readFile currentFile with - | None -> Protocol.null |> print_endline - | Some source -> - Commands.signatureHelp ~source ~kindFile ~pos ~allowForConstructorPayloads - ~full ~debug - |> Protocol.stringifySignatureHelp |> print_endline + | None -> print_null + | Some source -> ( + match + SignatureHelp.signatureHelp ~source ~kindFile ~pos + ~allowForConstructorPayloads ~full ~debug + with + | None -> print_null + | Some s -> Lsp.Types.SignatureHelp.yojson_of_t s |> print_string) let codeAction ~path ~startPos ~endPos ~currentFile ~debug = let kindFile = Files.classifySourceFile currentFile in match Files.readFile currentFile with - | None -> Protocol.null |> print_endline + | None -> print_null | Some source -> Xform.extractCodeActions ~path ~startPos ~endPos ~source ~kindFile ~debug - |> CodeActions.stringifyCodeActions |> print_endline + |> List.map (fun c -> Lsp.Types.CodeAction.yojson_of_t c) + |> print_list let definition ~path ~pos ~debug = let full = Cmt.loadFullCmtFromPath ~path in - print_endline - (match Commands.definition ~full ~pos ~debug with - | None -> Protocol.null - | Some location -> location |> Protocol.stringifyLocation) + + match Commands.definition ~full ~pos ~debug with + | None -> print_null + | Some location -> location |> Lsp.Types.Location.yojson_of_t |> print_string let typeDefinition ~path ~pos ~debug = let full = Cmt.loadFullCmtFromPath ~path in - print_endline - (match Commands.typeDefinition ~full ~pos ~debug with - | None -> Protocol.null - | Some location -> location |> Protocol.stringifyLocation) + match Commands.typeDefinition ~full ~pos ~debug with + | None -> print_null + | Some location -> location |> Lsp.Types.Location.yojson_of_t |> print_string let references ~path ~pos ~debug = let full = Cmt.loadFullCmtFromPath ~path in let allLocs = Commands.references ~full ~pos ~debug in - print_endline - (if allLocs = [] then Protocol.null - else - "[\n" - ^ (allLocs |> List.map Protocol.stringifyLocation |> String.concat ",\n") - ^ "\n]") + if allLocs = [] then print_null + else + allLocs + |> List.map (fun l -> Lsp.Types.Location.yojson_of_t l) + |> print_list let rename ~path ~pos ~newName ~debug = let full = Cmt.loadFullCmtFromPath ~path in - let result = - match Commands.rename ~full ~pos ~newName ~debug with - | None -> Protocol.null - | Some (fileRenames, textDocumentEdits) -> - let fileRenamesString = - fileRenames |> List.map Protocol.stringifyRenameFile - in - let textDocumentEditsString = - textDocumentEdits |> List.map Protocol.stringifyTextDocumentEdit - in - "[\n" - ^ (fileRenamesString @ textDocumentEditsString |> String.concat ",\n") - ^ "\n]" - in - print_endline result + match Commands.rename ~full ~pos ~newName ~debug with + | Some {documentChanges = Some documentChanges} -> + documentChanges + |> List.map (fun c -> + match c with + | `RenameFile r -> Lsp.Types.RenameFile.yojson_of_t r + | `TextDocumentEdit te -> Lsp.Types.TextDocumentEdit.yojson_of_t te + | `DeleteFile df -> Lsp.Types.DeleteFile.yojson_of_t df + | `CreateFile cf -> Lsp.Types.CreateFile.yojson_of_t cf) + |> print_list + | _ -> print_null let prepareRename ~path ~pos ~debug = let full = Cmt.loadFullCmtFromPath ~path in - let result = - match Commands.prepareRename ~full ~pos ~debug with - | None -> Protocol.null - | Some (Range range) -> Protocol.stringifyRange range - | Some (Placeholder rangeph) -> - Protocol.stringifyRangeWithPlaceholder rangeph - in - print_endline result + match Commands.prepareRename ~full ~pos ~debug with + | None -> print_null + | Some range -> Lsp.Types.Range.yojson_of_t range |> print_string let format ~path = match Files.readFile path with - | None -> Protocol.null |> print_endline + | None -> print_null | Some source -> ( let kindFile = Files.classifySourceFile path in match Commands.format ~source ~kindFile with | Ok textEdits -> ( match textEdits with - | {newText} :: _ -> Printf.printf "\"%s\"" (Json.escape newText) - | _ -> Protocol.null |> print_endline) - | Error _ -> Protocol.null |> print_endline) + | {newText} :: _ -> print_string (`String newText) + | _ -> print_null) + | Error _ -> print_null) let diagnosticSyntax ~path = match Files.readFile path with - | None -> Protocol.array [""] |> print_endline + | None -> print_list [] | Some source -> let kindFile = Files.classifySourceFile path in Diagnostics.document_syntax ~source ~kindFile - |> List.map Protocol.stringifyDiagnostic - |> Protocol.array |> print_endline + |> List.map Lsp.Types.Diagnostic.yojson_of_t + |> print_list let semanticTokens ~path = match Files.readFile path with - | None -> Protocol.null |> print_endline + | None -> print_null | Some source -> let kindFile = Files.classifySourceFile path in let tokens = SemanticTokens.semanticTokens ~source ~kindFile in - let data = SemanticTokens.Token.arrayToJsonString tokens.data in - Printf.printf "{\"data\":%s}" data + Lsp.Types.SemanticTokens.yojson_of_t tokens |> print_string let test ~path = Uri.stripPath := true; @@ -327,26 +317,55 @@ let test ~path = in Sys.remove currentFile; codeActions - |> List.iter (fun {Protocol.title; edit = {documentChanges}} -> + |> List.iter (fun {Lsp.Types.CodeAction.title; edit} -> Printf.printf "Hit: %s\n" title; - documentChanges - |> List.iter (fun dc -> - match dc with - | Protocol.TextDocumentEdit tde -> - Printf.printf "\nTextDocumentEdit: %s\n" - tde.textDocument.uri; + match edit with + | Some {documentChanges} -> + documentChanges |> Option.get + |> List.iter + (fun + (dc : + [ `CreateFile of Lsp.Types.CreateFile.t + | `DeleteFile of Lsp.Types.DeleteFile.t + | `RenameFile of Lsp.Types.RenameFile.t + | `TextDocumentEdit of + Lsp.Types.TextDocumentEdit.t ]) + -> + match dc with + | `TextDocumentEdit tde -> + Printf.printf "\nTextDocumentEdit: %s\n" + (tde.textDocument.uri |> Lsp.Uri.to_string); - tde.edits - |> List.iter (fun {Protocol.range; newText} -> - let indent = - String.make range.start.character ' ' - in - Printf.printf - "%s\nnewText:\n%s<--here\n%s%s\n" - (Protocol.stringifyRange range) - indent indent newText) - | CreateFile cf -> - Printf.printf "\nCreateFile: %s\n" cf.uri)) + tde.edits + |> List.iter + (fun + (edit : + [ `AnnotatedTextEdit of + Lsp.Types.AnnotatedTextEdit.t + | `TextEdit of Lsp.Types.TextEdit.t ]) + -> + let start_char, newText, range = + match edit with + | `TextEdit te -> + ( te.range.start.character, + te.newText, + te.range ) + | `AnnotatedTextEdit te -> + ( te.range.start.character, + te.newText, + te.range ) + in + let indent = String.make start_char ' ' in + Printf.printf + "%s\nnewText:\n%s<--here\n%s%s\n" + (Lsp.Types.Range.yojson_of_t range + |> Yojson.Safe.to_string) + indent indent newText) + | `CreateFile cf -> + Printf.printf "\nCreateFile: %s\n" + (cf.uri |> Lsp.Uri.to_string) + | _ -> assert false) + | None -> ()) | "c-a" -> let hint = String.sub rest 3 (String.length rest - 3) in print_endline diff --git a/analysis/src/CodeActions.ml b/analysis/src/CodeActions.ml index 013395b3abe..f068939cd93 100644 --- a/analysis/src/CodeActions.ml +++ b/analysis/src/CodeActions.ml @@ -1,13 +1,24 @@ (* This is the return that's expected when resolving code actions *) -type result = Protocol.codeAction list -let stringifyCodeActions codeActions = - Printf.sprintf {|%s|} - (codeActions |> List.map Protocol.stringifyCodeAction |> Protocol.array) - -let make ~title ~kind ~uri ~newText ~range = - let uri = uri |> Uri.fromPath |> Uri.toString in - { +let make ~title ~kind ~(uri : string) ~newText ~range = + (* let uri = uri |> Uri.fromPath |> Uri.toString in *) + let textDocument = + Lsp.Types.OptionalVersionedTextDocumentIdentifier.create + ~uri:(Lsp.Uri.of_string uri) () + in + let edit = + Lsp.Types.WorkspaceEdit.create + ~documentChanges: + [ + `TextDocumentEdit + (Lsp.Types.TextDocumentEdit.create + ~edits:[`TextEdit (Lsp.Types.TextEdit.create ~range ~newText)] + ~textDocument); + ] + () + in + Lsp.Types.CodeAction.create ~title ~kind ~edit () +(* { Protocol.title; codeActionKind = kind; edit = @@ -21,7 +32,8 @@ let make ~title ~kind ~uri ~newText ~range = }; ]; }; - } + } *) let makeWithDocumentChanges ~title ~kind ~documentChanges = - {Protocol.title; codeActionKind = kind; edit = {documentChanges}} + let edit = Lsp.Types.WorkspaceEdit.create ~documentChanges () in + Lsp.Types.CodeAction.create ~title ~kind ~edit () diff --git a/analysis/src/Commands.ml b/analysis/src/Commands.ml index 0ce67fad485..1ee630ee920 100644 --- a/analysis/src/Commands.ml +++ b/analysis/src/Commands.ml @@ -33,7 +33,13 @@ let completionResolve ~(full : SharedTypes.full option) ~modulePath = None | Some file -> Some (file.structure.docstring |> String.concat "\n\n")) in - docstring + match docstring with + | None -> None + | Some value -> + Some + (`MarkupContent + (Lsp.Types.MarkupContent.create ~kind:Lsp.Types.MarkupKind.Markdown + ~value)) let hover ~source ~kindFile ~pos ~supportsMarkdownLinks ~full ~debug = let result = @@ -72,17 +78,21 @@ let hover ~source ~kindFile ~pos ~supportsMarkdownLinks ~full ~debug = if skipZero then None else Hover.newHover ~supportsMarkdownLinks ~full locItem) in - result + match result with + | None -> None + | Some value -> + Some + (Lsp.Types.Hover.create + ~contents: + (`MarkupContent + (Lsp.Types.MarkupContent.create + ~kind:Lsp.Types.MarkupKind.Markdown ~value)) + ()) let signatureHelp ~source ~kindFile ~pos ~allowForConstructorPayloads ~full ~debug = - match - SignatureHelp.signatureHelp ~debug ~source ~kindFile ~pos - ~allowForConstructorPayloads ~full - with - | None -> - {Protocol.signatures = []; activeSignature = None; activeParameter = None} - | Some res -> res + SignatureHelp.signatureHelp ~debug ~source ~kindFile ~pos + ~allowForConstructorPayloads ~full let definition ~full ~pos ~debug = let locationOpt = @@ -112,10 +122,8 @@ let definition ~full ~pos ~debug = if skipLoc then None else Some - { - Protocol.uri = Files.canonicalizeUri uri; - range = Utils.cmtLocToRange loc; - } + (Lsp.Types.Location.create ~range:(Utils.cmtLocToRange loc) + ~uri:(Files.canonicalizeUri uri |> Lsp.Uri.of_string)) | Some _ -> None)) in locationOpt @@ -132,10 +140,8 @@ let typeDefinition ~full ~pos ~debug = | None -> None | Some (uri, loc) -> Some - { - Protocol.uri = Files.canonicalizeUri uri; - range = Utils.cmtLocToRange loc; - })) + (Lsp.Types.Location.create ~range:(Utils.cmtLocToRange loc) + ~uri:(Files.canonicalizeUri uri |> Lsp.Uri.of_string)))) in maybeLocation @@ -157,10 +163,8 @@ let references ~full ~pos ~debug = | None -> Uri.toTopLevelLoc uri2 in - { - Protocol.uri = Uri.toString uri2; - range = Utils.cmtLocToRange loc; - } + Lsp.Types.Location.create ~range:(Utils.cmtLocToRange loc) + ~uri:(Uri.toString uri2 |> Lsp.Uri.of_string) :: acc) []) in @@ -194,12 +198,11 @@ let rename ~full ~pos ~newName ~debug = let newPath = Filename.concat dir (newName ^ Filename.extension path) in - let newUri = Uri.fromPath newPath in - Protocol. - { - oldUri = uri |> Uri.toString; - newUri = newUri |> Uri.toString; - }) + `RenameFile + (Lsp.Types.RenameFile.create + ~newUri:(newPath |> Lsp.Uri.of_string) + ~oldUri:(uri |> Uri.toString |> Lsp.Uri.of_string) + ())) in let textDocumentEdits = let module StringMap = Misc.StringMap in @@ -209,8 +212,9 @@ let rename ~full ~pos ~newName ~debug = |> List.fold_left (fun acc (uri, loc) -> let textEdit = - Protocol. - {range = Utils.cmtLocToRange loc; newText = newName} + `TextEdit + (Lsp.Types.TextEdit.create ~newText:newName + ~range:(Utils.cmtLocToRange loc)) in match StringMap.find_opt uri acc with | None -> StringMap.add uri [textEdit] acc @@ -220,13 +224,19 @@ let rename ~full ~pos ~newName ~debug = in StringMap.fold (fun uri edits acc -> + let textDocument = + Lsp.Types.OptionalVersionedTextDocumentIdentifier.create + ~uri:(Lsp.Uri.of_string uri) () + in let textDocumentEdit = - Protocol.{textDocument = {uri; version = None}; edits} + `TextDocumentEdit + (Lsp.Types.TextDocumentEdit.create ~edits ~textDocument) in textDocumentEdit :: acc) textEditsByUri [] in - Some (fileRenames, textDocumentEdits)) + let documentChanges = fileRenames @ textDocumentEdits in + Some (Lsp.Types.WorkspaceEdit.create ~documentChanges ())) in result @@ -247,8 +257,10 @@ let prepareRename ~full ~pos ~debug = in Some (match placeholderOpt with - | None -> Protocol.Range range - | Some placeholder -> Protocol.Placeholder {range; placeholder})) + | None -> range + | Some _placeholder -> + (* NOTE: lsp dont have PrepareRename.create with placeholder *) + range)) let format ~source ~kindFile = let create_range text = @@ -259,15 +271,12 @@ let format ~source ~kindFile = | Some line -> String.length line | None -> 0 in - Protocol. - { - range = - { - start = {line = 0; character = 0}; - end_ = {line = lines_len - 1; character}; - }; - newText = text; - } + let range = + Lsp.Types.Range.create + ~start:(Lsp.Types.Position.create ~line:0 ~character:0) + ~end_:(Lsp.Types.Position.create ~line:(lines_len - 1) ~character) + in + Lsp.Types.TextEdit.create ~newText:text ~range in let result = diff --git a/analysis/src/CompletionBackEnd.ml b/analysis/src/CompletionBackEnd.ml index 4ea79d7755a..f8d17dc9b76 100644 --- a/analysis/src/CompletionBackEnd.ml +++ b/analysis/src/CompletionBackEnd.ml @@ -379,8 +379,9 @@ let kindToDetail name (kind : Completion.kind) = let kindToData filePath (kind : Completion.kind) = match kind with - | FileModule f -> Some [("modulePath", f); ("filePath", filePath)] - | _ -> None + | FileModule f -> + Some (`Assoc [("modulePath", `String f); ("filePath", `String filePath)]) + | _ -> Some `Null let findAllCompletions ~(env : QueryEnv.t) ~prefix ~exact ~namesUsed ~(completionContext : Completable.completionContext) = @@ -816,24 +817,17 @@ let mkItem ?data ?additionalTextEdits name ~kind ~detail ~deprecated ~docstring let tags = match deprecated with | None -> [] - | Some _ -> [1 (* deprecated *)] + | Some _ -> [Lsp.Types.CompletionItemTag.Deprecated (* deprecated *)] in - Protocol. - { - label = name; - kind; - tags; - detail; - documentation = - (if docContent = "" then None - else Some {kind = "markdown"; value = docContent}); - sortText = None; - insertText = None; - insertTextFormat = None; - filterText = None; - data; - additionalTextEdits; - } + + Lsp.Types.CompletionItem.create ~label:name ~kind ~tags ~detail + ~documentation: + (`MarkupContent + (Lsp.Types.MarkupContent.create ~kind:Lsp.Types.MarkupKind.Markdown + ~value:docContent)) + ~deprecated:(Option.is_some deprecated) + ?data ?additionalTextEdits ?sortText:None ?insertText:None + ?insertTextFormat:None ?filterText:None () let completionToItem { @@ -2129,12 +2123,12 @@ let rec processCompletable ~debug ~full ~scope ~env ~pos ~forHover completable = if debug then print_endline "Could not read package.json"; [] | Some s -> ( - match Json.parse s with - | Some (Object items) -> + match YojsonHelpers.from_string_opt s with + | Some (`Assoc items) -> items |> List.filter_map (fun (key, t) -> match (key, t) with - | ("dependencies" | "devDependencies"), Json.Object o -> + | ("dependencies" | "devDependencies"), `Assoc o -> Some (o |> List.filter_map (fun (pkgName, _) -> diff --git a/analysis/src/Diagnostics.ml b/analysis/src/Diagnostics.ml index 970936c022b..1dad9a9b6fa 100644 --- a/analysis/src/Diagnostics.ml +++ b/analysis/src/Diagnostics.ml @@ -8,16 +8,18 @@ let document_syntax ~source ~kindFile = let _, endline, endcol = Location.get_pos_info (Res_diagnostics.get_end_pos diagnostic) in - Protocol. - { - range = - { - start = {line = startline - 1; character = startcol}; - end_ = {line = endline - 1; character = endcol}; - }; - message = Res_diagnostics.explain diagnostic; - severity = 1; - }) + let range = + Lsp.Types.Range.create + ~start: + (Lsp.Types.Position.create ~line:(startline - 1) + ~character:startcol) + ~end_: + (Lsp.Types.Position.create ~line:(endline - 1) + ~character:endcol) + in + Lsp.Types.Diagnostic.create ~range + ~message:(`String (Res_diagnostics.explain diagnostic)) + ~severity:Lsp.Types.DiagnosticSeverity.Error ()) in if kindFile = Files.Res then let parseImplementation = diff --git a/analysis/src/DocumentSymbol.ml b/analysis/src/DocumentSymbol.ml index 0e5b982b5bf..c588fabad46 100644 --- a/analysis/src/DocumentSymbol.ml +++ b/analysis/src/DocumentSymbol.ml @@ -12,7 +12,7 @@ type kind = | EnumMember | TypeParameter -let kindNumber = function +(* let kindNumber = function | Module -> 2 | Property -> 7 | Constructor -> 9 @@ -22,7 +22,7 @@ let kindNumber = function | String -> 15 | Number -> 16 | EnumMember -> 22 - | TypeParameter -> 26 + | TypeParameter -> 26 *) let command ~path = let symbols = ref [] in @@ -33,19 +33,24 @@ let command ~path = && loc.loc_end.pos_cnum >= 0 then let range = Utils.cmtLocToRange loc in - let symbol : Protocol.documentSymbolItem = - {name; range; kind = kindNumber kind; children = []} + let symbol = + Lsp.Types.DocumentSymbol.create ~name ~range ~selectionRange:range + ~children:[] ~kind () in + (* let symbol : Protocol.documentSymbolItem = + {name; range; kind = kindNumber kind; children = []} + in *) symbols := symbol :: !symbols in let rec exprKind (exp : Parsetree.expression) = match exp.pexp_desc with - | Pexp_fun _ -> Function + | Pexp_fun _ -> Lsp.Types.SymbolKind.Function | Pexp_constraint (e, _) -> exprKind e - | Pexp_constant (Pconst_string _) -> String - | Pexp_constant (Pconst_float _ | Pconst_integer _) -> Number - | Pexp_constant _ -> Constant - | _ -> Variable + | Pexp_constant (Pconst_string _) -> Lsp.Types.SymbolKind.String + | Pexp_constant (Pconst_float _ | Pconst_integer _) -> + Lsp.Types.SymbolKind.Number + | Pexp_constant _ -> Lsp.Types.SymbolKind.Constant + | _ -> Lsp.Types.SymbolKind.Variable in let processTypeKind (tk : Parsetree.type_kind) = match tk with @@ -153,7 +158,7 @@ let command ~path = end_ = {line = el1; character = ec1}; }; } : - Protocol.documentSymbolItem) + Lsp.Types.DocumentSymbol.t) ({ range = { @@ -161,12 +166,12 @@ let command ~path = end_ = {line = el2; character = ec2}; }; } : - Protocol.documentSymbolItem) = + Lsp.Types.DocumentSymbol.t) = (sl1 > sl2 || (sl1 = sl2 && sc1 >= sc2)) && (el1 < el2 || (el1 = el2 && ec1 <= ec2)) in - let compareSymbol (s1 : Protocol.documentSymbolItem) - (s2 : Protocol.documentSymbolItem) = + let compareSymbol (s1 : Lsp.Types.DocumentSymbol.t) + (s2 : Lsp.Types.DocumentSymbol.t) = let n = compare s1.range.start.line s2.range.start.line in if n <> 0 then n else @@ -182,10 +187,17 @@ let command ~path = | [] -> [symbol] | last :: rest -> if isInside symbol last then - let newLast = + match last.children with + | Some c -> + let newLast = + {last with children = Some (c |> addSymbolToChildren ~symbol)} + in + newLast :: rest + | _ -> rest + (* let newLast = {last with children = last.children |> addSymbolToChildren ~symbol} in - newLast :: rest + newLast :: rest *) else symbol :: children in let rec addSortedSymbolsToChildren ~sortedSymbols children = @@ -198,4 +210,5 @@ let command ~path = in let sortedSymbols = !symbols |> List.sort compareSymbol in let symbolsWithChildren = [] |> addSortedSymbolsToChildren ~sortedSymbols in - print_endline (Protocol.stringifyDocumentSymbolItems symbolsWithChildren) + `List (symbolsWithChildren |> List.map Lsp.Types.DocumentSymbol.yojson_of_t) + |> Yojson.Safe.Util.to_string |> print_endline diff --git a/analysis/src/FindFiles.ml b/analysis/src/FindFiles.ml index 9b2fd500849..9f0b9c50798 100644 --- a/analysis/src/FindFiles.ml +++ b/analysis/src/FindFiles.ml @@ -4,35 +4,36 @@ let bind f x = Option.bind x f (* Returns a list of paths, relative to the provided `base` *) let getSourceDirectories ~includeDev ~baseDir config = - let rec handleItem current item = + let rec handleItem current (item : Yojson.Safe.t) = match item with - | Json.Array contents -> - List.map (handleItem current) contents |> List.concat - | Json.String text -> [current /+ text] - | Json.Object _ -> ( + | `List contents -> List.map (handleItem current) contents |> List.concat + | `String text -> [current /+ text] + | `Assoc _ -> ( let dir = - item |> Json.get "dir" |> bind Json.string + item |> YojsonHelpers.get "dir" + |> bind Yojson.Safe.Util.to_string_option |> Option.value ~default:"Must specify directory" in let typ = if includeDev then "lib" else - item |> Json.get "type" |> bind Json.string + item |> YojsonHelpers.get "type" + |> bind Yojson.Safe.Util.to_string_option |> Option.value ~default:"lib" in if typ = "dev" then [] else - match item |> Json.get "subdirs" with - | None | Some Json.False -> [current /+ dir] - | Some Json.True -> + match item |> YojsonHelpers.get "subdirs" with + | None | Some (`Bool false) -> [current /+ dir] + | Some (`Bool true) -> Files.collectDirs (baseDir /+ current /+ dir) |> List.filter (fun name -> name <> Filename.current_dir_name) |> List.map (Files.relpath baseDir) | Some item -> (current /+ dir) :: handleItem (current /+ dir) item) | _ -> failwith "Invalid subdirs entry" in - match config |> Json.get "sources" with + match config |> YojsonHelpers.get "sources" with | None -> [] | Some item -> handleItem "" item @@ -94,28 +95,36 @@ let nameSpaceToName n = |> String.concat "" let getNamespace config = - let ns = config |> Json.get "namespace" in - let fromString = ns |> bind Json.string in + let ns = config |> YojsonHelpers.get "namespace" in + let fromString = ns |> bind Yojson.Safe.Util.to_string_option in let isNamespaced = - ns |> bind Json.bool |> Option.value ~default:(fromString |> Option.is_some) + ns + |> bind Yojson.Safe.Util.to_bool_option + |> Option.value ~default:(fromString |> Option.is_some) in let either x y = if x = None then y else x in if isNamespaced then - let fromName = config |> Json.get "name" |> bind Json.string in + let fromName = + config |> YojsonHelpers.get "name" + |> bind Yojson.Safe.Util.to_string_option + in either fromString fromName |> Option.map nameSpaceToName else None module StringSet = Set.Make (String) let getPublic config = - let public = config |> Json.get "public" in + let public = config |> YojsonHelpers.get "public" in match public with | None -> None | Some public -> ( - match public |> Json.array with + match public |> YojsonHelpers.to_list_opt with | None -> None | Some public -> - Some (public |> List.filter_map Json.string |> StringSet.of_list)) + Some + (public + |> List.filter_map Yojson.Safe.Util.to_string_option + |> StringSet.of_list)) let collectFiles directory = let allFiles = Files.readDirectory directory in @@ -141,7 +150,7 @@ let collectFiles directory = let readSourcedirsPackageRoots base = let sourceDirsFile = base /+ "lib" /+ "bs" /+ ".sourcedirs.json" in let readPackageEntry = function - | Json.Array [Json.String name; Json.String path] -> + | `List [`String name; `String path] -> let path = if Filename.is_relative path then base /+ path else path in Some (name, path) | _ -> None @@ -149,10 +158,12 @@ let readSourcedirsPackageRoots base = match Files.readFile sourceDirsFile with | None -> [] | Some text -> ( - match Json.parse text with + match YojsonHelpers.from_string_opt text with | None -> [] | Some json -> ( - match json |> Json.get "pkgs" |> bind Json.array with + match + json |> YojsonHelpers.get "pkgs" |> bind YojsonHelpers.to_list_opt + with | None -> [] | Some packages -> packages |> List.filter_map readPackageEntry)) @@ -242,20 +253,29 @@ let findProjectFiles ~public ~namespace ~path ~sourceDirectories ~libBs = let findDependencyFiles base config = let deps = match - ( config |> Json.get "dependencies" |> bind Json.array, - config |> Json.get "bs-dependencies" |> bind Json.array ) + ( config + |> YojsonHelpers.get "dependencies" + |> bind YojsonHelpers.to_list_opt, + config + |> YojsonHelpers.get "bs-dependencies" + |> bind YojsonHelpers.to_list_opt ) with | None, None -> [] - | Some deps, None | _, Some deps -> deps |> List.filter_map Json.string + | Some deps, None | _, Some deps -> + deps |> List.filter_map Yojson.Safe.Util.to_string_option in let devDeps = match - ( config |> Json.get "dev-dependencies" |> bind Json.array, - config |> Json.get "bs-dev-dependencies" |> bind Json.array ) + ( config + |> YojsonHelpers.get "dev-dependencies" + |> bind YojsonHelpers.to_list_opt, + config + |> YojsonHelpers.get "bs-dev-dependencies" + |> bind YojsonHelpers.to_list_opt ) with | None, None -> [] | Some devDeps, None | _, Some devDeps -> - devDeps |> List.filter_map Json.string + devDeps |> List.filter_map (fun x -> Some (Yojson.Safe.Util.to_string x)) in let deps = deps @ devDeps in Log.log ("Dependencies: " ^ String.concat " " deps); @@ -264,12 +284,12 @@ let findDependencyFiles base config = deps |> List.map (fun name -> let result = - Json.bind (findPackageRoot ~base ~sourcedirsPackageRoots name) + bind (fun path -> let rescriptJsonPath = path /+ "rescript.json" in let parseText text = - match Json.parse text with + match YojsonHelpers.from_string_opt text with | Some inner -> ( let namespace = getNamespace inner in let sourceDirectories = @@ -298,6 +318,7 @@ let findDependencyFiles base config = match Files.readFile rescriptJsonPath with | Some text -> parseText text | None -> None) + (findPackageRoot ~base ~sourcedirsPackageRoots name) in match result with diff --git a/analysis/src/Hint.ml b/analysis/src/Hint.ml index 81881be3bc0..26d0525713e 100644 --- a/analysis/src/Hint.ml +++ b/analysis/src/Hint.ml @@ -2,7 +2,7 @@ open SharedTypes type inlayHintKind = Type let inlayKindToNumber = function - | Type -> 1 + | Type -> Lsp.Types.InlayHintKind.Type let locItemToTypeHint ~full:{file; package} locItem = match locItem.locType with @@ -83,7 +83,7 @@ let inlay ~source ~kindFile ~pos ~maxLength ~full ~debug = | Some full -> let result = !hints - |> List.filter_map (fun ((range : Protocol.range), hintKind) -> + |> List.filter_map (fun ((range : Lsp.Types.Range.t), hintKind) -> match References.getLocItem ~full ~pos:(range.start.line, range.start.character + 1) @@ -91,12 +91,19 @@ let inlay ~source ~kindFile ~pos ~maxLength ~full ~debug = with | None -> None | Some locItem -> ( - let position : Protocol.position = - {line = range.start.line; character = range.end_.character} + let position = + Lsp.Types.Position.create ~line:range.start.line + ~character:range.end_.character in match locItemToTypeHint locItem ~full with | Some label -> ( + let kind = inlayKindToNumber hintKind in + let label = ": " ^ label in let result = + Lsp.Types.InlayHint.create ~position ~kind ~paddingLeft:true + ~paddingRight:false ~label:(`String label) () + in + (* let result = Protocol. { kind = inlayKindToNumber hintKind; @@ -105,7 +112,7 @@ let inlay ~source ~kindFile ~pos ~maxLength ~full ~debug = paddingRight = false; label = ": " ^ label; } - in + in *) match maxlen with | Some value -> if String.length label > value then None else Some result @@ -148,29 +155,24 @@ let codeLens ~source ~kindFile ~full ~debug = | Some full -> let result = !lenses - |> List.filter_map (fun (range : Protocol.range) -> + |> List.filter_map (fun (range : Lsp.Types.Range.t) -> match References.getLocItem ~full ~pos:(range.start.line, range.start.character + 1) ~debug with | Some {locType = Typed (_, typeExpr, _)} -> - Some - Protocol. - { - range; - command = - Some - { - (* Code lenses can run commands. An empty command string means we just want the editor - to print the text, not link to running a command. *) - command = ""; - (* Print the type with a huge line width, because the code lens always prints on a - single line in the editor. *) - title = - typeExpr |> Shared.typeToString ~lineWidth:400; - }; - } + (* Code lenses can run commands. An empty command string means we just want the editor + to print the text, not link to running a command. *) + let command = + Lsp.Types.Command.create + ~command:"" + (* Print the type with a huge line width, because the code lens always prints on a + single line in the editor. *) + ~title:(typeExpr |> Shared.typeToString ~lineWidth:400) + () + in + Some (Lsp.Types.CodeLens.create ~range ~command ()) | _ -> None) in Some result diff --git a/analysis/src/Loc.ml b/analysis/src/Loc.ml index 635b787128e..754a2ff28e5 100644 --- a/analysis/src/Loc.ml +++ b/analysis/src/Loc.ml @@ -9,18 +9,19 @@ let toString (loc : t) = let hasPos ~pos loc = start loc <= pos && pos < end_ loc -(** Allows the character after the end to be included. Ie when the cursor is at the +(** Allows the character after the end to be included. Ie when the cursor is at the end of the word, like `someIdentifier`. Useful in some scenarios. *) let hasPosInclusiveEnd ~pos loc = start loc <= pos && pos <= end_ loc let mkPosition (pos : Pos.t) = let line, character = pos in - {Protocol.line; character} + Lsp.Types.Position.create ~line ~character let rangeOfLoc (loc : t) = let start = loc |> start |> mkPosition in let end_ = loc |> end_ |> mkPosition in - {Protocol.start; end_} + Lsp.Types.Range.create ~start ~end_ +(* {Protocol.start; end_} *) let isInside (x : t) (y : t) = x.loc_start.pos_cnum >= y.loc_start.pos_cnum diff --git a/analysis/src/Markdown.ml b/analysis/src/Markdown.ml index 0f82050fb0d..16d7f0c7a26 100644 --- a/analysis/src/Markdown.ml +++ b/analysis/src/Markdown.ml @@ -2,7 +2,7 @@ let spacing = "\n```\n \n```\n" let codeBlock code = Printf.sprintf "```rescript\n%s\n```" code let divider = "\n---\n" -type link = {startPos: Protocol.position; file: string; label: string} +type link = {startPos: Lsp.Types.Position.t; file: string; label: string} let linkToCommandArgs link = Printf.sprintf "[\"%s\",%i,%i]" link.file link.startPos.line diff --git a/analysis/src/Packages.ml b/analysis/src/Packages.ml index 8852119d17f..5edab49e2cf 100644 --- a/analysis/src/Packages.ml +++ b/analysis/src/Packages.ml @@ -41,38 +41,38 @@ let newBsPackage ~rootPath = | true -> BuildSystem.getStdlib rootPath | false -> BuildSystem.getLibBs rootPath in - match Json.parse raw with + match YojsonHelpers.from_string_opt raw with | Some config -> ( let namespace = FindFiles.getNamespace config in let rescriptVersion = getReScriptVersion () in let suffix = - match config |> Json.get "suffix" with - | Some (String suffix) -> suffix + match config |> YojsonHelpers.get "suffix" with + | Some (`String suffix) -> suffix | _ -> ".js" in let genericJsxModule = - let jsxConfig = config |> Json.get "jsx" in + let jsxConfig = config |> YojsonHelpers.get "jsx" in match jsxConfig with | Some jsxConfig -> ( - match jsxConfig |> Json.get "module" with - | Some (String m) when String.lowercase_ascii m <> "react" -> Some m + match jsxConfig |> YojsonHelpers.get "module" with + | Some (`String m) when String.lowercase_ascii m <> "react" -> Some m | _ -> None) | None -> None in let autocomplete = - match config |> Json.get "editor" with + match config |> YojsonHelpers.get "editor" with | Some editorConfig -> ( - match editorConfig |> Json.get "autocomplete" with - | Some (Object map) -> + match editorConfig |> YojsonHelpers.get "autocomplete" with + | Some (`Assoc map) -> map |> List.fold_left (fun acc (key, value) -> match value with - | Json.Array items -> + | `List items -> let values = items |> List.filter_map (function - | Json.String s -> Some s + | `String s -> Some s | _ -> None) in Misc.StringMap.add key values acc @@ -132,8 +132,10 @@ let newBsPackage ~rootPath = let bind f x = Option.bind x f in let compiler_flags = match - ( Json.get "compiler-flags" config |> bind Json.array, - Json.get "bsc-flags" config |> bind Json.array ) + ( YojsonHelpers.get "compiler-flags" config + |> bind YojsonHelpers.to_list_opt, + YojsonHelpers.get "bsc-flags" config + |> bind YojsonHelpers.to_list_opt ) with | Some compiler_flags, None | _, Some compiler_flags -> compiler_flags @@ -141,12 +143,15 @@ let newBsPackage ~rootPath = in let no_pervasives = compiler_flags - |> List.exists (fun s -> Json.string s = Some "-nopervasives") + |> List.exists (fun s -> + match s with + | `String s -> s = "-nopervasives" + | _ -> false) in let opens_from_compiler_flags = List.fold_left (fun opens item -> - match item |> Json.string with + match item |> Yojson.Safe.Util.to_string_option with | None -> opens | Some s -> ( let parts = String.split_on_char ' ' s in diff --git a/analysis/src/Protocol.ml b/analysis/src/Protocol.ml index 447584b7e9b..870b77c74bc 100644 --- a/analysis/src/Protocol.ml +++ b/analysis/src/Protocol.ml @@ -1,4 +1,4 @@ -type position = {line: int; character: int} +(* type position = {line: int; character: int} type range = {start: position; end_: position} type markupContent = {kind: string; value: string} @@ -98,7 +98,7 @@ type codeAction = { type semanticTokens = {data: int array} -let wrapInQuotes s = "\"" ^ Json.escape s ^ "\"" +(* let wrapInQuotes s = "\"" ^ Json.escape s ^ "\"" *) let null = "null" let array l = "[" ^ String.concat ", " l ^ "]" @@ -385,4 +385,4 @@ let stringifyDiagnostic d = "severity": %d, "source": "ReScript" }|} - (stringifyRange d.range) (wrapInQuotes d.message) d.severity + (stringifyRange d.range) (wrapInQuotes d.message) d.severity *) diff --git a/analysis/src/SemanticTokens.ml b/analysis/src/SemanticTokens.ml index 86feab8ef8d..1862ba612f4 100644 --- a/analysis/src/SemanticTokens.ml +++ b/analysis/src/SemanticTokens.ml @@ -492,4 +492,4 @@ let command ~debug ~emitter ~source ~kindFile = let semanticTokens ~source ~kindFile = let emitter = Token.createEmitter () in command ~emitter ~debug:false ~source ~kindFile; - Protocol.{data = Token.emit emitter} + Lsp.Types.SemanticTokens.create ~data:(Token.emit emitter) () diff --git a/analysis/src/SharedTypes.ml b/analysis/src/SharedTypes.ml index 49752aebf43..8427ae1668d 100644 --- a/analysis/src/SharedTypes.ml +++ b/analysis/src/SharedTypes.ml @@ -833,7 +833,7 @@ module Completion = struct sortText: string option; insertText: string option; filterText: string option; - insertTextFormat: Protocol.insertTextFormat option; + insertTextFormat: Lsp.Types.InsertTextFormat.t option; env: QueryEnv.t; deprecated: string option; docstring: string list; @@ -841,7 +841,7 @@ module Completion = struct detail: string option; typeArgContext: typeArgContext option; data: (string * string) list option; - additionalTextEdits: Protocol.textEdit list option; + additionalTextEdits: Lsp.Types.TextEdit.t list option; synthetic: bool; (** Whether this item is an made up, synthetic item or not. *) } @@ -858,7 +858,8 @@ module Completion = struct sortText; insertText; insertTextFormat = - (if includesSnippets then Some Protocol.Snippet else None); + (if includesSnippets then Some Lsp.Types.InsertTextFormat.Snippet + else None); filterText; detail; typeArgContext; @@ -871,15 +872,16 @@ module Completion = struct (* https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionItemKind *) let kindToInt kind = match kind with - | Module _ -> 9 - | FileModule _ -> 9 - | Constructor (_, _) | PolyvariantConstructor (_, _) -> 4 - | ObjLabel _ -> 4 - | Label _ -> 4 - | Field (_, _) -> 5 - | Type _ | ExtractedType (_, `Type) -> 22 - | Value _ | ExtractedType (_, `Value) -> 12 - | Snippet _ | FollowContextPath _ -> 15 + | Module _ -> Lsp.Types.CompletionItemKind.Module + | FileModule _ -> Lsp.Types.CompletionItemKind.Module + | Constructor (_, _) | PolyvariantConstructor (_, _) -> + Lsp.Types.CompletionItemKind.Constructor + | ObjLabel _ -> Lsp.Types.CompletionItemKind.Constructor + | Label _ -> Lsp.Types.CompletionItemKind.Constructor + | Field (_, _) -> Lsp.Types.CompletionItemKind.Field + | Type _ | ExtractedType (_, `Type) -> Lsp.Types.CompletionItemKind.Struct + | Value _ | ExtractedType (_, `Value) -> Lsp.Types.CompletionItemKind.Value + | Snippet _ | FollowContextPath _ -> Lsp.Types.CompletionItemKind.Snippet end let kindFromInnerType (t : innerType) = diff --git a/analysis/src/SignatureHelp.ml b/analysis/src/SignatureHelp.ml index 68cfc405906..d38c636217a 100644 --- a/analysis/src/SignatureHelp.ml +++ b/analysis/src/SignatureHelp.ml @@ -463,63 +463,71 @@ let signatureHelp ~debug ~source ~kindFile ~pos ~allowForConstructorPayloads let activeParameter = findActiveParameter ~argAtCursor ~args in let paramUnlabelledArgCount = ref 0 in - Some - { - Protocol.signatures = - [ - { - label = fnTypeStr; - parameters = - parameters - |> List.map (fun (argLabel, start, end_) -> - let paramArgCount = !paramUnlabelledArgCount in - paramUnlabelledArgCount := paramArgCount + 1; - let unlabelledArgCount = ref 0 in - { - Protocol.label = (start, end_); - documentation = - (match - args - |> List.find_opt (fun (lbl, _) -> - let argCount = !unlabelledArgCount in - unlabelledArgCount := argCount + 1; - match (lbl, argLabel) with - | ( Asttypes.Optional {txt = l1}, - Asttypes.Optional {txt = l2} ) - when l1 = l2 -> - true - | ( Labelled {txt = l1}, - Labelled {txt = l2} ) - when l1 = l2 -> - true - | Nolabel, Nolabel - when paramArgCount = argCount -> - true - | _ -> false) - with - | None -> - {Protocol.kind = "markdown"; value = ""} - | Some (_, labelTypExpr) -> - { - Protocol.kind = "markdown"; - value = - docsForLabel ~supportsMarkdownLinks ~file - ~package labelTypExpr; - }); - }); - documentation = - (match List.nth_opt docstring 0 with - | None -> None - | Some docs -> - Some {Protocol.kind = "markdown"; value = docs}); - }; - ]; - activeSignature = Some 0; - activeParameter = + let parametersInformation = + parameters + |> List.map (fun (argLabel, start, end_) -> + let paramArgCount = !paramUnlabelledArgCount in + paramUnlabelledArgCount := paramArgCount + 1; + let unlabelledArgCount = ref 0 in + let documentation = + match + args + |> List.find_opt (fun (lbl, _) -> + let argCount = !unlabelledArgCount in + unlabelledArgCount := argCount + 1; + match (lbl, argLabel) with + | ( Asttypes.Optional {txt = l1}, + Asttypes.Optional {txt = l2} ) + when l1 = l2 -> + true + | Labelled {txt = l1}, Labelled {txt = l2} + when l1 = l2 -> + true + | Nolabel, Nolabel when paramArgCount = argCount + -> + true + | _ -> false) + with + | None -> + Lsp.Types.MarkupContent.create + ~kind:Lsp.Types.MarkupKind.Markdown ~value:"" + | Some (_, labelTypExpr) -> + Lsp.Types.MarkupContent.create + ~kind:Lsp.Types.MarkupKind.Markdown + ~value: + (docsForLabel ~supportsMarkdownLinks ~file ~package + labelTypExpr) + in + Lsp.Types.ParameterInformation.create + ~label:(`Offset (start, end_)) + ~documentation:(`MarkupContent documentation) ()) + in + let signatures = + Lsp.Types.SignatureInformation.create ~label:fnTypeStr + ~parameters:parametersInformation + ?documentation: + (match List.nth_opt docstring 0 with + | None -> None + | Some docs -> + Some + (`MarkupContent + (Lsp.Types.MarkupContent.create + ~kind:Lsp.Types.MarkupKind.Markdown ~value:docs))) + ~activeParameter: + (match activeParameter with + | None -> Some (-1) + | activeParameter -> activeParameter) + () + in + let signature = + Lsp.Types.SignatureHelp.create ~signatures:[signatures] + ~activeParameter: (match activeParameter with | None -> Some (-1) - | activeParameter -> activeParameter); - } + | activeParameter -> activeParameter) + ~activeSignature:0 () + in + Some signature | _ -> None) | Some (_, ((`ConstructorExpr (lid, _) | `ConstructorPat (lid, _)) as cs)) -> ( @@ -702,44 +710,71 @@ let signatureHelp ~debug ~source ~kindFile ~pos ~allowForConstructorPayloads | None -> [] | Some (`SingleArg (_, docstring)) -> [ - { - Protocol.label = - (constructorNameLength + 1, String.length label - 1); - documentation = - {Protocol.kind = "markdown"; value = docstring}; - }; + Lsp.Types.ParameterInformation.create + ~label: + (`Offset + (constructorNameLength + 1, String.length label - 1)) + ~documentation: + (`MarkupContent + (Lsp.Types.MarkupContent.create + ~kind:Lsp.Types.MarkupKind.Markdown ~value:docstring)) + (); ] | Some (`InlineRecord fields) -> - (* Account for leading '({' *) let baseOffset = constructorNameLength + 2 in - { - Protocol.label = (0, 0); - documentation = {Protocol.kind = "markdown"; value = ""}; - } + (* Account for leading '({' *) + Lsp.Types.ParameterInformation.create + ~label:(`Offset (0, 0)) + ~documentation: + (`MarkupContent + (Lsp.Types.MarkupContent.create + ~kind:Lsp.Types.MarkupKind.Markdown ~value:"")) + () :: (fields |> List.map (fun (_, (field : field), (start, end_)) -> - { - Protocol.label = - (baseOffset + start, baseOffset + end_); - documentation = - { - Protocol.kind = "markdown"; - value = field.docstring |> String.concat "\n"; - }; - })) + Lsp.Types.ParameterInformation.create + ~label: + (`Offset (baseOffset + start, baseOffset + end_)) + ~documentation: + (`MarkupContent + (Lsp.Types.MarkupContent.create + ~kind:Lsp.Types.MarkupKind.Markdown + ~value: + (field.docstring |> String.concat "\n"))) + ())) | Some (`TupleArg items) -> (* Account for leading '(' *) let baseOffset = constructorNameLength + 1 in items |> List.map (fun (_, docstring, (start, end_)) -> - { - Protocol.label = (baseOffset + start, baseOffset + end_); - documentation = - {Protocol.kind = "markdown"; value = docstring}; - }) + Lsp.Types.ParameterInformation.create + ~label: + (`Offset (baseOffset + start, baseOffset + end_)) + ~documentation: + (`MarkupContent + (Lsp.Types.MarkupContent.create + ~kind:Lsp.Types.MarkupKind.Markdown + ~value:docstring)) + ()) in - Some - { + let signatures = + Lsp.Types.SignatureInformation.create ~label ~parameters:params + ?documentation: + (match List.nth_opt constructor.docstring 0 with + | None -> None + | Some docs -> + Some + (`MarkupContent + (Lsp.Types.MarkupContent.create + ~kind:Lsp.Types.MarkupKind.Markdown ~value:docs))) + ~activeParameter:(Some activeParameter) () + in + let signature = + Lsp.Types.SignatureHelp.create ~signatures:[signatures] + ~activeParameter:(Some activeParameter) ~activeSignature:0 () + in + Some signature + (* { Protocol.signatures = [ { @@ -754,5 +789,6 @@ let signatureHelp ~debug ~source ~kindFile ~pos ~allowForConstructorPayloads ]; activeSignature = Some 0; activeParameter = Some activeParameter; - })) + } *) + )) | _ -> None)) diff --git a/analysis/src/TypeUtils.ml b/analysis/src/TypeUtils.ml index 466d2f8bcfd..fa85e92e417 100644 --- a/analysis/src/TypeUtils.ml +++ b/analysis/src/TypeUtils.ml @@ -3,7 +3,7 @@ open SharedTypes let modulePathFromEnv env = let moduleName = env.QueryEnv.file.moduleName in let transformedModuleName = - (* Transform namespaced module names from internal format (Context-Kaplay) + (* Transform namespaced module names from internal format (Context-Kaplay) to user-facing format (Kaplay.Context) *) match String.rindex_opt moduleName '-' with | None -> moduleName @@ -1151,15 +1151,15 @@ let getFirstFnUnlabelledArgType ~env ~full t = | _ -> None let makeAdditionalTextEditsForRemovingDot posOfDot = + let start = + Lsp.Types.Position.create ~line:(fst posOfDot) ~character:(snd posOfDot - 1) + in + let end_ = + Lsp.Types.Position.create ~line:(fst posOfDot) ~character:(snd posOfDot) + in [ - { - Protocol.range = - { - start = {line = fst posOfDot; character = snd posOfDot - 1}; - end_ = {line = fst posOfDot; character = snd posOfDot}; - }; - newText = ""; - }; + Lsp.Types.TextEdit.create ~newText:"" + ~range:(Lsp.Types.Range.create ~start ~end_); ] (** Turns a completion into a pipe completion. *) @@ -1184,9 +1184,9 @@ let transformCompletionToPipeCompletion ?(synthetic = false) ~env ?posOfDot | Some posOfDot -> Some (makeAdditionalTextEditsForRemovingDot posOfDot)); } -(** This takes a type expr and the env that type expr was found in, and produces a globally unique +(** This takes a type expr and the env that type expr was found in, and produces a globally unique id for that specific type. The globally unique id is the full path to the type as seen from the root - of the project. Example: type x in module SomeModule in file SomeFile would get the globally + of the project. Example: type x in module SomeModule in file SomeFile would get the globally unique id `SomeFile.SomeModule.x`.*) let rec findRootTypeId ~full ~env (t : Types.type_expr) = let debug = false in diff --git a/analysis/src/Utils.ml b/analysis/src/Utils.ml index abc286af599..393c6b1f379 100644 --- a/analysis/src/Utils.ml +++ b/analysis/src/Utils.ml @@ -19,10 +19,13 @@ let isFirstCharUppercase s = String.length s > 0 && Char.equal s.[0] (Char.uppercase_ascii s.[0]) let cmtPosToPosition {Lexing.pos_lnum; pos_cnum; pos_bol} = - Protocol.{line = pos_lnum - 1; character = pos_cnum - pos_bol} + (* Protocol.{line = pos_lnum - 1; character = pos_cnum - pos_bol} *) + Lsp.Types.Position.create ~line:(pos_lnum - 1) ~character:(pos_cnum - pos_bol) let cmtLocToRange {Location.loc_start; loc_end} = - Protocol.{start = cmtPosToPosition loc_start; end_ = cmtPosToPosition loc_end} + let start = cmtPosToPosition loc_start in + let end_ = cmtPosToPosition loc_end in + Lsp.Types.Range.create ~start ~end_ let endOfLocation loc length = let open Location in @@ -185,12 +188,12 @@ let indent n text = let mkPosition (pos : Pos.t) = let line, character = pos in - {Protocol.line; character} + Lsp.Types.Position.create ~line ~character let rangeOfLoc (loc : Location.t) = let start = loc |> Loc.start |> mkPosition in let end_ = loc |> Loc.end_ |> mkPosition in - {Protocol.start; end_} + Lsp.Types.Range.create ~start ~end_ let rec expandPath (path : Path.t) = match path with diff --git a/analysis/src/Xform.ml b/analysis/src/Xform.ml index 8d66d8c757d..0f9bf5a79c2 100644 --- a/analysis/src/Xform.ml +++ b/analysis/src/Xform.ml @@ -163,8 +163,40 @@ module ModuleToFile = struct in let moduleName = pmb_name.txt in let newFilePath = - Uri.fromPath - (Filename.concat (Filename.dirname path) moduleName ^ ".res") + Filename.concat (Filename.dirname path) moduleName ^ ".res" + in + let uri = Lsp.Uri.of_string newFilePath in + let documentChanges = + [ + `CreateFile + (Lsp.Types.CreateFile.create ~uri + ~options: + (Lsp.Types.CreateFileOptions.create ~overwrite:false + ~ignoreIfExists:true ()) + ()); + `TextDocumentEdit + (Lsp.Types.TextDocumentEdit.create + ~edits: + [ + `TextEdit + (Lsp.Types.TextEdit.create ~range + ~newText:textForExtractedFile); + ] + ~textDocument: + (Lsp.Types.OptionalVersionedTextDocumentIdentifier.create + ~uri ())); + `TextDocumentEdit + (Lsp.Types.TextDocumentEdit.create + ~edits: + [ + `TextEdit + (Lsp.Types.TextEdit.create ~range + ~newText:newTextInCurrentFile); + ] + ~textDocument: + (Lsp.Types.OptionalVersionedTextDocumentIdentifier.create + ~uri:(Lsp.Uri.of_string path) ())); + ] in changed := Some @@ -172,38 +204,7 @@ module ModuleToFile = struct ~title: (Printf.sprintf "Extract local module \"%s\" to file \"%s\"" moduleName (moduleName ^ ".res")) - ~kind:RefactorRewrite - ~documentChanges: - [ - Protocol.CreateFile - { - uri = newFilePath |> Uri.toString; - options = - Some - {overwrite = Some false; ignoreIfExists = Some true}; - }; - TextDocumentEdit - { - textDocument = - {uri = newFilePath |> Uri.toString; version = None}; - edits = - [ - { - newText = textForExtractedFile; - range = - { - start = {line = 0; character = 0}; - end_ = {line = 0; character = 0}; - }; - }; - ]; - }; - TextDocumentEdit - { - textDocument = {uri = path; version = None}; - edits = [{newText = newTextInCurrentFile; range}]; - }; - ]); + ~kind:RefactorRewrite ~documentChanges); () | _ -> ()); Ast_iterator.default_iterator.structure_item iterator structure_item @@ -852,14 +853,14 @@ let parseImplementation ~source = in comments |> List.filter filter in - let printExpr ~(range : Protocol.range) (expr : Parsetree.expression) = + let printExpr ~(range : Lsp.Types.Range.t) (expr : Parsetree.expression) = let structure = [Ast_helper.Str.eval ~loc:expr.pexp_loc expr] in structure |> Res_printer.print_implementation ~comments:(comments |> filterComments ~loc:expr.pexp_loc) |> Utils.indent range.start.character in - let printStructureItem ~(range : Protocol.range) + let printStructureItem ~(range : Lsp.Types.Range.t) (item : Parsetree.structure_item) = let structure = [item] in structure @@ -886,7 +887,7 @@ let parseInterface ~source = in comments |> List.filter filter in - let printSignatureItem ~(range : Protocol.range) + let printSignatureItem ~(range : Lsp.Types.Range.t) (item : Parsetree.signature_item) = let signature_item = [item] in signature_item @@ -896,7 +897,8 @@ let parseInterface ~source = in (structure, printSignatureItem) -let extractCodeActions ~path ~startPos ~endPos ~source ~kindFile ~debug = +let extractCodeActions ~(path : string) ~startPos ~endPos ~source ~kindFile + ~debug = let pos = startPos in let codeActions = ref [] in match kindFile with diff --git a/analysis/src/YojsonHelpers.ml b/analysis/src/YojsonHelpers.ml new file mode 100644 index 00000000000..0cae226f44b --- /dev/null +++ b/analysis/src/YojsonHelpers.ml @@ -0,0 +1,9 @@ +let get key (t : Yojson.Safe.t) : Yojson.Safe.t option = + match t with + | `Assoc items -> List.assoc_opt key items + | _ -> None + +let to_list_opt json = try Some (Yojson.Safe.Util.to_list json) with _ -> None + +let from_string_opt text = + try Some (Yojson.Safe.from_string text) with _ -> None diff --git a/analysis/src/dune b/analysis/src/dune index 0b27f5aac8d..132e9e438da 100644 --- a/analysis/src/dune +++ b/analysis/src/dune @@ -4,4 +4,4 @@ (backend bisect_ppx)) (flags (-w "+6+26+27+32+33+39")) - (libraries unix str ext ml jsonlib syntax reanalyze)) + (libraries unix str ext ml yojson lsp syntax reanalyze)) diff --git a/analysis/vendor/.ocamlformat b/analysis/vendor/.ocamlformat deleted file mode 100644 index 593b6a1ffcd..00000000000 --- a/analysis/vendor/.ocamlformat +++ /dev/null @@ -1 +0,0 @@ -disable diff --git a/analysis/vendor/dune b/analysis/vendor/dune deleted file mode 100644 index 07b82861535..00000000000 --- a/analysis/vendor/dune +++ /dev/null @@ -1 +0,0 @@ -(dirs ext ml res_syntax json flow_parser) diff --git a/analysis/vendor/json/Json.ml b/analysis/vendor/json/Json.ml deleted file mode 100644 index bfa60adc618..00000000000 --- a/analysis/vendor/json/Json.ml +++ /dev/null @@ -1,536 +0,0 @@ -(** # Json parser - * - * ## Basics - * - * ``` - * open Json.Infix; /* for the nice infix operators */ - * let raw = {|{"hello": "folks"}|}; - * let who = Json.parse(raw) |> Json.get("hello") |?> Json.string; - * Js.log(who); - * ``` - * - * ## Parse & stringify - * - * @doc parse, stringify - * - * ## Accessing descendents - * - * @doc get, nth, getPath - * - * ## Coercing to types - * - * @doc string, number, array, obj, bool, null - * - * ## The JSON type - * - * @doc t - * - * ## Infix operators for easier working - * - * @doc Infix - *) - -type t = - | String of string - | Number of float - | Array of t list - | Object of (string * t) list - | True - | False - | Null - -let string_of_number f = - let s = string_of_float f in - if s.[String.length s - 1] = '.' then String.sub s 0 (String.length s - 1) - else s - -(** - * This module is provided for easier working with optional values. - *) -module Infix = struct - (** The "force unwrap" operator - * - * If you're sure there's a value, you can force it. - * ``` - * open Json.Infix; - * let x: int = Some(10) |! "Expected this to be present"; - * Js.log(x); - * ``` - * - * But you gotta be sure, otherwise it will throw. - * ```reason;raises - * open Json.Infix; - * let x: int = None |! "This will throw"; - * ``` - *) - let ( |! ) o d = - match o with - | None -> failwith d - | Some v -> v - - (** The "upwrap with default" operator - * ``` - * open Json.Infix; - * let x: int = Some(10) |? 4; - * let y: int = None |? 5; - * Js.log2(x, y); - * ``` - *) - let ( |? ) o d = - match o with - | None -> d - | Some v -> v - - (** The "transform contents into new optional" operator - * ``` - * open Json.Infix; - * let maybeInc = x => x > 5 ? Some(x + 1) : None; - * let x: option(int) = Some(14) |?> maybeInc; - * let y: option(int) = None |?> maybeInc; - * ``` - *) - let ( |?> ) o fn = - match o with - | None -> None - | Some v -> fn v - - (** The "transform contents into new value & then re-wrap" operator - * ``` - * open Json.Infix; - * let inc = x => x + 1; - * let x: option(int) = Some(7) |?>> inc; - * let y: option(int) = None |?>> inc; - * Js.log2(x, y); - * ``` - *) - let ( |?>> ) o fn = - match o with - | None -> None - | Some v -> Some (fn v) - - (** "handle the value if present, otherwise here's the default" - * - * It's called fold because that's what people call it :?. It's the same as "transform contents to new value" + "unwrap with default". - * - * ``` - * open Json.Infix; - * let inc = x => x + 1; - * let x: int = fold(Some(4), 10, inc); - * let y: int = fold(None, 2, inc); - * Js.log2(x, y); - * ``` - *) - let fold o d f = - match o with - | None -> d - | Some v -> f v -end - -let escape text = - let ln = String.length text in - let buf = Buffer.create ln in - let rec loop i = - if i < ln then ( - (match text.[i] with - | '\012' -> Buffer.add_string buf "\\f" - | '\\' -> Buffer.add_string buf "\\\\" - | '"' -> Buffer.add_string buf "\\\"" - | '\n' -> Buffer.add_string buf "\\n" - | '\b' -> Buffer.add_string buf "\\b" - | '\r' -> Buffer.add_string buf "\\r" - | '\t' -> Buffer.add_string buf "\\t" - | c -> - let code = Char.code c in - if code < 0x20 then Printf.bprintf buf "\\u%04x" code - else Buffer.add_char buf c); - loop (i + 1)) - in - loop 0; - Buffer.contents buf - -(** - * ``` - * let text = {|{"hello": "folks", "aa": [2, 3, "four"]}|}; - * let result = Json.stringify(Json.parse(text)); - * Js.log(result); - * assert(text == result); - * ``` - *) -let rec stringify t = - match t with - | String value -> "\"" ^ escape value ^ "\"" - | Number num -> string_of_number num - | Array items -> "[" ^ String.concat ", " (List.map stringify items) ^ "]" - | Object items -> - "{" - ^ String.concat ", " - (List.map - (fun (k, v) -> "\"" ^ String.escaped k ^ "\": " ^ stringify v) - items) - ^ "}" - | True -> "true" - | False -> "false" - | Null -> "null" - -let white n = - let buffer = Buffer.create n in - for i = 0 to n - 1 do - Buffer.add_char buffer ' ' - done; - Buffer.contents buffer - -let rec stringifyPretty ?(indent = 0) t = - match t with - | String value -> "\"" ^ escape value ^ "\"" - | Number num -> string_of_number num - | Array [] -> "[]" - | Array [(String _ as contents)] -> "[" ^ stringifyPretty contents ^ "]" - | Array items -> - "[\n" ^ white indent - ^ String.concat - (",\n" ^ white indent) - (List.map (stringifyPretty ~indent:(indent + 2)) items) - ^ "\n" - ^ white (indent - 2) - ^ "]" - | Object [] -> "{}" - | Object items -> - "{\n" ^ white indent - ^ String.concat - (",\n" ^ white indent) - (List.map - (fun (k, v) -> - "\"" ^ String.escaped k ^ "\": " - ^ stringifyPretty ~indent:(indent + 2) v) - items) - ^ "\n" - ^ white (indent - 2) - ^ "}" - | True -> "true" - | False -> "false" - | Null -> "null" - -let unwrap message t = - match t with - | Some v -> v - | None -> failwith message - -module Parser = struct - let split_by ?(keep_empty = false) is_delim str = - let len = String.length str in - let rec loop acc last_pos pos = - if pos = -1 then - if last_pos = 0 && not keep_empty then acc - else String.sub str 0 last_pos :: acc - else if is_delim str.[pos] then - let new_len = last_pos - pos - 1 in - if new_len <> 0 || keep_empty then - let v = String.sub str (pos + 1) new_len in - loop (v :: acc) pos (pos - 1) - else loop acc pos (pos - 1) - else loop acc last_pos (pos - 1) - in - loop [] len (len - 1) - - let fail text pos message = - let pre = String.sub text 0 pos in - let lines = split_by (fun c -> c = '\n') pre in - let count = List.length lines in - let last = - match count > 0 with - | true -> List.nth lines (count - 1) - | false -> "" - in - let col = String.length last + 1 in - let line = List.length lines in - let string = - Printf.sprintf "Error \"%s\" at %d:%d -> %s\n" message line col last - in - failwith string - - let rec skipToNewline text pos = - if pos >= String.length text then pos - else if text.[pos] = '\n' then pos + 1 - else skipToNewline text (pos + 1) - - let stringTail text = - let len = String.length text in - if len > 1 then String.sub text 1 (len - 1) else "" - - let rec skipToCloseMultilineComment text pos = - if pos + 1 >= String.length text then failwith "Unterminated comment" - else if text.[pos] = '*' && text.[pos + 1] = '/' then pos + 2 - else skipToCloseMultilineComment text (pos + 1) - - let rec skipWhite text pos = - if - pos < String.length text - && (text.[pos] = ' ' - || text.[pos] = '\t' - || text.[pos] = '\n' - || text.[pos] = '\r') - then skipWhite text (pos + 1) - else pos - - (* from https://stackoverflow.com/a/42431362 *) - let utf8encode s = - let prefs = [|0; 192; 224|] in - let s1 n = String.make 1 (Char.chr n) in - let rec ienc k sofar resid = - let bct = if k = 0 then 7 else 6 - k in - if resid < 1 lsl bct then s1 (prefs.(k) + resid) ^ sofar - else ienc (k + 1) (s1 (128 + (resid mod 64)) ^ sofar) (resid / 64) - in - ienc 0 "" (int_of_string ("0x" ^ s)) - - let parseString text pos = - (* let i = ref(pos); *) - let buffer = Buffer.create (String.length text) in - let ln = String.length text in - let rec loop i = - match i >= ln with - | true -> fail text i "Unterminated string" - | false -> ( - match text.[i] with - | '"' -> i + 1 - | '\\' -> ( - match i + 1 >= ln with - | true -> fail text i "Unterminated string" - | false -> ( - match text.[i + 1] with - | '/' -> - Buffer.add_char buffer '/'; - loop (i + 2) - | 'f' -> - Buffer.add_char buffer '\012'; - loop (i + 2) - | 'u' when i + 6 < ln -> - Buffer.add_string buffer (utf8encode (String.sub text (i + 2) 4)); - loop (i + 7) - | _ -> - Buffer.add_string buffer (Scanf.unescaped (String.sub text i 2)); - loop (i + 2))) - | c -> - Buffer.add_char buffer c; - loop (i + 1)) - in - let final = loop pos in - (Buffer.contents buffer, final) - - let parseDigits text pos = - let len = String.length text in - let rec loop i = - if i >= len then i - else - match text.[i] with - | '0' .. '9' -> loop (i + 1) - | _ -> i - in - loop (pos + 1) - - let parseWithDecimal text pos = - let pos = parseDigits text pos in - if pos < String.length text && text.[pos] = '.' then - let pos = parseDigits text (pos + 1) in - pos - else pos - - let parseNumber text pos = - let pos = parseWithDecimal text pos in - let ln = String.length text in - if pos < ln - 1 && (text.[pos] = 'E' || text.[pos] = 'e') then - let pos = - match text.[pos + 1] with - | '-' | '+' -> pos + 2 - | _ -> pos + 1 - in - parseDigits text pos - else pos - - let parseNegativeNumber text pos = - let final = - if text.[pos] = '-' then parseNumber text (pos + 1) - else parseNumber text pos - in - (Number (float_of_string (String.sub text pos (final - pos))), final) - - let expect char text pos message = - if text.[pos] <> char then fail text pos ("Expected: " ^ message) - else pos + 1 - - let parseComment : 'a. string -> int -> (string -> int -> 'a) -> 'a = - fun text pos next -> - if text.[pos] <> '/' then - if text.[pos] = '*' then - next text (skipToCloseMultilineComment text (pos + 1)) - else failwith "Invalid syntax" - else next text (skipToNewline text (pos + 1)) - - let maybeSkipComment text pos = - if pos < String.length text && text.[pos] = '/' then - if pos + 1 < String.length text && text.[pos + 1] = '/' then - skipToNewline text (pos + 1) - else if pos + 1 < String.length text && text.[pos + 1] = '*' then - skipToCloseMultilineComment text (pos + 1) - else fail text pos "Invalid synatx" - else pos - - let rec skip text pos = - if pos = String.length text then pos - else - let n = skipWhite text pos |> maybeSkipComment text in - if n > pos then skip text n else n - - let rec parse text pos = - if pos >= String.length text then - fail text pos "Reached end of file without being done parsing" - else - match text.[pos] with - | '/' -> parseComment text (pos + 1) parse - | '[' -> parseArray text (pos + 1) - | '{' -> parseObject text (pos + 1) - | 'n' -> - if String.sub text pos 4 = "null" then (Null, pos + 4) - else fail text pos "unexpected character" - | 't' -> - if String.sub text pos 4 = "true" then (True, pos + 4) - else fail text pos "unexpected character" - | 'f' -> - if String.sub text pos 5 = "false" then (False, pos + 5) - else fail text pos "unexpected character" - | '\n' | '\t' | ' ' | '\r' -> parse text (skipWhite text pos) - | '"' -> - let s, pos = parseString text (pos + 1) in - (String s, pos) - | '-' | '0' .. '9' -> parseNegativeNumber text pos - | _ -> fail text pos "unexpected character" - - and parseArrayValue text pos = - let pos = skip text pos in - let value, pos = parse text pos in - let pos = skip text pos in - match text.[pos] with - | ',' -> - let pos = skip text (pos + 1) in - if text.[pos] = ']' then ([value], pos + 1) - else - let rest, pos = parseArrayValue text pos in - (value :: rest, pos) - | ']' -> ([value], pos + 1) - | _ -> fail text pos "unexpected character" - - and parseArray text pos = - let pos = skip text pos in - match text.[pos] with - | ']' -> (Array [], pos + 1) - | _ -> - let items, pos = parseArrayValue text pos in - (Array items, pos) - - and parseObjectValue text pos = - let pos = skip text pos in - if text.[pos] <> '"' then fail text pos "Expected string" - else - let key, pos = parseString text (pos + 1) in - let pos = skip text pos in - let pos = expect ':' text pos "Colon" in - let value, pos = parse text pos in - let pos = skip text pos in - match text.[pos] with - | ',' -> - let pos = skip text (pos + 1) in - if text.[pos] = '}' then ([(key, value)], pos + 1) - else - let rest, pos = parseObjectValue text pos in - ((key, value) :: rest, pos) - | '}' -> ([(key, value)], pos + 1) - | _ -> - let rest, pos = parseObjectValue text pos in - ((key, value) :: rest, pos) - - and parseObject text pos = - let pos = skip text pos in - if text.[pos] = '}' then (Object [], pos + 1) - else - let pairs, pos = parseObjectValue text pos in - (Object pairs, pos) -end -[@@nodoc] - -(** Turns some text into a json object. throws on failure *) -let parse text = - try - let item, pos = Parser.parse text 0 in - let pos = Parser.skip text pos in - if pos < String.length text then - (* failwith - ("Extra data after parse finished: " - ^ String.sub text pos (String.length text - pos)) *) - None - else Some item - with Invalid_argument _ | Failure _ -> None - -(* Accessor helpers *) -let bind v fn = - match v with - | None -> None - | Some v -> fn v - -(** If `t` is an object, get the value associated with the given string key *) -let get key t = - match t with - | Object items -> ( try Some (List.assoc key items) with Not_found -> None) - | _ -> None - -(** If `t` is an array, get the value associated with the given index *) -let nth n t = - match t with - | Array items -> - if n < List.length items then Some (List.nth items n) else None - | _ -> None - -let string t = - match t with - | String s -> Some s - | _ -> None -let number t = - match t with - | Number s -> Some s - | _ -> None -let array t = - match t with - | Array s -> Some s - | _ -> None -let obj t = - match t with - | Object s -> Some s - | _ -> None -let bool t = - match t with - | True -> Some true - | False -> Some false - | _ -> None -let null t = - match t with - | Null -> Some () - | _ -> None - -let rec parsePath keyList t = - match keyList with - | [] -> Some t - | head :: rest -> ( - match get head t with - | None -> None - | Some value -> parsePath rest value) - -(** Get a deeply nested value from an object `t`. - * ``` - * open Json.Infix; - * let json = Json.parse({|{"a": {"b": {"c": 2}}}|}); - * let num = Json.getPath("a.b.c", json) |?> Json.number; - * assert(num == Some(2.)) - * ``` - *) -let getPath path t = - let keys = Parser.split_by (fun c -> c = '.') path in - parsePath keys t diff --git a/analysis/vendor/json/dune b/analysis/vendor/json/dune deleted file mode 100644 index 32dbef0de79..00000000000 --- a/analysis/vendor/json/dune +++ /dev/null @@ -1,5 +0,0 @@ -(library - (name jsonlib) - (wrapped false) - (flags -w "-9") - (libraries)) diff --git a/dune-project b/dune-project index 404204f7f95..f3cacc6bbcc 100644 --- a/dune-project +++ b/dune-project @@ -55,7 +55,9 @@ (>= 5.0.0)) (cppo (= 1.8.0)) - (odoc :with-doc))) + (odoc :with-doc) + (lsp + (= 1.22.0)))) (package (name tools) diff --git a/packages/@rescript/runtime/RescriptTools_ExtractCodeBlocks.res b/packages/@rescript/runtime/RescriptTools_ExtractCodeBlocks.res index b77ae5e8f6c..d41cfe9ddd7 100644 --- a/packages/@rescript/runtime/RescriptTools_ExtractCodeBlocks.res +++ b/packages/@rescript/runtime/RescriptTools_ExtractCodeBlocks.res @@ -7,4 +7,17 @@ type codeBlock = { /** `decodeFromJson(json)` parse JSON generated from `rescript-tools extract-codeblocks` command */ -external decodeFromJson: Stdlib_JSON.t => result, string> = "%identity" +let decodeFromJson = (json: Stdlib_JSON.t) => + switch json { + | Array(codeblocks) => + let codeblocks = codeblocks->Stdlib_Array.filterMap(c => { + switch c { + | Object(dict{"id": Stdlib_JSON.String(id), "name": String(name), "code": String(code)}) => + Some({id, name, code}) + | _ => None + } + }) + Ok(codeblocks) + | String(error) => Error(error) + | _ => Error("Failed to decode codeblocks") + } diff --git a/packages/@rescript/runtime/lib/es6/RescriptTools_ExtractCodeBlocks.mjs b/packages/@rescript/runtime/lib/es6/RescriptTools_ExtractCodeBlocks.mjs index ae1b9f17e65..c30a7496b5e 100644 --- a/packages/@rescript/runtime/lib/es6/RescriptTools_ExtractCodeBlocks.mjs +++ b/packages/@rescript/runtime/lib/es6/RescriptTools_ExtractCodeBlocks.mjs @@ -1 +1,50 @@ -/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ + + +import * as Stdlib_Array from "./Stdlib_Array.mjs"; + +function decodeFromJson(json) { + if (Array.isArray(json)) { + let codeblocks = Stdlib_Array.filterMap(json, c => { + if (typeof c !== "object" || c === null || Array.isArray(c)) { + return; + } + let id = c.id; + if (typeof id !== "string") { + return; + } + let name = c.name; + if (typeof name !== "string") { + return; + } + let code = c.code; + if (typeof code === "string") { + return { + id: id, + name: name, + code: code + }; + } + }); + return { + TAG: "Ok", + _0: codeblocks + }; + } + switch (typeof json) { + case "string" : + return { + TAG: "Error", + _0: json + }; + default: + return { + TAG: "Error", + _0: "Failed to decode codeblocks" + }; + } +} + +export { + decodeFromJson, +} +/* No side effect */ diff --git a/packages/@rescript/runtime/lib/js/RescriptTools_ExtractCodeBlocks.cjs b/packages/@rescript/runtime/lib/js/RescriptTools_ExtractCodeBlocks.cjs index ae1b9f17e65..8598e56ed39 100644 --- a/packages/@rescript/runtime/lib/js/RescriptTools_ExtractCodeBlocks.cjs +++ b/packages/@rescript/runtime/lib/js/RescriptTools_ExtractCodeBlocks.cjs @@ -1 +1,48 @@ -/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ +'use strict'; + +let Stdlib_Array = require("./Stdlib_Array.cjs"); + +function decodeFromJson(json) { + if (Array.isArray(json)) { + let codeblocks = Stdlib_Array.filterMap(json, c => { + if (typeof c !== "object" || c === null || Array.isArray(c)) { + return; + } + let id = c.id; + if (typeof id !== "string") { + return; + } + let name = c.name; + if (typeof name !== "string") { + return; + } + let code = c.code; + if (typeof code === "string") { + return { + id: id, + name: name, + code: code + }; + } + }); + return { + TAG: "Ok", + _0: codeblocks + }; + } + switch (typeof json) { + case "string" : + return { + TAG: "Error", + _0: json + }; + default: + return { + TAG: "Error", + _0: "Failed to decode codeblocks" + }; + } +} + +exports.decodeFromJson = decodeFromJson; +/* No side effect */ diff --git a/tests/analysis_tests/tests/not_compiled/expected/Diagnostics.res.txt b/tests/analysis_tests/tests/not_compiled/expected/Diagnostics.res.txt index a5df33b7107..9e80fd56ed1 100644 --- a/tests/analysis_tests/tests/not_compiled/expected/Diagnostics.res.txt +++ b/tests/analysis_tests/tests/not_compiled/expected/Diagnostics.res.txt @@ -1,17 +1,28 @@ -[{ - "range": {"start": {"line": 2, "character": 4}, "end": {"line": 2, "character": 6}}, - "message": "consecutive statements on a line must be separated by ';' or a newline", - "severity": 1, - "source": "ReScript" -}, { - "range": {"start": {"line": 1, "character": 9}, "end": {"line": 1, "character": 11}}, - "message": "This let-binding misses an expression", - "severity": 1, - "source": "ReScript" -}, { - "range": {"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 5}}, - "message": "I was expecting a name for this let-binding. Example: `let message = \"hello\"`", - "severity": 1, - "source": "ReScript" -}] +null +[ + { + "message": "consecutive statements on a line must be separated by ';' or a newline", + "range": { + "end": { "character": 6, "line": 2 }, + "start": { "character": 4, "line": 2 } + }, + "severity": 1 + }, + { + "message": "This let-binding misses an expression", + "range": { + "end": { "character": 11, "line": 1 }, + "start": { "character": 9, "line": 1 } + }, + "severity": 1 + }, + { + "message": "I was expecting a name for this let-binding. Example: `let message = \"hello\"`", + "range": { + "end": { "character": 5, "line": 0 }, + "start": { "character": 4, "line": 0 } + }, + "severity": 1 + } +] diff --git a/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.res.txt b/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.res.txt index f94561bdc53..825e8726f65 100644 --- a/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.res.txt +++ b/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.res.txt @@ -1,9 +1,10 @@ +null Xform not_compiled/DocTemplate.res 3:3 can't find module DocTemplate Hit: Add Documentation template -TextDocumentEdit: DocTemplate.res -{"start": {"line": 3, "character": 0}, "end": {"line": 5, "character": 9}} +TextDocumentEdit: file:///not_compiled/DocTemplate.res +{"end":{"character":9,"line":5},"start":{"character":0,"line":3}} newText: <--here /** @@ -17,8 +18,8 @@ Xform not_compiled/DocTemplate.res 6:15 can't find module DocTemplate Hit: Add Documentation template -TextDocumentEdit: DocTemplate.res -{"start": {"line": 6, "character": 0}, "end": {"line": 6, "character": 33}} +TextDocumentEdit: file:///not_compiled/DocTemplate.res +{"end":{"character":33,"line":6},"start":{"character":0,"line":6}} newText: <--here /** @@ -30,8 +31,8 @@ Xform not_compiled/DocTemplate.res 8:4 can't find module DocTemplate Hit: Add Documentation template -TextDocumentEdit: DocTemplate.res -{"start": {"line": 8, "character": 0}, "end": {"line": 8, "character": 9}} +TextDocumentEdit: file:///not_compiled/DocTemplate.res +{"end":{"character":9,"line":8},"start":{"character":0,"line":8}} newText: <--here /** @@ -43,8 +44,8 @@ Xform not_compiled/DocTemplate.res 10:4 can't find module DocTemplate Hit: Add Documentation template -TextDocumentEdit: DocTemplate.res -{"start": {"line": 10, "character": 0}, "end": {"line": 10, "character": 20}} +TextDocumentEdit: file:///not_compiled/DocTemplate.res +{"end":{"character":20,"line":10},"start":{"character":0,"line":10}} newText: <--here /** @@ -56,8 +57,8 @@ Xform not_compiled/DocTemplate.res 12:7 can't find module DocTemplate Hit: Add Documentation template -TextDocumentEdit: DocTemplate.res -{"start": {"line": 12, "character": 0}, "end": {"line": 16, "character": 1}} +TextDocumentEdit: file:///not_compiled/DocTemplate.res +{"end":{"character":1,"line":16},"start":{"character":0,"line":12}} newText: <--here /** @@ -70,10 +71,10 @@ module T = { } Hit: Extract local module "T" to file "T.res" -CreateFile: T.res +CreateFile: file:///not_compiled/T.res -TextDocumentEdit: T.res -{"start": {"line": 0, "character": 0}, "end": {"line": 0, "character": 0}} +TextDocumentEdit: file:///not_compiled/T.res +{"end":{"character":1,"line":16},"start":{"character":0,"line":12}} newText: <--here // ^xfm @@ -81,8 +82,8 @@ let b = 1 // ^xfm -TextDocumentEdit: not_compiled/DocTemplate.res -{"start": {"line": 12, "character": 0}, "end": {"line": 16, "character": 1}} +TextDocumentEdit: file:///not_compiled/DocTemplate.res +{"end":{"character":1,"line":16},"start":{"character":0,"line":12}} newText: <--here @@ -91,8 +92,8 @@ Xform not_compiled/DocTemplate.res 14:6 can't find module DocTemplate Hit: Add Documentation template -TextDocumentEdit: DocTemplate.res -{"start": {"line": 14, "character": 2}, "end": {"line": 14, "character": 11}} +TextDocumentEdit: file:///not_compiled/DocTemplate.res +{"end":{"character":11,"line":14},"start":{"character":2,"line":14}} newText: <--here /** @@ -101,10 +102,10 @@ newText: let b = 1 Hit: Extract local module "T" to file "T.res" -CreateFile: T.res +CreateFile: file:///not_compiled/T.res -TextDocumentEdit: T.res -{"start": {"line": 0, "character": 0}, "end": {"line": 0, "character": 0}} +TextDocumentEdit: file:///not_compiled/T.res +{"end":{"character":1,"line":16},"start":{"character":0,"line":12}} newText: <--here // ^xfm @@ -112,8 +113,8 @@ let b = 1 // ^xfm -TextDocumentEdit: not_compiled/DocTemplate.res -{"start": {"line": 12, "character": 0}, "end": {"line": 16, "character": 1}} +TextDocumentEdit: file:///not_compiled/DocTemplate.res +{"end":{"character":1,"line":16},"start":{"character":0,"line":12}} newText: <--here @@ -122,8 +123,8 @@ Xform not_compiled/DocTemplate.res 18:2 can't find module DocTemplate Hit: Add Documentation template -TextDocumentEdit: DocTemplate.res -{"start": {"line": 17, "character": 0}, "end": {"line": 18, "character": 46}} +TextDocumentEdit: file:///not_compiled/DocTemplate.res +{"end":{"character":46,"line":18},"start":{"character":0,"line":17}} newText: <--here /** diff --git a/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.resi.txt b/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.resi.txt index aa8c9675901..5d00b2d3e67 100644 --- a/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.resi.txt +++ b/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.resi.txt @@ -1,8 +1,9 @@ +null Xform not_compiled/DocTemplate.resi 3:3 Hit: Add Documentation template -TextDocumentEdit: DocTemplate.resi -{"start": {"line": 3, "character": 0}, "end": {"line": 5, "character": 9}} +TextDocumentEdit: file:///not_compiled/DocTemplate.resi +{"end":{"character":9,"line":5},"start":{"character":0,"line":3}} newText: <--here /** @@ -15,8 +16,8 @@ and e = C Xform not_compiled/DocTemplate.resi 6:15 Hit: Add Documentation template -TextDocumentEdit: DocTemplate.resi -{"start": {"line": 6, "character": 0}, "end": {"line": 6, "character": 33}} +TextDocumentEdit: file:///not_compiled/DocTemplate.resi +{"end":{"character":33,"line":6},"start":{"character":0,"line":6}} newText: <--here /** @@ -27,8 +28,8 @@ newText: Xform not_compiled/DocTemplate.resi 8:4 Hit: Add Documentation template -TextDocumentEdit: DocTemplate.resi -{"start": {"line": 8, "character": 0}, "end": {"line": 8, "character": 10}} +TextDocumentEdit: file:///not_compiled/DocTemplate.resi +{"end":{"character":10,"line":8},"start":{"character":0,"line":8}} newText: <--here /** @@ -39,8 +40,8 @@ let a: int Xform not_compiled/DocTemplate.resi 10:4 Hit: Add Documentation template -TextDocumentEdit: DocTemplate.resi -{"start": {"line": 10, "character": 0}, "end": {"line": 10, "character": 19}} +TextDocumentEdit: file:///not_compiled/DocTemplate.resi +{"end":{"character":19,"line":10},"start":{"character":0,"line":10}} newText: <--here /** @@ -51,8 +52,8 @@ let inc: int => int Xform not_compiled/DocTemplate.resi 12:7 Hit: Add Documentation template -TextDocumentEdit: DocTemplate.resi -{"start": {"line": 12, "character": 0}, "end": {"line": 16, "character": 1}} +TextDocumentEdit: file:///not_compiled/DocTemplate.resi +{"end":{"character":1,"line":16},"start":{"character":0,"line":12}} newText: <--here /** @@ -67,8 +68,8 @@ module T: { Xform not_compiled/DocTemplate.resi 14:6 Hit: Add Documentation template -TextDocumentEdit: DocTemplate.resi -{"start": {"line": 14, "character": 2}, "end": {"line": 14, "character": 12}} +TextDocumentEdit: file:///not_compiled/DocTemplate.resi +{"end":{"character":12,"line":14},"start":{"character":2,"line":14}} newText: <--here /** @@ -79,8 +80,8 @@ newText: Xform not_compiled/DocTemplate.resi 18:2 Hit: Add Documentation template -TextDocumentEdit: DocTemplate.resi -{"start": {"line": 17, "character": 0}, "end": {"line": 18, "character": 46}} +TextDocumentEdit: file:///not_compiled/DocTemplate.resi +{"end":{"character":46,"line":18},"start":{"character":0,"line":17}} newText: <--here /** diff --git a/tests/analysis_tests/tests/not_compiled/expected/SemanticTokens.res.txt b/tests/analysis_tests/tests/not_compiled/expected/SemanticTokens.res.txt index b21f43d7adb..9bf5d6730b2 100644 --- a/tests/analysis_tests/tests/not_compiled/expected/SemanticTokens.res.txt +++ b/tests/analysis_tests/tests/not_compiled/expected/SemanticTokens.res.txt @@ -1 +1,3 @@ -{"data":[0,4,4,1,0,1,2,1,3,0,0,1,4,7,0]} +null +{ "data": [ 0, 4, 4, 1, 0, 1, 2, 1, 3, 0, 0, 1, 4, 7, 0 ] } + diff --git a/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensArray.res.txt b/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensArray.res.txt index 92a36a99618..6373b002dde 100644 --- a/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensArray.res.txt +++ b/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensArray.res.txt @@ -1 +1,3 @@ -{"data":[0,4,2,1,0,1,4,2,1,0,0,9,2,1,0]} +null +{ "data": [ 0, 4, 2, 1, 0, 1, 4, 2, 1, 0, 0, 9, 2, 1, 0 ] } + diff --git a/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensArrayAccess.res.txt b/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensArrayAccess.res.txt index 858e9ef372e..e51c1d07b98 100644 --- a/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensArrayAccess.res.txt +++ b/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensArrayAccess.res.txt @@ -1 +1,7 @@ -{"data":[0,4,1,1,0,0,4,2,1,0,1,4,1,1,0,0,4,2,1,0,0,3,5,1,0]} +null +{ + "data": [ + 0, 4, 1, 1, 0, 0, 4, 2, 1, 0, 1, 4, 1, 1, 0, 0, 4, 2, 1, 0, 0, 3, 5, 1, 0 + ] +} + diff --git a/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensArrayMutation.res.txt b/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensArrayMutation.res.txt index 4d3810f43b4..89056f70c91 100644 --- a/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensArrayMutation.res.txt +++ b/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensArrayMutation.res.txt @@ -1 +1,3 @@ -{"data":[0,0,2,1,0]} +null +{ "data": [ 0, 0, 2, 1, 0 ] } + diff --git a/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensDict.res.txt b/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensDict.res.txt index 747a90d8b35..11b44f3fdee 100644 --- a/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensDict.res.txt +++ b/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensDict.res.txt @@ -1 +1,3 @@ -{"data":[0,4,1,1,0,0,16,3,1,0]} +null +{ "data": [ 0, 4, 1, 1, 0, 0, 16, 3, 1, 0 ] } + diff --git a/tests/analysis_tests/tests/src/expected/ArrayUtils.res.txt b/tests/analysis_tests/tests/src/expected/ArrayUtils.res.txt index e69de29bb2d..19765bd501b 100644 --- a/tests/analysis_tests/tests/src/expected/ArrayUtils.res.txt +++ b/tests/analysis_tests/tests/src/expected/ArrayUtils.res.txt @@ -0,0 +1 @@ +null diff --git a/tests/analysis_tests/tests/src/expected/Auto.res.txt b/tests/analysis_tests/tests/src/expected/Auto.res.txt index ae30d752338..f73194d4a8b 100644 --- a/tests/analysis_tests/tests/src/expected/Auto.res.txt +++ b/tests/analysis_tests/tests/src/expected/Auto.res.txt @@ -1,3 +1,9 @@ +null Hover src/Auto.res 2:13 -{"contents": {"kind": "markdown", "value": "```rescript\n('a => 'b, list<'a>) => list<'b>\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\n('a => 'b, list<'a>) => list<'b>\n```" + } +} diff --git a/tests/analysis_tests/tests/src/expected/BrokenParserCases.res.txt b/tests/analysis_tests/tests/src/expected/BrokenParserCases.res.txt index 9a1b5290d7e..a8fb58e26b5 100644 --- a/tests/analysis_tests/tests/src/expected/BrokenParserCases.res.txt +++ b/tests/analysis_tests/tests/src/expected/BrokenParserCases.res.txt @@ -1,3 +1,4 @@ +null Complete src/BrokenParserCases.res 2:24 posCursor:[2:24] posNoWhite:[2:23] Found expr:[2:11->2:30] Pexp_apply ...[2:11->2:17] (~isOff2:19->2:24=...[2:27->2:29]) diff --git a/tests/analysis_tests/tests/src/expected/CodeLens.res.txt b/tests/analysis_tests/tests/src/expected/CodeLens.res.txt index e75a2865164..2461edc1985 100644 --- a/tests/analysis_tests/tests/src/expected/CodeLens.res.txt +++ b/tests/analysis_tests/tests/src/expected/CodeLens.res.txt @@ -1,12 +1,32 @@ +null Code Lens src/CodeLens.res -[{ - "range": {"start": {"line": 4, "character": 4}, "end": {"line": 4, "character": 6}}, - "command": {"title": "(~opt1: int=?, ~a: int, ~b: int, unit, ~opt2: int=?, unit, ~c: int) => int", "command": ""} - }, { - "range": {"start": {"line": 2, "character": 4}, "end": {"line": 2, "character": 7}}, - "command": {"title": "(~age: int, ~name: string) => string", "command": ""} - }, { - "range": {"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 7}}, - "command": {"title": "(int, int) => int", "command": ""} - }] +[ + { + "command": { + "command": "", + "title": "(~opt1: int=?, ~a: int, ~b: int, unit, ~opt2: int=?, unit, ~c: int) => int" + }, + "range": { + "end": { "character": 6, "line": 4 }, + "start": { "character": 4, "line": 4 } + } + }, + { + "command": { + "command": "", + "title": "(~age: int, ~name: string) => string" + }, + "range": { + "end": { "character": 7, "line": 2 }, + "start": { "character": 4, "line": 2 } + } + }, + { + "command": { "command": "", "title": "(int, int) => int" }, + "range": { + "end": { "character": 7, "line": 0 }, + "start": { "character": 4, "line": 0 } + } + } +] diff --git a/tests/analysis_tests/tests/src/expected/Codemod.res.txt b/tests/analysis_tests/tests/src/expected/Codemod.res.txt index 5e4783d5dd5..f6bad1233ec 100644 --- a/tests/analysis_tests/tests/src/expected/Codemod.res.txt +++ b/tests/analysis_tests/tests/src/expected/Codemod.res.txt @@ -1,3 +1,4 @@ +null Codemod AddMissingCasessrc/Codemod.res 3:10 switch (v1, v2) { // ^c-a (#valid, #valid) | (#invalid, _) diff --git a/tests/analysis_tests/tests/src/expected/CompletableComponent.res.txt b/tests/analysis_tests/tests/src/expected/CompletableComponent.res.txt index e69de29bb2d..19765bd501b 100644 --- a/tests/analysis_tests/tests/src/expected/CompletableComponent.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletableComponent.res.txt @@ -0,0 +1 @@ +null diff --git a/tests/analysis_tests/tests/src/expected/CompletePrioritize1.res.txt b/tests/analysis_tests/tests/src/expected/CompletePrioritize1.res.txt index 76eb966f013..9857fee0d03 100644 --- a/tests/analysis_tests/tests/src/expected/CompletePrioritize1.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletePrioritize1.res.txt @@ -1,3 +1,4 @@ +null Complete src/CompletePrioritize1.res 6:6 posCursor:[6:6] posNoWhite:[6:5] Found expr:[6:3->0:-1] Completable: Cpath Value[a]-> @@ -9,11 +10,15 @@ Path a CPPipe pathFromEnv:Test found:true Path Test. Path -[{ - "label": "Test.name", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => int", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "Test.name", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/CompletePrioritize2.res.txt b/tests/analysis_tests/tests/src/expected/CompletePrioritize2.res.txt index 8c196abdd5d..e7a002e30a8 100644 --- a/tests/analysis_tests/tests/src/expected/CompletePrioritize2.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletePrioritize2.res.txt @@ -1,3 +1,4 @@ +null Complete src/CompletePrioritize2.res 9:7 posCursor:[9:7] posNoWhite:[9:6] Found expr:[9:3->0:-1] Completable: Cpath Value[ax]-> @@ -9,13 +10,17 @@ Path ax CPPipe pathFromEnv:Test found:true Path Test. Path -[{ - "label": "Test.add", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => int", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "Test.add", + "tags": [] + } +] Complete src/CompletePrioritize2.res 12:5 posCursor:[12:5] posNoWhite:[12:4] Found expr:[12:3->12:5] @@ -25,11 +30,18 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[ax] Path ax -[{ - "label": "ax", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "Test.t", - "documentation": {"kind": "markdown", "value": "```rescript\ntype t = {name: int}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype t = {name: int}\n```" + }, + "kind": 12, + "label": "ax", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/Completion.res.txt b/tests/analysis_tests/tests/src/expected/Completion.res.txt index 33a37cf95bf..ce3fb370e53 100644 --- a/tests/analysis_tests/tests/src/expected/Completion.res.txt +++ b/tests/analysis_tests/tests/src/expected/Completion.res.txt @@ -1,3 +1,4 @@ +null Complete src/Completion.res 1:11 posCursor:[1:11] posNoWhite:[1:10] Found expr:[1:3->1:11] Pexp_ident MyList.m:[1:3->1:11] @@ -6,37 +7,68 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[MyList, m] Path MyList.m -[{ - "label": "mapReverse", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(list<'a>, 'a => 'b) => list<'b>", - "documentation": {"kind": "markdown", "value": "\n`mapReverse(list, f)` is equivalent to `map` function.\n\n## Examples\n\n```rescript\nlet f = x => x * x\nlet l = list{3, 4, 5}\n\nlet withMap = List.map(l, f)->List.reverse\nlet withMapReverse = l->List.mapReverse(f)\n\nConsole.log(withMap == withMapReverse) // true\n```\n"} - }, { - "label": "mapReverse2", + "documentation": { + "kind": "markdown", + "value": "\n`mapReverse(list, f)` is equivalent to `map` function.\n\n## Examples\n\n```rescript\nlet f = x => x * x\nlet l = list{3, 4, 5}\n\nlet withMap = List.map(l, f)->List.reverse\nlet withMapReverse = l->List.mapReverse(f)\n\nConsole.log(withMap == withMapReverse) // true\n```\n" + }, "kind": 12, - "tags": [], + "label": "mapReverse", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(list<'a>, list<'b>, ('a, 'b) => 'c) => list<'c>", - "documentation": {"kind": "markdown", "value": "\n`mapReverse2(list1, list2, f)` is equivalent to `List.zipBy(list1, list2, f)->List.reverse`.\n\n## Examples\n\n```rescript\nList.mapReverse2(list{1, 2, 3}, list{1, 2}, (a, b) => a + b) == list{4, 2}\n```\n"} - }, { - "label": "make", + "documentation": { + "kind": "markdown", + "value": "\n`mapReverse2(list1, list2, f)` is equivalent to `List.zipBy(list1, list2, f)->List.reverse`.\n\n## Examples\n\n```rescript\nList.mapReverse2(list{1, 2, 3}, list{1, 2}, (a, b) => a + b) == list{4, 2}\n```\n" + }, "kind": 12, - "tags": [], + "label": "mapReverse2", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(~length: int, 'a) => list<'a>", - "documentation": {"kind": "markdown", "value": "\n`make(length, value)` returns a list of length `length` with each element filled\nwith `value`. Returns an empty list if `value` is negative.\n\n## Examples\n\n```rescript\nList.make(~length=3, 1) == list{1, 1, 1}\n```\n"} - }, { - "label": "mapWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`make(length, value)` returns a list of length `length` with each element filled\nwith `value`. Returns an empty list if `value` is negative.\n\n## Examples\n\n```rescript\nList.make(~length=3, 1) == list{1, 1, 1}\n```\n" + }, "kind": 12, - "tags": [], + "label": "make", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(list<'a>, ('a, int) => 'b) => list<'b>", - "documentation": {"kind": "markdown", "value": "\n`mapWithIndex(list, f)` applies `f` to each element of `list`. Function `f`\ntakes two arguments: the index starting from 0 and the element from `list`, in\nthat order.\n\n## Examples\n\n```rescript\nlist{1, 2, 3}->List.mapWithIndex((x, index) => index + x) == list{1, 3, 5}\n```\n"} - }, { - "label": "map", + "documentation": { + "kind": "markdown", + "value": "\n`mapWithIndex(list, f)` applies `f` to each element of `list`. Function `f`\ntakes two arguments: the index starting from 0 and the element from `list`, in\nthat order.\n\n## Examples\n\n```rescript\nlist{1, 2, 3}->List.mapWithIndex((x, index) => index + x) == list{1, 3, 5}\n```\n" + }, "kind": 12, - "tags": [], + "label": "mapWithIndex", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(list<'a>, 'a => 'b) => list<'b>", - "documentation": {"kind": "markdown", "value": "\n`map(list, f)` returns a new list with `f` applied to each element of `list`.\n\n## Examples\n\n```rescript\nlist{1, 2}->List.map(x => x + 1) == list{2, 3}\n```\n"} - }] + "documentation": { + "kind": "markdown", + "value": "\n`map(list, f)` returns a new list with `f` applied to each element of `list`.\n\n## Examples\n\n```rescript\nlist{1, 2}->List.map(x => x + 1) == list{2, 3}\n```\n" + }, + "kind": 12, + "label": "map", + "tags": [] + } +] Complete src/Completion.res 3:9 posCursor:[3:9] posNoWhite:[3:8] Found expr:[3:3->3:9] @@ -46,613 +78,1217 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[Array, ""] Path Array. -[{ - "label": "splice", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(\n array<'a>,\n ~start: int,\n ~remove: int,\n ~insert: array<'a>,\n) => unit", - "documentation": {"kind": "markdown", "value": "\n`splice(array, ~start, ~remove, ~insert)` removes `remove` items starting at `start` and inserts the values from `insert`.\n\nBeware this will *mutate* the array.\n\nSee [`Array.splice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice) on MDN.\n\n## Examples\n\n```rescript\nlet items = [\"a\", \"b\", \"c\"]\nitems->Array.splice(~start=1, ~remove=1, ~insert=[\"x\"])\nitems == [\"a\", \"x\", \"c\"]\n```\n"} - }, { - "label": "concat", + "documentation": { + "kind": "markdown", + "value": "\n`splice(array, ~start, ~remove, ~insert)` removes `remove` items starting at `start` and inserts the values from `insert`.\n\nBeware this will *mutate* the array.\n\nSee [`Array.splice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice) on MDN.\n\n## Examples\n\n```rescript\nlet items = [\"a\", \"b\", \"c\"]\nitems->Array.splice(~start=1, ~remove=1, ~insert=[\"x\"])\nitems == [\"a\", \"x\", \"c\"]\n```\n" + }, "kind": 12, - "tags": [], + "label": "splice", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, array<'a>) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`concat(array1, array2)` concatenates the two arrays, creating a new array.\n\nSee [`Array.concat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat) on MDN.\n\n## Examples\n\n```rescript\nlet array1 = [\"hi\", \"hello\"]\nlet array2 = [\"yay\", \"wehoo\"]\n\nlet someArray = array1->Array.concat(array2)\n\nsomeArray == [\"hi\", \"hello\", \"yay\", \"wehoo\"]\n```\n"} - }, { - "label": "filterMap", + "documentation": { + "kind": "markdown", + "value": "\n`concat(array1, array2)` concatenates the two arrays, creating a new array.\n\nSee [`Array.concat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat) on MDN.\n\n## Examples\n\n```rescript\nlet array1 = [\"hi\", \"hello\"]\nlet array2 = [\"yay\", \"wehoo\"]\n\nlet someArray = array1->Array.concat(array2)\n\nsomeArray == [\"hi\", \"hello\", \"yay\", \"wehoo\"]\n```\n" + }, "kind": 12, - "tags": [], + "label": "concat", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a => option<'b>) => array<'b>", - "documentation": {"kind": "markdown", "value": "\n`filterMap(array, fn)`\n\nCalls `fn` for each element and returns a new array containing results of the `fn` calls which are not `None`.\n\n## Examples\n\n```rescript\n[\"Hello\", \"Hi\", \"Good bye\"]->Array.filterMap(item =>\n switch item {\n | \"Hello\" => Some(item->String.length)\n | _ => None\n }\n) == [5]\n\n[1, 2, 3, 4, 5, 6]->Array.filterMap(n => mod(n, 2) == 0 ? Some(n * n) : None) == [4, 16, 36]\n\nArray.filterMap([1, 2, 3, 4, 5, 6], _ => None) == []\n\nArray.filterMap([], n => mod(n, 2) == 0 ? Some(n * n) : None) == []\n```\n"} - }, { - "label": "findLastWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`filterMap(array, fn)`\n\nCalls `fn` for each element and returns a new array containing results of the `fn` calls which are not `None`.\n\n## Examples\n\n```rescript\n[\"Hello\", \"Hi\", \"Good bye\"]->Array.filterMap(item =>\n switch item {\n | \"Hello\" => Some(item->String.length)\n | _ => None\n }\n) == [5]\n\n[1, 2, 3, 4, 5, 6]->Array.filterMap(n => mod(n, 2) == 0 ? Some(n * n) : None) == [4, 16, 36]\n\nArray.filterMap([1, 2, 3, 4, 5, 6], _ => None) == []\n\nArray.filterMap([], n => mod(n, 2) == 0 ? Some(n * n) : None) == []\n```\n" + }, "kind": 12, - "tags": [], + "label": "filterMap", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, ('a, int) => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findLastWithIndex(array, checker)` returns the last element of `array` where the provided `checker` function returns true.\n\nSee [`Array.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findLast) on MDN.\n\n## Examples\n\n```rescript\nlet array = [1, 2, 3]\n\narray->Array.findLastWithIndex((item, index) => index < 2 && item > 0) == Some(2)\n```\n"} - }, { - "label": "findLast", + "documentation": { + "kind": "markdown", + "value": "\n`findLastWithIndex(array, checker)` returns the last element of `array` where the provided `checker` function returns true.\n\nSee [`Array.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findLast) on MDN.\n\n## Examples\n\n```rescript\nlet array = [1, 2, 3]\n\narray->Array.findLastWithIndex((item, index) => index < 2 && item > 0) == Some(2)\n```\n" + }, "kind": 12, - "tags": [], + "label": "findLastWithIndex", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findLast(array, checker)` returns the last element of `array` where the provided `checker` function returns true.\n\nSee [`Array.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findLast) on MDN.\n\n## Examples\n\n```rescript\nlet array = [1, 2, 3]\n\narray->Array.findLast(item => item > 0) == Some(3)\n```\n"} - }, { - "label": "shift", + "documentation": { + "kind": "markdown", + "value": "\n`findLast(array, checker)` returns the last element of `array` where the provided `checker` function returns true.\n\nSee [`Array.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findLast) on MDN.\n\n## Examples\n\n```rescript\nlet array = [1, 2, 3]\n\narray->Array.findLast(item => item > 0) == Some(3)\n```\n" + }, "kind": 12, - "tags": [], + "label": "findLast", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "array<'a> => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`shift(array)` removes the first item in the array, and returns it.\n\nBeware this will *mutate* the array.\n\nSee [`Array.shift`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/shift) on MDN.\n\n## Examples\n\n```rescript\nlet someArray = [\"hi\", \"hello\"]\n\nsomeArray->Array.shift == Some(\"hi\")\n\nsomeArray == [\"hello\"] // Notice first item is gone.\n```\n"} - }, { - "label": "findMap", + "documentation": { + "kind": "markdown", + "value": "\n`shift(array)` removes the first item in the array, and returns it.\n\nBeware this will *mutate* the array.\n\nSee [`Array.shift`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/shift) on MDN.\n\n## Examples\n\n```rescript\nlet someArray = [\"hi\", \"hello\"]\n\nsomeArray->Array.shift == Some(\"hi\")\n\nsomeArray == [\"hello\"] // Notice first item is gone.\n```\n" + }, "kind": 12, - "tags": [], + "label": "shift", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a => option<'b>) => option<'b>", - "documentation": {"kind": "markdown", "value": "\n`findMap(arr, fn)`\n\nCalls `fn` for each element and returns the first value from `fn` that is `Some(_)`.\nOtherwise returns `None`\n\n## Examples\n\n```rescript\nArray.findMap([1, 2, 3], n => mod(n, 2) == 0 ? Some(n - 2) : None) == Some(0)\n\nArray.findMap([1, 2, 3, 4, 5, 6], n => mod(n, 2) == 0 ? Some(n - 8) : None) == Some(-6)\n\nArray.findMap([1, 2, 3, 4, 5, 6], _ => None) == None\n\nArray.findMap([], n => mod(n, 2) == 0 ? Some(n * n) : None) == None\n```\n"} - }, { - "label": "concatMany", + "documentation": { + "kind": "markdown", + "value": "\n`findMap(arr, fn)`\n\nCalls `fn` for each element and returns the first value from `fn` that is `Some(_)`.\nOtherwise returns `None`\n\n## Examples\n\n```rescript\nArray.findMap([1, 2, 3], n => mod(n, 2) == 0 ? Some(n - 2) : None) == Some(0)\n\nArray.findMap([1, 2, 3, 4, 5, 6], n => mod(n, 2) == 0 ? Some(n - 8) : None) == Some(-6)\n\nArray.findMap([1, 2, 3, 4, 5, 6], _ => None) == None\n\nArray.findMap([], n => mod(n, 2) == 0 ? Some(n * n) : None) == None\n```\n" + }, "kind": 12, - "tags": [], + "label": "findMap", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, array>) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`concatMany(array1, arrays)` concatenates array1 with several other arrays, creating a new array.\n\nSee [`Array.concat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat) on MDN.\n\n## Examples\n```rescript\nlet array1 = [\"hi\", \"hello\"]\nlet array2 = [\"yay\"]\nlet array3 = [\"wehoo\"]\n\nlet someArray = array1->Array.concatMany([array2, array3])\n\nConsole.log(someArray) // [\"hi\", \"hello\", \"yay\", \"wehoo\"]\n```\n"} - }, { - "label": "joinWith", + "documentation": { + "kind": "markdown", + "value": "\n`concatMany(array1, arrays)` concatenates array1 with several other arrays, creating a new array.\n\nSee [`Array.concat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat) on MDN.\n\n## Examples\n```rescript\nlet array1 = [\"hi\", \"hello\"]\nlet array2 = [\"yay\"]\nlet array3 = [\"wehoo\"]\n\nlet someArray = array1->Array.concatMany([array2, array3])\n\nConsole.log(someArray) // [\"hi\", \"hello\", \"yay\", \"wehoo\"]\n```\n" + }, "kind": 12, - "tags": [1], + "label": "concatMany", + "tags": [] + }, + { + "data": null, + "deprecated": true, "detail": "(array, string) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `join` instead\n\n\n`joinWith(array, separator)` produces a string where all items of `array` are printed, separated by `separator`. Array items must be strings, to join number or other arrays, use `joinWithUnsafe`. Under the hood this will run JavaScript's `toString` on all the array items.\n\n## Examples\n\n```rescript\n[\"One\", \"Two\", \"Three\"]->Array.joinWith(\" -- \") == \"One -- Two -- Three\"\n```\n"} - }, { - "label": "joinWithUnsafe", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `join` instead\n\n\n`joinWith(array, separator)` produces a string where all items of `array` are printed, separated by `separator`. Array items must be strings, to join number or other arrays, use `joinWithUnsafe`. Under the hood this will run JavaScript's `toString` on all the array items.\n\n## Examples\n\n```rescript\n[\"One\", \"Two\", \"Three\"]->Array.joinWith(\" -- \") == \"One -- Two -- Three\"\n```\n" + }, "kind": 12, - "tags": [1], + "label": "joinWith", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": true, "detail": "(array<'a>, string) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `joinUnsafe` instead\n\n\n`joinWithUnsafe(array, separator)` produces a string where all items of `array` are printed, separated by `separator`. Under the hood this will run JavaScript's `toString` on all the array items.\n\n## Examples\n\n```rescript\n[1, 2, 3]->Array.joinWithUnsafe(\" -- \") == \"1 -- 2 -- 3\"\n```\n"} - }, { - "label": "reduceRight", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `joinUnsafe` instead\n\n\n`joinWithUnsafe(array, separator)` produces a string where all items of `array` are printed, separated by `separator`. Under the hood this will run JavaScript's `toString` on all the array items.\n\n## Examples\n\n```rescript\n[1, 2, 3]->Array.joinWithUnsafe(\" -- \") == \"1 -- 2 -- 3\"\n```\n" + }, "kind": 12, - "tags": [], + "label": "joinWithUnsafe", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'b, ('b, 'a) => 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceRight(xs, init, fn)`\n\nWorks like `Array.reduce`; except that function `fn` is applied to each item of `xs` from the last back to the first.\n\n## Examples\n\n```rescript\nArray.reduceRight([\"a\", \"b\", \"c\", \"d\"], \"\", (a, b) => a ++ b) == \"dcba\"\n\nArray.reduceRight([1, 2, 3], list{}, List.add) == list{1, 2, 3}\n\nArray.reduceRight([], list{}, List.add) == list{}\n```\n"} - }, { - "label": "reduceRightWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`reduceRight(xs, init, fn)`\n\nWorks like `Array.reduce`; except that function `fn` is applied to each item of `xs` from the last back to the first.\n\n## Examples\n\n```rescript\nArray.reduceRight([\"a\", \"b\", \"c\", \"d\"], \"\", (a, b) => a ++ b) == \"dcba\"\n\nArray.reduceRight([1, 2, 3], list{}, List.add) == list{1, 2, 3}\n\nArray.reduceRight([], list{}, List.add) == list{}\n```\n" + }, "kind": 12, - "tags": [], + "label": "reduceRight", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'b, ('b, 'a, int) => 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceRightWithIndex(xs, init, fn)`\n\nLike `reduceRight`, but with an additional index argument on the callback function.\n\n## Examples\n\n```rescript\nArray.reduceRightWithIndex([1, 2, 3, 4], 0, (acc, x, i) => acc + x + i) == 16\n\nArray.reduceRightWithIndex([], list{}, (acc, v, i) => list{v + i, ...acc}) == list{}\n```\n"} - }, { - "label": "toShuffled", + "documentation": { + "kind": "markdown", + "value": "\n`reduceRightWithIndex(xs, init, fn)`\n\nLike `reduceRight`, but with an additional index argument on the callback function.\n\n## Examples\n\n```rescript\nArray.reduceRightWithIndex([1, 2, 3, 4], 0, (acc, x, i) => acc + x + i) == 16\n\nArray.reduceRightWithIndex([], list{}, (acc, v, i) => list{v + i, ...acc}) == list{}\n```\n" + }, "kind": 12, - "tags": [], + "label": "reduceRightWithIndex", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "array<'a> => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`toShuffled(array)` returns a new array with all items in `array` in a random order.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet shuffledArray = array->Array.toShuffled\nConsole.log(shuffledArray)\n\nArray.toShuffled([1, 2, 3])->Array.length == 3\n```\n"} - }, { - "label": "getSymbol", + "documentation": { + "kind": "markdown", + "value": "\n`toShuffled(array)` returns a new array with all items in `array` in a random order.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet shuffledArray = array->Array.toShuffled\nConsole.log(shuffledArray)\n\nArray.toShuffled([1, 2, 3])->Array.length == 3\n```\n" + }, "kind": 12, - "tags": [], + "label": "toShuffled", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, Symbol.t) => option<'b>", - "documentation": {"kind": "markdown", "value": "\n`getSymbol(array, key)` retrieves the value stored under the symbol `key`, if present.\n\nSee [`Symbol`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) on MDN for more details about symbol keys.\n\n## Examples\n\n```rescript\nlet key = Symbol.make(\"meta\")\nlet items = []\nitems->Array.setSymbol(key, \"hello\")\nArray.getSymbol(items, key) == Some(\"hello\")\n```\n"} - }, { - "label": "getSymbolUnsafe", + "documentation": { + "kind": "markdown", + "value": "\n`getSymbol(array, key)` retrieves the value stored under the symbol `key`, if present.\n\nSee [`Symbol`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) on MDN for more details about symbol keys.\n\n## Examples\n\n```rescript\nlet key = Symbol.make(\"meta\")\nlet items = []\nitems->Array.setSymbol(key, \"hello\")\nArray.getSymbol(items, key) == Some(\"hello\")\n```\n" + }, "kind": 12, - "tags": [], + "label": "getSymbol", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, Symbol.t) => 'b", - "documentation": {"kind": "markdown", "value": "\n`getSymbolUnsafe(array, key)` retrieves the value stored under the symbol `key` without any safety checks.\n\nSee [`Symbol`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) on MDN.\n\n## Examples\n\n```rescript\nlet key = Symbol.make(\"meta\")\nlet items = []\nitems->Array.setSymbol(key, \"hello\")\nArray.getSymbolUnsafe(items, key) == \"hello\"\n```\n"} - }, { - "label": "findIndexOpt", + "documentation": { + "kind": "markdown", + "value": "\n`getSymbolUnsafe(array, key)` retrieves the value stored under the symbol `key` without any safety checks.\n\nSee [`Symbol`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) on MDN.\n\n## Examples\n\n```rescript\nlet key = Symbol.make(\"meta\")\nlet items = []\nitems->Array.setSymbol(key, \"hello\")\nArray.getSymbolUnsafe(items, key) == \"hello\"\n```\n" + }, "kind": 12, - "tags": [], + "label": "getSymbolUnsafe", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a => bool) => option", - "documentation": {"kind": "markdown", "value": "\n`findIndexOpt(array, checker)` returns the index of the first element of `array` where the provided `checker` function returns true.\n\nReturns `None` if no item matches.\n\nSee [`Array.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex) on MDN.\n\n## Examples\n\n```rescript\ntype languages = ReScript | TypeScript | JavaScript\n\nlet array = [ReScript, TypeScript, JavaScript]\n\narray->Array.findIndexOpt(item => item == ReScript) == Some(0)\n```\n"} - }, { - "label": "shuffle", + "documentation": { + "kind": "markdown", + "value": "\n`findIndexOpt(array, checker)` returns the index of the first element of `array` where the provided `checker` function returns true.\n\nReturns `None` if no item matches.\n\nSee [`Array.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex) on MDN.\n\n## Examples\n\n```rescript\ntype languages = ReScript | TypeScript | JavaScript\n\nlet array = [ReScript, TypeScript, JavaScript]\n\narray->Array.findIndexOpt(item => item == ReScript) == Some(0)\n```\n" + }, "kind": 12, - "tags": [], + "label": "findIndexOpt", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "array<'a> => unit", - "documentation": {"kind": "markdown", "value": "\n`shuffle(array)` randomizes the position of all items in `array`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\narray->Array.shuffle\nConsole.log(array)\n\nlet array2 = [1, 2, 3]\narray2->Array.shuffle\n\narray2->Array.length == 3\n```\n"} - }, { - "label": "copy", + "documentation": { + "kind": "markdown", + "value": "\n`shuffle(array)` randomizes the position of all items in `array`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\narray->Array.shuffle\nConsole.log(array)\n\nlet array2 = [1, 2, 3]\narray2->Array.shuffle\n\narray2->Array.length == 3\n```\n" + }, "kind": 12, - "tags": [], + "label": "shuffle", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "array<'a> => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`copy(array)` makes a copy of the array with the items in it, but does not make copies of the items themselves.\n\n## Examples\n\n```rescript\nlet myArray = [1, 2, 3]\nlet copyOfMyArray = myArray->Array.copy\n\ncopyOfMyArray == [1, 2, 3]\n(myArray === copyOfMyArray) == false\n```\n"} - }, { - "label": "setUnsafe", + "documentation": { + "kind": "markdown", + "value": "\n`copy(array)` makes a copy of the array with the items in it, but does not make copies of the items themselves.\n\n## Examples\n\n```rescript\nlet myArray = [1, 2, 3]\nlet copyOfMyArray = myArray->Array.copy\n\ncopyOfMyArray == [1, 2, 3]\n(myArray === copyOfMyArray) == false\n```\n" + }, "kind": 12, - "tags": [], + "label": "copy", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, int, 'a) => unit", - "documentation": {"kind": "markdown", "value": "\n`setUnsafe(array, index, item)` sets the provided `item` at `index` of `array`.\n\nBeware this will *mutate* the array, and is *unsafe*.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\narray->Array.setUnsafe(1, \"Hello\")\n\narray[1] == Some(\"Hello\")\n```\n"} - }, { - "label": "findIndexWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`setUnsafe(array, index, item)` sets the provided `item` at `index` of `array`.\n\nBeware this will *mutate* the array, and is *unsafe*.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\narray->Array.setUnsafe(1, \"Hello\")\n\narray[1] == Some(\"Hello\")\n```\n" + }, "kind": 12, - "tags": [], + "label": "setUnsafe", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, ('a, int) => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findIndexWithIndex(array, checker)` returns the index of the first element of `array` where the provided `checker` function returns true.\n\nReturns `-1` if the item does not exist. Consider using `Array.findIndexOpt` if you want an option instead (where `-1` would be `None`).\n\nSee [`Array.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex) on MDN.\n\n## Examples\n\n```rescript\ntype languages = ReScript | TypeScript | JavaScript\n\nlet array = [ReScript, JavaScript]\n\nlet isReScriptFirst =\n array->Array.findIndexWithIndex((item, index) => index === 0 && item == ReScript)\nlet isTypeScriptFirst =\n array->Array.findIndexWithIndex((item, index) => index === 0 && item == TypeScript)\n\nisReScriptFirst == 0\nisTypeScriptFirst == -1\n```\n"} - }, { - "label": "someWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findIndexWithIndex(array, checker)` returns the index of the first element of `array` where the provided `checker` function returns true.\n\nReturns `-1` if the item does not exist. Consider using `Array.findIndexOpt` if you want an option instead (where `-1` would be `None`).\n\nSee [`Array.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex) on MDN.\n\n## Examples\n\n```rescript\ntype languages = ReScript | TypeScript | JavaScript\n\nlet array = [ReScript, JavaScript]\n\nlet isReScriptFirst =\n array->Array.findIndexWithIndex((item, index) => index === 0 && item == ReScript)\nlet isTypeScriptFirst =\n array->Array.findIndexWithIndex((item, index) => index === 0 && item == TypeScript)\n\nisReScriptFirst == 0\nisTypeScriptFirst == -1\n```\n" + }, "kind": 12, - "tags": [], + "label": "findIndexWithIndex", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, ('a, int) => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`someWithIndex(array, checker)` returns true if running the provided `checker` function on any element in `array` returns true.\n\nSee [`Array.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\n\narray->Array.someWithIndex((greeting, index) => greeting === \"Hello\" && index === 0) == true\n```\n"} - }, { - "label": "slice", + "documentation": { + "kind": "markdown", + "value": "\n`someWithIndex(array, checker)` returns true if running the provided `checker` function on any element in `array` returns true.\n\nSee [`Array.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\n\narray->Array.someWithIndex((greeting, index) => greeting === \"Hello\" && index === 0) == true\n```\n" + }, "kind": 12, - "tags": [], + "label": "someWithIndex", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, ~start: int=?, ~end: int=?) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`slice(array, ~start, ~end)` creates a new array of items copied from `array` from `start` until (but not including) `end`.\n\nSee [`Array.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) on MDN.\n\n## Examples\n\n```rescript\n[1, 2, 3, 4]->Array.slice(~start=1, ~end=3) == [2, 3]\n[1, 2, 3, 4]->Array.slice(~start=1) == [2, 3, 4]\n[1, 2, 3, 4]->Array.slice == [1, 2, 3, 4]\n```\n"} - }, { - "label": "zip", + "documentation": { + "kind": "markdown", + "value": "\n`slice(array, ~start, ~end)` creates a new array of items copied from `array` from `start` until (but not including) `end`.\n\nSee [`Array.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) on MDN.\n\n## Examples\n\n```rescript\n[1, 2, 3, 4]->Array.slice(~start=1, ~end=3) == [2, 3]\n[1, 2, 3, 4]->Array.slice(~start=1) == [2, 3, 4]\n[1, 2, 3, 4]->Array.slice == [1, 2, 3, 4]\n```\n" + }, "kind": 12, - "tags": [], + "label": "slice", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(t<'a>, array<'b>) => array<('a, 'b)>", - "documentation": {"kind": "markdown", "value": "\n`zip(a, b)` create an array of pairs from corresponding elements of a and b.\nStop with the shorter array.\n\n## Examples\n\n```rescript\nArray.zip([1, 2], [3, 4, 5]) == [(1, 3), (2, 4)]\n```\n"} - }, { - "label": "fillToEnd", + "documentation": { + "kind": "markdown", + "value": "\n`zip(a, b)` create an array of pairs from corresponding elements of a and b.\nStop with the shorter array.\n\n## Examples\n\n```rescript\nArray.zip([1, 2], [3, 4, 5]) == [(1, 3), (2, 4)]\n```\n" + }, "kind": 12, - "tags": [1], + "label": "zip", + "tags": [] + }, + { + "data": null, + "deprecated": true, "detail": "(array<'a>, 'a, ~start: int) => unit", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(array, value, ~start)` fills `array` with `value` from the `start` index.\n\nBeware this will *mutate* the array.\n\nSee [`Array.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill) on MDN.\n\n## Examples\n\n```rescript\nlet myArray = [1, 2, 3, 4]\nmyArray->Array.fillToEnd(9, ~start=1)\nmyArray == [1, 9, 9, 9]\n```\n"} - }, { - "label": "includes", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(array, value, ~start)` fills `array` with `value` from the `start` index.\n\nBeware this will *mutate* the array.\n\nSee [`Array.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill) on MDN.\n\n## Examples\n\n```rescript\nlet myArray = [1, 2, 3, 4]\nmyArray->Array.fillToEnd(9, ~start=1)\nmyArray == [1, 9, 9, 9]\n```\n" + }, "kind": 12, - "tags": [], + "label": "fillToEnd", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a) => bool", - "documentation": {"kind": "markdown", "value": "\n`includes(array, item)` checks whether `array` includes `item`, by doing a [strict check for equality](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Strict_equality).\n\nSee [`Array.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes) on MDN.\n\n## Examples\n\n```rescript\n[1, 2]->Array.includes(1) == true\n[1, 2]->Array.includes(3) == false\n\n[{\"language\": \"ReScript\"}]->Array.includes({\"language\": \"ReScript\"}) == false // false, because of strict equality\n```\n"} - }, { - "label": "findLastIndex", + "documentation": { + "kind": "markdown", + "value": "\n`includes(array, item)` checks whether `array` includes `item`, by doing a [strict check for equality](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Strict_equality).\n\nSee [`Array.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes) on MDN.\n\n## Examples\n\n```rescript\n[1, 2]->Array.includes(1) == true\n[1, 2]->Array.includes(3) == false\n\n[{\"language\": \"ReScript\"}]->Array.includes({\"language\": \"ReScript\"}) == false // false, because of strict equality\n```\n" + }, "kind": 12, - "tags": [], + "label": "includes", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findLastIndex(array, checker)` returns the index of the last element of `array` where the provided `checker` function returns true.\n\nReturns `-1` if the item does not exist. Consider using `Array.findLastIndexOpt` if you want an option instead (where `-1` would be `None`).\n\nSee [`Array.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findLastIndex) on MDN.\n\n## Examples\n\n```rescript\ntype languages = ReScript | TypeScript | JavaScript\n\nlet array = [ReScript, JavaScript, ReScript]\n\narray->Array.findLastIndex(item => item == ReScript) == 2\n\narray->Array.findLastIndex(item => item == TypeScript) == -1\n```\n"} - }, { - "label": "fromInitializer", + "documentation": { + "kind": "markdown", + "value": "\n`findLastIndex(array, checker)` returns the index of the last element of `array` where the provided `checker` function returns true.\n\nReturns `-1` if the item does not exist. Consider using `Array.findLastIndexOpt` if you want an option instead (where `-1` would be `None`).\n\nSee [`Array.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findLastIndex) on MDN.\n\n## Examples\n\n```rescript\ntype languages = ReScript | TypeScript | JavaScript\n\nlet array = [ReScript, JavaScript, ReScript]\n\narray->Array.findLastIndex(item => item == ReScript) == 2\n\narray->Array.findLastIndex(item => item == TypeScript) == -1\n```\n" + }, "kind": 12, - "tags": [], + "label": "findLastIndex", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(~length: int, int => 'a) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`fromInitializer(~length, f)`\n\nCreates an array of length `length` initialized with the value returned from `f ` for each index.\n\n## Examples\n\n```rescript\nArray.fromInitializer(~length=3, i => i + 3) == [3, 4, 5]\n\nArray.fromInitializer(~length=7, i => i + 3) == [3, 4, 5, 6, 7, 8, 9]\n```\n"} - }, { - "label": "find", + "documentation": { + "kind": "markdown", + "value": "\n`fromInitializer(~length, f)`\n\nCreates an array of length `length` initialized with the value returned from `f ` for each index.\n\n## Examples\n\n```rescript\nArray.fromInitializer(~length=3, i => i + 3) == [3, 4, 5]\n\nArray.fromInitializer(~length=7, i => i + 3) == [3, 4, 5, 6, 7, 8, 9]\n```\n" + }, "kind": 12, - "tags": [], + "label": "fromInitializer", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`find(array, checker)` returns the first element of `array` where the provided `checker` function returns true.\n\nSee [`Array.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find) on MDN.\n\n## Examples\n\n```rescript\ntype languages = ReScript | TypeScript | JavaScript\n\nlet array = [ReScript, TypeScript, JavaScript]\n\narray->Array.find(item => item == ReScript) == Some(ReScript)\n```\n"} - }, { - "label": "make", + "documentation": { + "kind": "markdown", + "value": "\n`find(array, checker)` returns the first element of `array` where the provided `checker` function returns true.\n\nSee [`Array.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find) on MDN.\n\n## Examples\n\n```rescript\ntype languages = ReScript | TypeScript | JavaScript\n\nlet array = [ReScript, TypeScript, JavaScript]\n\narray->Array.find(item => item == ReScript) == Some(ReScript)\n```\n" + }, "kind": 12, - "tags": [], + "label": "find", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(~length: int, 'a) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`make(~length, init)` creates an array of length `length` initialized with the value of `init`.\n\n## Examples\n\n```rescript\nArray.make(~length=3, #apple) == [#apple, #apple, #apple]\nArray.make(~length=6, 7) == [7, 7, 7, 7, 7, 7]\n```\n"} - }, { - "label": "lastIndexOfFrom", + "documentation": { + "kind": "markdown", + "value": "\n`make(~length, init)` creates an array of length `length` initialized with the value of `init`.\n\n## Examples\n\n```rescript\nArray.make(~length=3, #apple) == [#apple, #apple, #apple]\nArray.make(~length=6, 7) == [7, 7, 7, 7, 7, 7]\n```\n" + }, "kind": 12, - "tags": [1], + "label": "make", + "tags": [] + }, + { + "data": null, + "deprecated": true, "detail": "(array<'a>, 'a, int) => int", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `lastIndexOf` instead\n\n"} - }, { - "label": "toLocaleString", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `lastIndexOf` instead\n\n" + }, "kind": 12, - "tags": [], + "label": "lastIndexOfFrom", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": false, "detail": "array<'a> => string", - "documentation": {"kind": "markdown", "value": "\n`toLocaleString(array)` converts each element to a locale-aware string and joins them with commas.\n\nSee [`Array.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toLocaleString) on MDN.\n\n## Examples\n\n```rescript\n[\"apple\", \"banana\"]->Array.toLocaleString == \"apple,banana\"\n```\n"} - }, { - "label": "toSpliced", + "documentation": { + "kind": "markdown", + "value": "\n`toLocaleString(array)` converts each element to a locale-aware string and joins them with commas.\n\nSee [`Array.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toLocaleString) on MDN.\n\n## Examples\n\n```rescript\n[\"apple\", \"banana\"]->Array.toLocaleString == \"apple,banana\"\n```\n" + }, "kind": 12, - "tags": [], + "label": "toLocaleString", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(\n array<'a>,\n ~start: int,\n ~remove: int,\n ~insert: array<'a>,\n) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`toSpliced(array, ~start, ~remove, ~insert)` returns a new array with the same edits that `splice` would perform, leaving the original unchanged.\n\nSee [`Array.toSpliced`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toSpliced) on MDN.\n\n## Examples\n\n```rescript\nlet original = [1, 2, 3]\nlet updated = original->Array.toSpliced(~start=1, ~remove=1, ~insert=[10])\nupdated == [1, 10, 3]\noriginal == [1, 2, 3]\n```\n"} - }, { - "label": "sort", + "documentation": { + "kind": "markdown", + "value": "\n`toSpliced(array, ~start, ~remove, ~insert)` returns a new array with the same edits that `splice` would perform, leaving the original unchanged.\n\nSee [`Array.toSpliced`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toSpliced) on MDN.\n\n## Examples\n\n```rescript\nlet original = [1, 2, 3]\nlet updated = original->Array.toSpliced(~start=1, ~remove=1, ~insert=[10])\nupdated == [1, 10, 3]\noriginal == [1, 2, 3]\n```\n" + }, "kind": 12, - "tags": [], + "label": "toSpliced", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, ('a, 'a) => Ordering.t) => unit", - "documentation": {"kind": "markdown", "value": "\n`sort(array, comparator)` sorts `array` in-place using the `comparator` function.\n\nBeware this will *mutate* the array.\n\nSee [`Array.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) on MDN.\n\n## Examples\n\n```rescript\nlet array = [3, 2, 1]\narray->Array.sort((a, b) => float(a - b))\narray == [1, 2, 3]\n```\n"} - }, { - "label": "filterMapWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`sort(array, comparator)` sorts `array` in-place using the `comparator` function.\n\nBeware this will *mutate* the array.\n\nSee [`Array.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) on MDN.\n\n## Examples\n\n```rescript\nlet array = [3, 2, 1]\narray->Array.sort((a, b) => float(a - b))\narray == [1, 2, 3]\n```\n" + }, "kind": 12, - "tags": [], + "label": "sort", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, ('a, int) => option<'b>) => array<'b>", - "documentation": {"kind": "markdown", "value": "\n`filterMapWithIndex(array, fn)`\n\nCalls `fn` for each element and returns a new array containing results of the `fn` calls which are not `None`.\n\n## Examples\n\n```rescript\n[\"Hello\", \"Hi\", \"Good bye\"]->Array.filterMapWithIndex((item, index) =>\n switch item {\n | \"Hello\" => Some(index)\n | _ => None\n }\n) == [0]\n```\n"} - }, { - "label": "length", + "documentation": { + "kind": "markdown", + "value": "\n`filterMapWithIndex(array, fn)`\n\nCalls `fn` for each element and returns a new array containing results of the `fn` calls which are not `None`.\n\n## Examples\n\n```rescript\n[\"Hello\", \"Hi\", \"Good bye\"]->Array.filterMapWithIndex((item, index) =>\n switch item {\n | \"Hello\" => Some(index)\n | _ => None\n }\n) == [0]\n```\n" + }, "kind": 12, - "tags": [], + "label": "filterMapWithIndex", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "array<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`length(array)` returns the length of (i.e. number of items in) the array.\n\nSee [`Array.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/length) on MDN.\n\n## Examples\n\n```rescript\nlet someArray = [\"hi\", \"hello\"]\n\nsomeArray->Array.length == 2\n```\n"} - }, { - "label": "every", + "documentation": { + "kind": "markdown", + "value": "\n`length(array)` returns the length of (i.e. number of items in) the array.\n\nSee [`Array.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/length) on MDN.\n\n## Examples\n\n```rescript\nlet someArray = [\"hi\", \"hello\"]\n\nsomeArray->Array.length == 2\n```\n" + }, "kind": 12, - "tags": [], + "label": "length", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`every(array, predicate)` returns true if `predicate` returns true for all items in `array`.\n\nSee [`Array.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every) on MDN.\n\n## Examples\n\n```rescript\nlet array = [1, 2, 3, 4]\n\narray->Array.every(num => num <= 4) == true\n\narray->Array.every(num => num === 1) == false\n```\n"} - }, { - "label": "flat", + "documentation": { + "kind": "markdown", + "value": "\n`every(array, predicate)` returns true if `predicate` returns true for all items in `array`.\n\nSee [`Array.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every) on MDN.\n\n## Examples\n\n```rescript\nlet array = [1, 2, 3, 4]\n\narray->Array.every(num => num <= 4) == true\n\narray->Array.every(num => num === 1) == false\n```\n" + }, "kind": 12, - "tags": [], + "label": "every", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "array> => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`flat(arrays)` concatenates an array of arrays into a single array.\n\nSee [`Array.flat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat) on MDN.\n\n## Examples\n\n```rescript\n[[1], [2], [3, 4]]->Array.flat == [1, 2, 3, 4]\n```\n"} - }, { - "label": "map", + "documentation": { + "kind": "markdown", + "value": "\n`flat(arrays)` concatenates an array of arrays into a single array.\n\nSee [`Array.flat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat) on MDN.\n\n## Examples\n\n```rescript\n[[1], [2], [3, 4]]->Array.flat == [1, 2, 3, 4]\n```\n" + }, "kind": 12, - "tags": [], + "label": "flat", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a => 'b) => array<'b>", - "documentation": {"kind": "markdown", "value": "\n`map(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray = array->Array.map(greeting => greeting ++ \" to you\")\n\nmappedArray == [\"Hello to you\", \"Hi to you\", \"Good bye to you\"]\n```\n"} - }, { - "label": "zipBy", + "documentation": { + "kind": "markdown", + "value": "\n`map(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray = array->Array.map(greeting => greeting ++ \" to you\")\n\nmappedArray == [\"Hello to you\", \"Hi to you\", \"Good bye to you\"]\n```\n" + }, "kind": 12, - "tags": [], + "label": "map", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(t<'a>, array<'b>, ('a, 'b) => 'c) => array<'c>", - "documentation": {"kind": "markdown", "value": "\n`zipBy(xs, ys, f)` create an array by applying `f` to corresponding elements of\n`xs` and `ys`. Stops with shorter array.\n\nEquivalent to `map(zip(xs, ys), ((a, b)) => f(a, b))`\n\n## Examples\n\n```rescript\nArray.zipBy([1, 2, 3], [4, 5], (a, b) => 2 * a + b) == [6, 9]\n```\n"} - }, { - "label": "with", + "documentation": { + "kind": "markdown", + "value": "\n`zipBy(xs, ys, f)` create an array by applying `f` to corresponding elements of\n`xs` and `ys`. Stops with shorter array.\n\nEquivalent to `map(zip(xs, ys), ((a, b)) => f(a, b))`\n\n## Examples\n\n```rescript\nArray.zipBy([1, 2, 3], [4, 5], (a, b) => 2 * a + b) == [6, 9]\n```\n" + }, "kind": 12, - "tags": [], + "label": "zipBy", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, int, 'a) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`with(array, index, value)` returns a copy of `array` where the element at `index` is replaced with `value`.\n\nSee [`Array.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/with) on MDN.\n\n## Examples\n\n```rescript\nlet original = [\"a\", \"b\", \"c\"]\nlet replaced = original->Array.with(1, \"x\")\nreplaced == [\"a\", \"x\", \"c\"]\noriginal == [\"a\", \"b\", \"c\"]\n```\n"} - }, { - "label": "lastIndexOfOpt", + "documentation": { + "kind": "markdown", + "value": "\n`with(array, index, value)` returns a copy of `array` where the element at `index` is replaced with `value`.\n\nSee [`Array.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/with) on MDN.\n\n## Examples\n\n```rescript\nlet original = [\"a\", \"b\", \"c\"]\nlet replaced = original->Array.with(1, \"x\")\nreplaced == [\"a\", \"x\", \"c\"]\noriginal == [\"a\", \"b\", \"c\"]\n```\n" + }, "kind": 12, - "tags": [], + "label": "with", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a) => option", - "documentation": null - }, { - "label": "toReversed", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "lastIndexOfOpt", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "array<'a> => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`toReversed(array)` creates a new array with all items from `array` in reversed order.\n\nSee [`Array.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet someArray = [\"hi\", \"hello\"]\nlet reversed = someArray->Array.toReversed\n\nreversed == [\"hello\", \"hi\"]\nsomeArray == [\"hi\", \"hello\"] // Original unchanged\n```\n"} - }, { - "label": "copyWithin", + "documentation": { + "kind": "markdown", + "value": "\n`toReversed(array)` creates a new array with all items from `array` in reversed order.\n\nSee [`Array.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet someArray = [\"hi\", \"hello\"]\nlet reversed = someArray->Array.toReversed\n\nreversed == [\"hello\", \"hi\"]\nsomeArray == [\"hi\", \"hello\"] // Original unchanged\n```\n" + }, "kind": 12, - "tags": [], + "label": "toReversed", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(\n array<'a>,\n ~target: int,\n ~start: int,\n ~end: int=?,\n) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`copyWithin(array, ~target, ~start, ~end)` copies starting at element `start` in the given array up to but not including `end` to the designated `target` position, returning the resulting array.\n\nBeware this will *mutate* the array.\n\nSee [`Array.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet arr = [100, 101, 102, 103, 104, 105]\narr->Array.copyWithin(~target=1, ~start=2, ~end=5) == [100, 102, 103, 104, 104, 105]\narr == [100, 102, 103, 104, 104, 105]\n```\n"} - }, { - "label": "toString", + "documentation": { + "kind": "markdown", + "value": "\n`copyWithin(array, ~target, ~start, ~end)` copies starting at element `start` in the given array up to but not including `end` to the designated `target` position, returning the resulting array.\n\nBeware this will *mutate* the array.\n\nSee [`Array.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet arr = [100, 101, 102, 103, 104, 105]\narr->Array.copyWithin(~target=1, ~start=2, ~end=5) == [100, 102, 103, 104, 104, 105]\narr == [100, 102, 103, 104, 104, 105]\n```\n" + }, "kind": 12, - "tags": [], + "label": "copyWithin", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "array<'a> => string", - "documentation": {"kind": "markdown", "value": "\n`toString(array)` stringifies `array` by running `toString` on all of the array elements and joining them with \",\".\n\nSee [`Array.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString) on MDN.\n\n## Examples\n\n```rescript\n[1, 2, 3, 4]->Array.toString == \"1,2,3,4\"\n```\n"} - }, { - "label": "everyWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`toString(array)` stringifies `array` by running `toString` on all of the array elements and joining them with \",\".\n\nSee [`Array.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString) on MDN.\n\n## Examples\n\n```rescript\n[1, 2, 3, 4]->Array.toString == \"1,2,3,4\"\n```\n" + }, "kind": 12, - "tags": [], + "label": "toString", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, ('a, int) => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`everyWithIndex(array, checker)` returns true if all items in `array` returns true when running the provided `checker` function.\n\nSee [`Array.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every) on MDN.\n\n## Examples\n\n```rescript\nlet array = [1, 2, 3, 4]\n\narray->Array.everyWithIndex((num, index) => index < 5 && num <= 4) == true\n\narray->Array.everyWithIndex((num, index) => index < 2 && num >= 2) == false\n```\n"} - }, { - "label": "fill", + "documentation": { + "kind": "markdown", + "value": "\n`everyWithIndex(array, checker)` returns true if all items in `array` returns true when running the provided `checker` function.\n\nSee [`Array.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every) on MDN.\n\n## Examples\n\n```rescript\nlet array = [1, 2, 3, 4]\n\narray->Array.everyWithIndex((num, index) => index < 5 && num <= 4) == true\n\narray->Array.everyWithIndex((num, index) => index < 2 && num >= 2) == false\n```\n" + }, "kind": 12, - "tags": [], + "label": "everyWithIndex", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a, ~start: int=?, ~end: int=?) => unit", - "documentation": {"kind": "markdown", "value": "\n`fill(array, value, ~start, ~end)` fills `array` with `value` from `start` to `end`.\n\nBeware this will *mutate* the array.\n\nSee [`Array.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill) on MDN.\n\n## Examples\n\n```rescript\nlet myArray = [1, 2, 3, 4]\n\nmyArray->Array.fill(9)\nmyArray == [9, 9, 9, 9]\n\nmyArray->Array.fill(0, ~start=1)\nmyArray == [9, 0, 0, 0]\n\nmyArray->Array.fill(5, ~start=1, ~end=3)\nmyArray == [9, 5, 5, 0]\n```\n"} - }, { - "label": "findWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`fill(array, value, ~start, ~end)` fills `array` with `value` from `start` to `end`.\n\nBeware this will *mutate* the array.\n\nSee [`Array.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill) on MDN.\n\n## Examples\n\n```rescript\nlet myArray = [1, 2, 3, 4]\n\nmyArray->Array.fill(9)\nmyArray == [9, 9, 9, 9]\n\nmyArray->Array.fill(0, ~start=1)\nmyArray == [9, 0, 0, 0]\n\nmyArray->Array.fill(5, ~start=1, ~end=3)\nmyArray == [9, 5, 5, 0]\n```\n" + }, "kind": 12, - "tags": [], + "label": "fill", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, ('a, int) => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findWithIndex(array, checker)` returns the first element of `array` where the provided `checker` function returns true.\n\nSee [`Array.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find) on MDN.\n\n## Examples\n\n```rescript\ntype languages = ReScript | TypeScript | JavaScript\n\nlet array = [TypeScript, JavaScript, ReScript]\n\narray->Array.findWithIndex((item, index) => index > 1 && item == ReScript) == Some(ReScript)\n```\n"} - }, { - "label": "reverse", + "documentation": { + "kind": "markdown", + "value": "\n`findWithIndex(array, checker)` returns the first element of `array` where the provided `checker` function returns true.\n\nSee [`Array.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find) on MDN.\n\n## Examples\n\n```rescript\ntype languages = ReScript | TypeScript | JavaScript\n\nlet array = [TypeScript, JavaScript, ReScript]\n\narray->Array.findWithIndex((item, index) => index > 1 && item == ReScript) == Some(ReScript)\n```\n" + }, "kind": 12, - "tags": [], + "label": "findWithIndex", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "array<'a> => unit", - "documentation": {"kind": "markdown", "value": "\n`reverse(array)` reverses the order of the items in `array`.\n\nBeware this will *mutate* the array.\n\nSee [`Array.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse) on MDN.\n\n## Examples\n\n```rescript\nlet someArray = [\"hi\", \"hello\"]\nsomeArray->Array.reverse\n\nsomeArray == [\"hello\", \"hi\"]\n```\n"} - }, { - "label": "fromString", + "documentation": { + "kind": "markdown", + "value": "\n`reverse(array)` reverses the order of the items in `array`.\n\nBeware this will *mutate* the array.\n\nSee [`Array.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse) on MDN.\n\n## Examples\n\n```rescript\nlet someArray = [\"hi\", \"hello\"]\nsomeArray->Array.reverse\n\nsomeArray == [\"hello\", \"hi\"]\n```\n" + }, "kind": 12, - "tags": [], + "label": "reverse", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string => array", - "documentation": {"kind": "markdown", "value": "\n`fromString(str)` creates an array of each character as a separate string from the provided `str`.\n\n## Examples\n\n```rescript\nArray.fromString(\"abcde\") == [\"a\", \"b\", \"c\", \"d\", \"e\"]\n```\n"} - }, { - "label": "findLastIndexWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`fromString(str)` creates an array of each character as a separate string from the provided `str`.\n\n## Examples\n\n```rescript\nArray.fromString(\"abcde\") == [\"a\", \"b\", \"c\", \"d\", \"e\"]\n```\n" + }, "kind": 12, - "tags": [], + "label": "fromString", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, ('a, int) => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findLastIndexWithIndex(array, checker)` returns the index of the last element of `array` where the provided `checker` function returns true.\n\nReturns `-1` if the item does not exist. Consider using `Array.findLastIndexOpt` if you want an option instead (where `-1` would be `None`).\n\nSee [`Array.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findLastIndex) on MDN.\n\n## Examples\n\n```rescript\ntype languages = ReScript | TypeScript | JavaScript\n\nlet array = [ReScript, JavaScript, JavaScript, ReScript]\n\nlet isReScriptLast =\n array->Array.findLastIndexWithIndex((item, index) => index === 3 && item == ReScript)\nlet isTypeScriptLast =\n array->Array.findLastIndexWithIndex((item, index) => index === 3 && item == TypeScript)\n\nisReScriptLast == 3\nisTypeScriptLast == -1\n```\n"} - }, { - "label": "getUnsafe", + "documentation": { + "kind": "markdown", + "value": "\n`findLastIndexWithIndex(array, checker)` returns the index of the last element of `array` where the provided `checker` function returns true.\n\nReturns `-1` if the item does not exist. Consider using `Array.findLastIndexOpt` if you want an option instead (where `-1` would be `None`).\n\nSee [`Array.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findLastIndex) on MDN.\n\n## Examples\n\n```rescript\ntype languages = ReScript | TypeScript | JavaScript\n\nlet array = [ReScript, JavaScript, JavaScript, ReScript]\n\nlet isReScriptLast =\n array->Array.findLastIndexWithIndex((item, index) => index === 3 && item == ReScript)\nlet isTypeScriptLast =\n array->Array.findLastIndexWithIndex((item, index) => index === 3 && item == TypeScript)\n\nisReScriptLast == 3\nisTypeScriptLast == -1\n```\n" + }, "kind": 12, - "tags": [], + "label": "findLastIndexWithIndex", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, int) => 'a", - "documentation": {"kind": "markdown", "value": "\n`getUnsafe(array, index)` returns the element at `index` of `array`.\n\nThis is _unsafe_, meaning it will return `undefined` value if `index` does not exist in `array`.\n\nUse `Array.getUnsafe` only when you are sure the `index` exists (i.e. when using for-loop).\n\n## Examples\n```rescript\nlet array = [1, 2, 3]\nfor index in 0 to array->Array.length - 1 {\n let value = array->Array.getUnsafe(index)\n Console.log(value)\n}\n```\n"} - }, { - "label": "entries", + "documentation": { + "kind": "markdown", + "value": "\n`getUnsafe(array, index)` returns the element at `index` of `array`.\n\nThis is _unsafe_, meaning it will return `undefined` value if `index` does not exist in `array`.\n\nUse `Array.getUnsafe` only when you are sure the `index` exists (i.e. when using for-loop).\n\n## Examples\n```rescript\nlet array = [1, 2, 3]\nfor index in 0 to array->Array.length - 1 {\n let value = array->Array.getUnsafe(index)\n Console.log(value)\n}\n```\n" + }, "kind": 12, - "tags": [], + "label": "getUnsafe", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "array<'a> => IteratorObject.t<(int, 'a), unit, unknown>", - "documentation": {"kind": "markdown", "value": "\n`entries(array)` returns a new array iterator object that contains the key/value pairs for each index in the array.\n\nSee [Array.prototype.entries](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/entries) on MDN.\n\n## Examples\n\n```rescript\nlet array = [5, 6, 7]\nlet iterator: IteratorObject.t<(int, int), unit, unknown> = array->Array.entries\niterator->IteratorObject.toArray == [(0, 5), (1, 6), (2, 7)]\n```\n"} - }, { - "label": "unshiftMany", + "documentation": { + "kind": "markdown", + "value": "\n`entries(array)` returns a new array iterator object that contains the key/value pairs for each index in the array.\n\nSee [Array.prototype.entries](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/entries) on MDN.\n\n## Examples\n\n```rescript\nlet array = [5, 6, 7]\nlet iterator: IteratorObject.t<(int, int), unit, unknown> = array->Array.entries\niterator->IteratorObject.toArray == [(0, 5), (1, 6), (2, 7)]\n```\n" + }, "kind": 12, - "tags": [], + "label": "entries", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, array<'a>) => unit", - "documentation": {"kind": "markdown", "value": "\n`unshiftMany(array, itemsArray)` inserts many new items to the start of the array.\n\nBeware this will *mutate* the array.\n\nSee [`Array.push`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/unshift) on MDN.\n\n## Examples\n\n```rescript\nlet someArray = [\"hi\", \"hello\"]\nsomeArray->Array.unshiftMany([\"yay\", \"wehoo\"])\nsomeArray == [\"yay\", \"wehoo\", \"hi\", \"hello\"]\n```\n"} - }, { - "label": "lastIndexOf", + "documentation": { + "kind": "markdown", + "value": "\n`unshiftMany(array, itemsArray)` inserts many new items to the start of the array.\n\nBeware this will *mutate* the array.\n\nSee [`Array.push`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/unshift) on MDN.\n\n## Examples\n\n```rescript\nlet someArray = [\"hi\", \"hello\"]\nsomeArray->Array.unshiftMany([\"yay\", \"wehoo\"])\nsomeArray == [\"yay\", \"wehoo\", \"hi\", \"hello\"]\n```\n" + }, "kind": 12, - "tags": [], + "label": "unshiftMany", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a, ~from: int=?) => int", - "documentation": {"kind": "markdown", "value": "\n`lastIndexOf(array, item, ~from)` returns the last index of the provided `item` in `array`, searching backwards from `from`. Uses [strict check for equality](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Strict_equality) when comparing items.\n\nReturns `-1` if the item isn't found. Check out `Array.lastIndexOfOpt` for a version that returns `None` instead of `-1` if the item does not exist.\n\nSee [`Array.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf) on MDN.\n\n## Examples\n\n```rescript\n[1, 2, 1, 2]->Array.lastIndexOf(2) == 3\n[1, 2]->Array.lastIndexOf(3) == -1\n[1, 2, 1, 2]->Array.lastIndexOf(2, ~from=2) == 1\n\n[{\"language\": \"ReScript\"}]->Array.lastIndexOf({\"language\": \"ReScript\"}) == -1 // -1, because of strict equality\n```\n"} - }, { - "label": "fromIterable", + "documentation": { + "kind": "markdown", + "value": "\n`lastIndexOf(array, item, ~from)` returns the last index of the provided `item` in `array`, searching backwards from `from`. Uses [strict check for equality](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Strict_equality) when comparing items.\n\nReturns `-1` if the item isn't found. Check out `Array.lastIndexOfOpt` for a version that returns `None` instead of `-1` if the item does not exist.\n\nSee [`Array.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf) on MDN.\n\n## Examples\n\n```rescript\n[1, 2, 1, 2]->Array.lastIndexOf(2) == 3\n[1, 2]->Array.lastIndexOf(3) == -1\n[1, 2, 1, 2]->Array.lastIndexOf(2, ~from=2) == 1\n\n[{\"language\": \"ReScript\"}]->Array.lastIndexOf({\"language\": \"ReScript\"}) == -1 // -1, because of strict equality\n```\n" + }, "kind": 12, - "tags": [], + "label": "lastIndexOf", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Iterable.t<'a> => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`fromIterable(iterable)` creates an array from the provided `iterable`\n\n## Examples\n\n```rescript\nMap.fromArray([(\"foo\", 1), (\"bar\", 2)])\n->Map.values\n->IteratorObject.asIterable\n->Array.fromIterable == [1, 2]\n```\n"} - }, { - "label": "filter", + "documentation": { + "kind": "markdown", + "value": "\n`fromIterable(iterable)` creates an array from the provided `iterable`\n\n## Examples\n\n```rescript\nMap.fromArray([(\"foo\", 1), (\"bar\", 2)])\n->Map.values\n->IteratorObject.asIterable\n->Array.fromIterable == [1, 2]\n```\n" + }, "kind": 12, - "tags": [], + "label": "fromIterable", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a => bool) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`filter(array, checker)` returns a new array containing all elements from `array` for which the provided `checker` function returns true.\n\nSee [`Array.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) on MDN.\n\n## Examples\n\n```rescript\n[1, 2, 3, 4]->Array.filter(num => num > 2) == [3, 4]\n```\n"} - }, { - "label": "compare", + "documentation": { + "kind": "markdown", + "value": "\n`filter(array, checker)` returns a new array containing all elements from `array` for which the provided `checker` function returns true.\n\nSee [`Array.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) on MDN.\n\n## Examples\n\n```rescript\n[1, 2, 3, 4]->Array.filter(num => num > 2) == [3, 4]\n```\n" + }, "kind": 12, - "tags": [], + "label": "filter", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, array<'a>, ('a, 'a) => Ordering.t) => Ordering.t", - "documentation": {"kind": "markdown", "value": "\n`compare(left, right, comparator)` compares two arrays element by element using `comparator` and returns an `Ordering`.\n\n## Examples\n\n```rescript\nArray.compare([1, 3], [1, 2], Int.compare) == Ordering.greater\nArray.compare([1, 2], [1, 2], Int.compare) == Ordering.equal\n```\n"} - }, { - "label": "join", + "documentation": { + "kind": "markdown", + "value": "\n`compare(left, right, comparator)` compares two arrays element by element using `comparator` and returns an `Ordering`.\n\n## Examples\n\n```rescript\nArray.compare([1, 3], [1, 2], Int.compare) == Ordering.greater\nArray.compare([1, 2], [1, 2], Int.compare) == Ordering.equal\n```\n" + }, "kind": 12, - "tags": [], + "label": "compare", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array, string) => string", - "documentation": {"kind": "markdown", "value": "\n`join(array, separator)` produces a string where all items of `array` are printed, separated by `separator`. Array items must be strings, to join number or other arrays, use `joinUnsafe`. Under the hood this will run JavaScript's `toString` on all the array items.\n\nSee [Array.join](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join)\n\n## Examples\n\n```rescript\n[\"One\", \"Two\", \"Three\"]->Array.join(\" -- \") == \"One -- Two -- Three\"\n```\n"} - }, { - "label": "last", + "documentation": { + "kind": "markdown", + "value": "\n`join(array, separator)` produces a string where all items of `array` are printed, separated by `separator`. Array items must be strings, to join number or other arrays, use `joinUnsafe`. Under the hood this will run JavaScript's `toString` on all the array items.\n\nSee [Array.join](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join)\n\n## Examples\n\n```rescript\n[\"One\", \"Two\", \"Three\"]->Array.join(\" -- \") == \"One -- Two -- Three\"\n```\n" + }, "kind": 12, - "tags": [], + "label": "join", + "tags": [] + }, + { + "data": null, + "deprecated": false, "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\"]->Array.last == Some(\"Good bye\")\n\n[]->Array.last == None\n```\n"} - }, { - "label": "ignore", + "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\"]->Array.last == Some(\"Good bye\")\n\n[]->Array.last == None\n```\n" + }, "kind": 12, - "tags": [], + "label": "last", + "tags": [] + }, + { + "data": null, + "deprecated": false, "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 an operation with side effects)\n without having to store or process it further.\n"} - }, { - "label": "isArray", + "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" + }, "kind": 12, - "tags": [], + "label": "ignore", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "'a => bool", - "documentation": {"kind": "markdown", "value": "\n`isArray(value)` returns `true` when `value` is a JavaScript array and `false` otherwise.\n\nSee [`Array.isArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray) on MDN.\n\n## Examples\n\n```rescript\nArray.isArray([1, 2, 3]) == true\nArray.isArray(\"not an array\") == false\n```\n"} - }, { - "label": "values", + "documentation": { + "kind": "markdown", + "value": "\n`isArray(value)` returns `true` when `value` is a JavaScript array and `false` otherwise.\n\nSee [`Array.isArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray) on MDN.\n\n## Examples\n\n```rescript\nArray.isArray([1, 2, 3]) == true\nArray.isArray(\"not an array\") == false\n```\n" + }, "kind": 12, - "tags": [], + "label": "isArray", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "array<'a> => IteratorObject.t<'a, unit, unknown>", - "documentation": {"kind": "markdown", "value": "\n`values(array)` returns a new array iterator object that contains the values for each index in the array.\n\nSee [Array.prototype.values](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/values) on MDN.\n\n## Examples\n\n```rescript\nlet array = [5, 6, 7]\nlet iterator: IteratorObject.t = array->Array.values\niterator->IteratorObject.toArray == [5, 6, 7]\n```\n "} - }, { - "label": "indexOfOpt", + "documentation": { + "kind": "markdown", + "value": "\n`values(array)` returns a new array iterator object that contains the values for each index in the array.\n\nSee [Array.prototype.values](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/values) on MDN.\n\n## Examples\n\n```rescript\nlet array = [5, 6, 7]\nlet iterator: IteratorObject.t = array->Array.values\niterator->IteratorObject.toArray == [5, 6, 7]\n```\n " + }, "kind": 12, - "tags": [], + "label": "values", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a) => option", - "documentation": {"kind": "markdown", "value": "\n`indexOfOpt(array, item)` returns an option of the index of the provided `item` in `array`. Uses [strict check for equality](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Strict_equality) when comparing items.\n\nSee [`Array.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf) on MDN.\n\n## Examples\n\n```rescript\n[1, 2]->Array.indexOfOpt(2) == Some(1)\n[1, 2]->Array.indexOfOpt(3) == None\n[{\"language\": \"ReScript\"}]->Array.indexOfOpt({\"language\": \"ReScript\"}) == None // None, because of strict equality\n```\n"} - }, { - "label": "forEachWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`indexOfOpt(array, item)` returns an option of the index of the provided `item` in `array`. Uses [strict check for equality](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Strict_equality) when comparing items.\n\nSee [`Array.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf) on MDN.\n\n## Examples\n\n```rescript\n[1, 2]->Array.indexOfOpt(2) == Some(1)\n[1, 2]->Array.indexOfOpt(3) == None\n[{\"language\": \"ReScript\"}]->Array.indexOfOpt({\"language\": \"ReScript\"}) == None // None, because of strict equality\n```\n" + }, "kind": 12, - "tags": [], + "label": "indexOfOpt", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, ('a, int) => unit) => unit", - "documentation": {"kind": "markdown", "value": "\n`forEachWithIndex(array, fn)` runs the provided `fn` on every element of `array`.\n\nSee [`Array.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\n\narray->Array.forEachWithIndex((item, index) => {\n Console.log(\"At item \" ++ Int.toString(index) ++ \": \" ++ item)\n})\n```\n"} - }, { - "label": "reduce", + "documentation": { + "kind": "markdown", + "value": "\n`forEachWithIndex(array, fn)` runs the provided `fn` on every element of `array`.\n\nSee [`Array.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\n\narray->Array.forEachWithIndex((item, index) => {\n Console.log(\"At item \" ++ Int.toString(index) ++ \": \" ++ item)\n})\n```\n" + }, "kind": 12, - "tags": [], + "label": "forEachWithIndex", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'b, ('b, 'a) => 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduce(xs, init, fn)`\n\nApplies `fn` to each element of `xs` from beginning to end. Function `fn` has two parameters: the item from the list and an \"accumulator\"; which starts with a value of `init`. `reduce` returns the final value of the accumulator.\n\n## Examples\n\n```rescript\nArray.reduce([2, 3, 4], 1, (a, b) => a + b) == 10\n\nArray.reduce([\"a\", \"b\", \"c\", \"d\"], \"\", (a, b) => a ++ b) == \"abcd\"\n\n[1, 2, 3]->Array.reduce(list{}, List.add) == list{3, 2, 1}\n\nArray.reduce([], list{}, List.add) == list{}\n```\n"} - }, { - "label": "sliceToEnd", + "documentation": { + "kind": "markdown", + "value": "\n`reduce(xs, init, fn)`\n\nApplies `fn` to each element of `xs` from beginning to end. Function `fn` has two parameters: the item from the list and an \"accumulator\"; which starts with a value of `init`. `reduce` returns the final value of the accumulator.\n\n## Examples\n\n```rescript\nArray.reduce([2, 3, 4], 1, (a, b) => a + b) == 10\n\nArray.reduce([\"a\", \"b\", \"c\", \"d\"], \"\", (a, b) => a ++ b) == \"abcd\"\n\n[1, 2, 3]->Array.reduce(list{}, List.add) == list{3, 2, 1}\n\nArray.reduce([], list{}, List.add) == list{}\n```\n" + }, "kind": 12, - "tags": [1], + "label": "reduce", + "tags": [] + }, + { + "data": null, + "deprecated": true, "detail": "(array<'a>, ~start: int) => array<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(array, start)` creates a new array from `array`, with all items from `array` starting from `start`.\n\nSee [`Array.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) on MDN.\n\n## Examples\n\n```rescript\n[1, 2, 3, 4]->Array.sliceToEnd(~start=1) == [2, 3, 4]\n```\n"} - }, { - "label": "fromArrayLikeWithMap", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(array, start)` creates a new array from `array`, with all items from `array` starting from `start`.\n\nSee [`Array.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) on MDN.\n\n## Examples\n\n```rescript\n[1, 2, 3, 4]->Array.sliceToEnd(~start=1) == [2, 3, 4]\n```\n" + }, "kind": 12, - "tags": [], + "label": "sliceToEnd", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": false, "detail": "(arrayLike<'a>, 'a => 'b) => array<'b>", - "documentation": {"kind": "markdown", "value": "\n`fromArrayLikeWithMap(source, map)` converts an array-like value into an array and applies `map` to every element.\n\nSee [`Array.from`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from) on MDN.\n\n## Examples\n\n```rescript\nlet source: Array.arrayLike = %raw(`{0: 1, 1: 2, length: 2}`)\nArray.fromArrayLikeWithMap(source, x => x * 10) == [10, 20]\n```\n"} - }, { - "label": "fillAll", + "documentation": { + "kind": "markdown", + "value": "\n`fromArrayLikeWithMap(source, map)` converts an array-like value into an array and applies `map` to every element.\n\nSee [`Array.from`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from) on MDN.\n\n## Examples\n\n```rescript\nlet source: Array.arrayLike = %raw(`{0: 1, 1: 2, length: 2}`)\nArray.fromArrayLikeWithMap(source, x => x * 10) == [10, 20]\n```\n" + }, "kind": 12, - "tags": [1], + "label": "fromArrayLikeWithMap", + "tags": [] + }, + { + "data": null, + "deprecated": true, "detail": "(array<'a>, 'a) => unit", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `fill` instead\n\n\n`fillAll(array, value)` fills the entire `array` with `value`.\n\nBeware this will *mutate* the array.\n\nSee [`Array.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill) on MDN.\n\n## Examples\n\n```rescript\nlet myArray = [1, 2, 3, 4]\nmyArray->Array.fillAll(9)\nmyArray == [9, 9, 9, 9]\n```\n"} - }, { - "label": "set", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `fill` instead\n\n\n`fillAll(array, value)` fills the entire `array` with `value`.\n\nBeware this will *mutate* the array.\n\nSee [`Array.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill) on MDN.\n\n## Examples\n\n```rescript\nlet myArray = [1, 2, 3, 4]\nmyArray->Array.fillAll(9)\nmyArray == [9, 9, 9, 9]\n```\n" + }, "kind": 12, - "tags": [], + "label": "fillAll", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, int, 'a) => unit", - "documentation": {"kind": "markdown", "value": "\n`set(array, index, item)` sets the provided `item` at `index` of `array`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\narray->Array.set(1, \"Hello\")\n\narray[1] == Some(\"Hello\")\n```\n"} - }, { - "label": "isEmpty", + "documentation": { + "kind": "markdown", + "value": "\n`set(array, index, item)` sets the provided `item` at `index` of `array`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\narray->Array.set(1, \"Hello\")\n\narray[1] == Some(\"Hello\")\n```\n" + }, "kind": 12, - "tags": [], + "label": "set", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "array<'a> => bool", - "documentation": {"kind": "markdown", "value": "\n`isEmpty(array)` returns `true` if the array is empty (has length 0), `false` otherwise.\n\n## Examples\n\n```rescript\n[]->Array.isEmpty->assertEqual(true)\n[1, 2, 3]->Array.isEmpty->assertEqual(false)\n\nlet emptyArray = []\nemptyArray->Array.isEmpty->assertEqual(true)\n\nlet nonEmptyArray = [\"hello\"]\nnonEmptyArray->Array.isEmpty->assertEqual(false)\n```\n"} - }, { - "label": "filterWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`isEmpty(array)` returns `true` if the array is empty (has length 0), `false` otherwise.\n\n## Examples\n\n```rescript\n[]->Array.isEmpty->assertEqual(true)\n[1, 2, 3]->Array.isEmpty->assertEqual(false)\n\nlet emptyArray = []\nemptyArray->Array.isEmpty->assertEqual(true)\n\nlet nonEmptyArray = [\"hello\"]\nnonEmptyArray->Array.isEmpty->assertEqual(false)\n```\n" + }, "kind": 12, - "tags": [], + "label": "isEmpty", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, ('a, int) => bool) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`filterWithIndex(array, checker)` returns a new array containing all elements from `array` for which the provided `checker` function returns true.\n\nSee [`Array.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) on MDN.\n\n## Examples\n\n```rescript\n[1, 2, 3, 4]->Array.filterWithIndex((num, index) => index === 0 || num === 2) == [1, 2]\n```\n"} - }, { - "label": "findIndex", + "documentation": { + "kind": "markdown", + "value": "\n`filterWithIndex(array, checker)` returns a new array containing all elements from `array` for which the provided `checker` function returns true.\n\nSee [`Array.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) on MDN.\n\n## Examples\n\n```rescript\n[1, 2, 3, 4]->Array.filterWithIndex((num, index) => index === 0 || num === 2) == [1, 2]\n```\n" + }, "kind": 12, - "tags": [], + "label": "filterWithIndex", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findIndex(array, checker)` returns the index of the first element of `array` where the provided `checker` function returns true.\n\nReturns `-1` if the item does not exist. Consider using `Array.findIndexOpt` if you want an option instead (where `-1` would be `None`).\n\nSee [`Array.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex) on MDN.\n\n## Examples\n\n```rescript\ntype languages = ReScript | TypeScript | JavaScript\n\nlet array = [ReScript, JavaScript]\n\narray->Array.findIndex(item => item == ReScript) == 0\n\narray->Array.findIndex(item => item == TypeScript) == -1\n```\n"} - }, { - "label": "setSymbol", + "documentation": { + "kind": "markdown", + "value": "\n`findIndex(array, checker)` returns the index of the first element of `array` where the provided `checker` function returns true.\n\nReturns `-1` if the item does not exist. Consider using `Array.findIndexOpt` if you want an option instead (where `-1` would be `None`).\n\nSee [`Array.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex) on MDN.\n\n## Examples\n\n```rescript\ntype languages = ReScript | TypeScript | JavaScript\n\nlet array = [ReScript, JavaScript]\n\narray->Array.findIndex(item => item == ReScript) == 0\n\narray->Array.findIndex(item => item == TypeScript) == -1\n```\n" + }, "kind": 12, - "tags": [], + "label": "findIndex", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, Symbol.t, 'b) => unit", - "documentation": {"kind": "markdown", "value": "\n`setSymbol(array, key, value)` stores `value` under the symbol `key` on `array`.\n\nBeware this will *mutate* the array.\n\nSee [`Symbol`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) on MDN.\n\n## Examples\n\n```rescript\nlet key = Symbol.make(\"count\")\nlet items = []\nitems->Array.setSymbol(key, 5)\nArray.getSymbol(items, key) == Some(5)\n```\n"} - }, { - "label": "equal", + "documentation": { + "kind": "markdown", + "value": "\n`setSymbol(array, key, value)` stores `value` under the symbol `key` on `array`.\n\nBeware this will *mutate* the array.\n\nSee [`Symbol`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) on MDN.\n\n## Examples\n\n```rescript\nlet key = Symbol.make(\"count\")\nlet items = []\nitems->Array.setSymbol(key, 5)\nArray.getSymbol(items, key) == Some(5)\n```\n" + }, "kind": 12, - "tags": [], + "label": "setSymbol", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, array<'a>, ('a, 'a) => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`equal(left, right, predicate)` checks if the two arrays contain the same elements according to the equality `predicate`.\n\n## Examples\n\n```rescript\nArray.equal([1, 2, 3], [1, 2, 3], Int.equal) == true\nArray.equal([1, 2, 3], [1, 3, 2], Int.equal) == false\n```\n"} - }, { - "label": "concatAll", + "documentation": { + "kind": "markdown", + "value": "\n`equal(left, right, predicate)` checks if the two arrays contain the same elements according to the equality `predicate`.\n\n## Examples\n\n```rescript\nArray.equal([1, 2, 3], [1, 2, 3], Int.equal) == true\nArray.equal([1, 2, 3], [1, 3, 2], Int.equal) == false\n```\n" + }, "kind": 12, - "tags": [], + "label": "equal", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "array> => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`concatAll(arrays)` concatenates all arrays in `arrays`, creating a new array.\n\nSee [`Array.concat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat) on MDN.\n\n## Examples\n```rescript\nlet arrays = [[\"hi\", \"hello\"], [\"yay\"], [\"wehoo\"]]\n\nlet result = Array.concatAll(arrays)\n\narrays == [[\"hi\", \"hello\"], [\"yay\"], [\"wehoo\"]]\nresult == [\"hi\", \"hello\", \"yay\", \"wehoo\"]\n```\n"} - }, { - "label": "joinUnsafe", + "documentation": { + "kind": "markdown", + "value": "\n`concatAll(arrays)` concatenates all arrays in `arrays`, creating a new array.\n\nSee [`Array.concat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat) on MDN.\n\n## Examples\n```rescript\nlet arrays = [[\"hi\", \"hello\"], [\"yay\"], [\"wehoo\"]]\n\nlet result = Array.concatAll(arrays)\n\narrays == [[\"hi\", \"hello\"], [\"yay\"], [\"wehoo\"]]\nresult == [\"hi\", \"hello\", \"yay\", \"wehoo\"]\n```\n" + }, "kind": 12, - "tags": [], + "label": "concatAll", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, string) => string", - "documentation": {"kind": "markdown", "value": "\n`joinUnsafe(array, separator)` produces a string where all items of `array` are printed, separated by `separator`. Under the hood this will run JavaScript's `toString` on all the array items.\n\nSee [Array.join](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join)\n\n## Examples\n\n```rescript\n[1, 2, 3]->Array.joinUnsafe(\" -- \") == \"1 -- 2 -- 3\"\n```\n"} - }, { - "label": "mapWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`joinUnsafe(array, separator)` produces a string where all items of `array` are printed, separated by `separator`. Under the hood this will run JavaScript's `toString` on all the array items.\n\nSee [Array.join](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join)\n\n## Examples\n\n```rescript\n[1, 2, 3]->Array.joinUnsafe(\" -- \") == \"1 -- 2 -- 3\"\n```\n" + }, "kind": 12, - "tags": [], + "label": "joinUnsafe", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, ('a, int) => 'b) => array<'b>", - "documentation": {"kind": "markdown", "value": "\n`mapWithIndex(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray =\n array->Array.mapWithIndex((greeting, index) => greeting ++ \" at position \" ++ Int.toString(index))\n\nmappedArray == [\"Hello at position 0\", \"Hi at position 1\", \"Good bye at position 2\"]\n```\n"} - }, { - "label": "flatMapWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`mapWithIndex(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray =\n array->Array.mapWithIndex((greeting, index) => greeting ++ \" at position \" ++ Int.toString(index))\n\nmappedArray == [\"Hello at position 0\", \"Hi at position 1\", \"Good bye at position 2\"]\n```\n" + }, "kind": 12, - "tags": [], + "label": "mapWithIndex", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, ('a, int) => array<'b>) => array<'b>", - "documentation": {"kind": "markdown", "value": "\n`flatMapWithIndex(array, mapper)` returns a new array concatenating the arrays returned from running `mapper` on all items in `array`.\n\n## Examples\n\n```rescript\ntype language = ReScript | TypeScript | JavaScript\n\nlet array = [ReScript, TypeScript, JavaScript]\n\narray->Array.flatMapWithIndex((item, index) =>\n switch item {\n | ReScript => [index]\n | TypeScript => [index, index + 1]\n | JavaScript => [index, index + 1, index + 2]\n }\n) == [0, 1, 2, 2, 3, 4]\n```\n"} - }, { - "label": "copyWithinToEnd", + "documentation": { + "kind": "markdown", + "value": "\n`flatMapWithIndex(array, mapper)` returns a new array concatenating the arrays returned from running `mapper` on all items in `array`.\n\n## Examples\n\n```rescript\ntype language = ReScript | TypeScript | JavaScript\n\nlet array = [ReScript, TypeScript, JavaScript]\n\narray->Array.flatMapWithIndex((item, index) =>\n switch item {\n | ReScript => [index]\n | TypeScript => [index, index + 1]\n | JavaScript => [index, index + 1, index + 2]\n }\n) == [0, 1, 2, 2, 3, 4]\n```\n" + }, "kind": 12, - "tags": [1], + "label": "flatMapWithIndex", + "tags": [] + }, + { + "data": null, + "deprecated": true, "detail": "(array<'a>, ~target: int, ~start: int) => array<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(array, ~target, ~start)` copies starting at element `start` in the given array to the designated `target` position, returning the resulting array.\n\nBeware this will *mutate* the array.\n\nSee [`Array.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet arr = [100, 101, 102, 103, 104]\narr->Array.copyWithinToEnd(~target=0, ~start=2) == [102, 103, 104, 103, 104]\narr == [102, 103, 104, 103, 104]\n```\n"} - }, { - "label": "unshift", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(array, ~target, ~start)` copies starting at element `start` in the given array to the designated `target` position, returning the resulting array.\n\nBeware this will *mutate* the array.\n\nSee [`Array.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet arr = [100, 101, 102, 103, 104]\narr->Array.copyWithinToEnd(~target=0, ~start=2) == [102, 103, 104, 103, 104]\narr == [102, 103, 104, 103, 104]\n```\n" + }, "kind": 12, - "tags": [], + "label": "copyWithinToEnd", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a) => unit", - "documentation": {"kind": "markdown", "value": "\n`unshift(array, item)` inserts a new item at the start of the array.\n\nBeware this will *mutate* the array.\n\nSee [`Array.unshift`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/unshift) on MDN.\n\n## Examples\n\n```rescript\nlet someArray = [\"hi\", \"hello\"]\nsomeArray->Array.unshift(\"yay\")\nsomeArray == [\"yay\", \"hi\", \"hello\"]\n```\n"} - }, { - "label": "indexOf", + "documentation": { + "kind": "markdown", + "value": "\n`unshift(array, item)` inserts a new item at the start of the array.\n\nBeware this will *mutate* the array.\n\nSee [`Array.unshift`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/unshift) on MDN.\n\n## Examples\n\n```rescript\nlet someArray = [\"hi\", \"hello\"]\nsomeArray->Array.unshift(\"yay\")\nsomeArray == [\"yay\", \"hi\", \"hello\"]\n```\n" + }, "kind": 12, - "tags": [], + "label": "unshift", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a, ~from: int=?) => int", - "documentation": {"kind": "markdown", "value": "\n`indexOf(array, item, ~from)` returns the index of the provided `item` in `array`, starting the search at `from`. Uses [strict check for equality](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Strict_equality) when comparing items.\n\nReturns `-1` if the item isn't found. Check out `Array.indexOfOpt` for a version that returns `None` instead of `-1` if the item does not exist.\n\nSee [`Array.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf) on MDN.\n\n## Examples\n\n```rescript\n[1, 2]->Array.indexOf(2) == 1\n[1, 2]->Array.indexOf(3) == -1\n[1, 2, 1, 2]->Array.indexOf(2, ~from=2) == 3\n\n[{\"language\": \"ReScript\"}]->Array.indexOf({\"language\": \"ReScript\"}) == -1 // -1, because of strict equality\n```\n"} - }, { - "label": "push", + "documentation": { + "kind": "markdown", + "value": "\n`indexOf(array, item, ~from)` returns the index of the provided `item` in `array`, starting the search at `from`. Uses [strict check for equality](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Strict_equality) when comparing items.\n\nReturns `-1` if the item isn't found. Check out `Array.indexOfOpt` for a version that returns `None` instead of `-1` if the item does not exist.\n\nSee [`Array.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf) on MDN.\n\n## Examples\n\n```rescript\n[1, 2]->Array.indexOf(2) == 1\n[1, 2]->Array.indexOf(3) == -1\n[1, 2, 1, 2]->Array.indexOf(2, ~from=2) == 3\n\n[{\"language\": \"ReScript\"}]->Array.indexOf({\"language\": \"ReScript\"}) == -1 // -1, because of strict equality\n```\n" + }, "kind": 12, - "tags": [], + "label": "indexOf", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a) => unit", - "documentation": {"kind": "markdown", "value": "\n`push(array, item)` appends `item` to the end of `array`.\n\nBeware this will *mutate* the array.\n\nSee [`Array.push`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push) on MDN.\n\n## Examples\n\n```rescript\nlet someArray = [\"hi\", \"hello\"]\n\nsomeArray->Array.push(\"yay\")\n\nsomeArray == [\"hi\", \"hello\", \"yay\"]\n```\n"} - }, { - "label": "toSorted", + "documentation": { + "kind": "markdown", + "value": "\n`push(array, item)` appends `item` to the end of `array`.\n\nBeware this will *mutate* the array.\n\nSee [`Array.push`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push) on MDN.\n\n## Examples\n\n```rescript\nlet someArray = [\"hi\", \"hello\"]\n\nsomeArray->Array.push(\"yay\")\n\nsomeArray == [\"hi\", \"hello\", \"yay\"]\n```\n" + }, "kind": 12, - "tags": [], + "label": "push", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, ('a, 'a) => Ordering.t) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`toSorted(array, comparator)` returns a new, sorted array from `array`, using the `comparator` function.\n\nSee [`Array.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet someArray = [3, 2, 1]\n\nsomeArray->Array.toSorted(Int.compare) == [1, 2, 3]\n\nsomeArray == [3, 2, 1] // Original unchanged\n```\n"} - }, { - "label": "reduceWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`toSorted(array, comparator)` returns a new, sorted array from `array`, using the `comparator` function.\n\nSee [`Array.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet someArray = [3, 2, 1]\n\nsomeArray->Array.toSorted(Int.compare) == [1, 2, 3]\n\nsomeArray == [3, 2, 1] // Original unchanged\n```\n" + }, "kind": 12, - "tags": [], + "label": "toSorted", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'b, ('b, 'a, int) => 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceWithIndex(x, init, fn)`\n\nApplies `fn` to each element of `xs` from beginning to end. Function `fn` has three parameters: the item from the array and an \"accumulator\", which starts with a value of `init` and the index of each element. `reduceWithIndex` returns the final value of the accumulator.\n\n## Examples\n\n```rescript\nArray.reduceWithIndex([1, 2, 3, 4], 0, (acc, x, i) => acc + x + i) == 16\n\nArray.reduceWithIndex([1, 2, 3], list{}, (acc, v, i) => list{v + i, ...acc}) == list{5, 3, 1}\n\nArray.reduceWithIndex([], list{}, (acc, v, i) => list{v + i, ...acc}) == list{}\n```\n"} - }, { - "label": "some", + "documentation": { + "kind": "markdown", + "value": "\n`reduceWithIndex(x, init, fn)`\n\nApplies `fn` to each element of `xs` from beginning to end. Function `fn` has three parameters: the item from the array and an \"accumulator\", which starts with a value of `init` and the index of each element. `reduceWithIndex` returns the final value of the accumulator.\n\n## Examples\n\n```rescript\nArray.reduceWithIndex([1, 2, 3, 4], 0, (acc, x, i) => acc + x + i) == 16\n\nArray.reduceWithIndex([1, 2, 3], list{}, (acc, v, i) => list{v + i, ...acc}) == list{5, 3, 1}\n\nArray.reduceWithIndex([], list{}, (acc, v, i) => list{v + i, ...acc}) == list{}\n```\n" + }, "kind": 12, - "tags": [], + "label": "reduceWithIndex", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`some(array, predicate)` returns true if `predicate` returns true for any element in `array`.\n\nSee [`Array.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\n\narray->Array.some(greeting => greeting === \"Hello\") == true\n```\n"} - }, { - "label": "unsafe_get", + "documentation": { + "kind": "markdown", + "value": "\n`some(array, predicate)` returns true if `predicate` returns true for any element in `array`.\n\nSee [`Array.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\n\narray->Array.some(greeting => greeting === \"Hello\") == true\n```\n" + }, "kind": 12, - "tags": [1], + "label": "some", + "tags": [] + }, + { + "data": null, + "deprecated": true, "detail": "(array<'a>, int) => 'a", - "documentation": {"kind": "markdown", "value": "Deprecated: Use getUnsafe instead. This will be removed in v13\n\n\n`unsafe_get(array, index)` returns the element at `index` of `array`.\n\nThis is _unsafe_, meaning it will return `undefined` value if `index` does not exist in `array`.\n\nUse `Array.unsafe_get` only when you are sure the `index` exists (i.e. when using for-loop).\n\n## Examples\n\n```rescript\nlet array = [1, 2, 3]\nfor index in 0 to array->Array.length - 1 {\n let value = array->Array.unsafe_get(index)\n Console.log(value)\n}\n```\n"} - }, { - "label": "partition", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use getUnsafe instead. This will be removed in v13\n\n\n`unsafe_get(array, index)` returns the element at `index` of `array`.\n\nThis is _unsafe_, meaning it will return `undefined` value if `index` does not exist in `array`.\n\nUse `Array.unsafe_get` only when you are sure the `index` exists (i.e. when using for-loop).\n\n## Examples\n\n```rescript\nlet array = [1, 2, 3]\nfor index in 0 to array->Array.length - 1 {\n let value = array->Array.unsafe_get(index)\n Console.log(value)\n}\n```\n" + }, "kind": 12, - "tags": [], + "label": "unsafe_get", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => (t<'a>, t<'a>)", - "documentation": {"kind": "markdown", "value": "\n`partition(f, a)` split array into tuple of two arrays based on predicate `f`;\nfirst of tuple where predicate cause true, second where predicate cause false\n\n## Examples\n\n```rescript\nArray.partition([1, 2, 3, 4, 5], x => mod(x, 2) == 0) == ([2, 4], [1, 3, 5])\n\nArray.partition([1, 2, 3, 4, 5], x => mod(x, 2) != 0) == ([1, 3, 5], [2, 4])\n```\n"} - }, { - "label": "copyAllWithin", + "documentation": { + "kind": "markdown", + "value": "\n`partition(f, a)` split array into tuple of two arrays based on predicate `f`;\nfirst of tuple where predicate cause true, second where predicate cause false\n\n## Examples\n\n```rescript\nArray.partition([1, 2, 3, 4, 5], x => mod(x, 2) == 0) == ([2, 4], [1, 3, 5])\n\nArray.partition([1, 2, 3, 4, 5], x => mod(x, 2) != 0) == ([1, 3, 5], [2, 4])\n```\n" + }, "kind": 12, - "tags": [1], + "label": "partition", + "tags": [] + }, + { + "data": null, + "deprecated": true, "detail": "(array<'a>, ~target: int) => array<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `copyWithin` instead\n\n\n`isEmpty(array)` returns `true` if the array is empty (has length 0), `false` otherwise.\n\n## Examples\n\n```rescript\nlet arr = [100, 101, 102, 103, 104]\narr->Array.copyAllWithin(~target=2) == [100, 101, 100, 101, 102]\narr == [100, 101, 100, 101, 102]\n```\n"} - }, { - "label": "keepSome", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `copyWithin` instead\n\n\n`isEmpty(array)` returns `true` if the array is empty (has length 0), `false` otherwise.\n\n## Examples\n\n```rescript\nlet arr = [100, 101, 102, 103, 104]\narr->Array.copyAllWithin(~target=2) == [100, 101, 100, 101, 102]\narr == [100, 101, 100, 101, 102]\n```\n" + }, "kind": 12, - "tags": [], + "label": "copyAllWithin", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": false, "detail": "array> => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`keepSome(arr)`\n\nReturns a new array containing `value` for all elements that are `Some(value)`\nand ignoring every value that is `None`\n\n## Examples\n\n```rescript\nArray.keepSome([Some(1), None, Some(3)]) == [1, 3]\n\nArray.keepSome([Some(1), Some(2), Some(3)]) == [1, 2, 3]\n\nArray.keepSome([None, None, None]) == []\n\nArray.keepSome([]) == []\n```\n"} - }, { - "label": "at", + "documentation": { + "kind": "markdown", + "value": "\n`keepSome(arr)`\n\nReturns a new array containing `value` for all elements that are `Some(value)`\nand ignoring every value that is `None`\n\n## Examples\n\n```rescript\nArray.keepSome([Some(1), None, Some(3)]) == [1, 3]\n\nArray.keepSome([Some(1), Some(2), Some(3)]) == [1, 2, 3]\n\nArray.keepSome([None, None, None]) == []\n\nArray.keepSome([]) == []\n```\n" + }, "kind": 12, - "tags": [], + "label": "keepSome", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, int) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`at(array, index)`\n\nGet an element by its index. Negative indices count backwards from the last item.\n\n## Examples\n\n```rescript\n[\"a\", \"b\", \"c\"]->Array.at(0) == Some(\"a\")\n[\"a\", \"b\", \"c\"]->Array.at(2) == Some(\"c\")\n[\"a\", \"b\", \"c\"]->Array.at(3) == None\n[\"a\", \"b\", \"c\"]->Array.at(-1) == Some(\"c\")\n[\"a\", \"b\", \"c\"]->Array.at(-3) == Some(\"a\")\n[\"a\", \"b\", \"c\"]->Array.at(-4) == None\n```\n"} - }, { - "label": "pop", + "documentation": { + "kind": "markdown", + "value": "\n`at(array, index)`\n\nGet an element by its index. Negative indices count backwards from the last item.\n\n## Examples\n\n```rescript\n[\"a\", \"b\", \"c\"]->Array.at(0) == Some(\"a\")\n[\"a\", \"b\", \"c\"]->Array.at(2) == Some(\"c\")\n[\"a\", \"b\", \"c\"]->Array.at(3) == None\n[\"a\", \"b\", \"c\"]->Array.at(-1) == Some(\"c\")\n[\"a\", \"b\", \"c\"]->Array.at(-3) == Some(\"a\")\n[\"a\", \"b\", \"c\"]->Array.at(-4) == None\n```\n" + }, "kind": 12, - "tags": [], + "label": "at", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "array<'a> => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`pop(array)` removes the last item from `array` and returns it.\n\nBeware this will *mutate* the array.\n\nSee [`Array.pop`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/pop) on MDN.\n\n## Examples\n\n```rescript\nlet someArray = [\"hi\", \"hello\"]\n\nsomeArray->Array.pop == Some(\"hello\")\n\nsomeArray == [\"hi\"] // Notice last item is gone.\n```\n"} - }, { - "label": "get", + "documentation": { + "kind": "markdown", + "value": "\n`pop(array)` removes the last item from `array` and returns it.\n\nBeware this will *mutate* the array.\n\nSee [`Array.pop`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/pop) on MDN.\n\n## Examples\n\n```rescript\nlet someArray = [\"hi\", \"hello\"]\n\nsomeArray->Array.pop == Some(\"hello\")\n\nsomeArray == [\"hi\"] // Notice last item is gone.\n```\n" + }, "kind": 12, - "tags": [], + "label": "pop", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, int) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`get(array, index)` returns the element at `index` of `array`.\n\nReturns `None` if the index does not exist in the array. Equivalent to doing `array[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\n\narray->Array.get(0) == Some(\"Hello\")\n\narray->Array.get(3) == None\n```\n"} - }, { - "label": "asIterable", + "documentation": { + "kind": "markdown", + "value": "\n`get(array, index)` returns the element at `index` of `array`.\n\nReturns `None` if the index does not exist in the array. Equivalent to doing `array[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\n\narray->Array.get(0) == Some(\"Hello\")\n\narray->Array.get(3) == None\n```\n" + }, "kind": 12, - "tags": [], + "label": "get", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "array<'a> => Iterable.t<'a>", - "documentation": {"kind": "markdown", "value": "\n`asIterable(array)` views `array` as an `Iterable.t`.\n\nThis is useful when passing an array to APIs that consume iterables, such as\n`Array.from` or `for...of` in JavaScript.\n"} - }, { - "label": "removeInPlace", + "documentation": { + "kind": "markdown", + "value": "\n`asIterable(array)` views `array` as an `Iterable.t`.\n\nThis is useful when passing an array to APIs that consume iterables, such as\n`Array.from` or `for...of` in JavaScript.\n" + }, "kind": 12, - "tags": [], + "label": "asIterable", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, int) => unit", - "documentation": {"kind": "markdown", "value": "\n`removeInPlace(array, index)` removes the item at the specified `index` from `array`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet array = []\narray->Array.removeInPlace(0)\narray == [] // Removing from an empty array does nothing\n\nlet array2 = [\"Hello\", \"Hi\", \"Good bye\"]\narray2->Array.removeInPlace(1)\narray2 == [\"Hello\", \"Good bye\"] // Removes the item at index 1\n```\n "} - }, { - "label": "findLastIndexOpt", + "documentation": { + "kind": "markdown", + "value": "\n`removeInPlace(array, index)` removes the item at the specified `index` from `array`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet array = []\narray->Array.removeInPlace(0)\narray == [] // Removing from an empty array does nothing\n\nlet array2 = [\"Hello\", \"Hi\", \"Good bye\"]\narray2->Array.removeInPlace(1)\narray2 == [\"Hello\", \"Good bye\"] // Removes the item at index 1\n```\n " + }, "kind": 12, - "tags": [], + "label": "removeInPlace", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a => bool) => option", - "documentation": {"kind": "markdown", "value": "\n`findIndexOpt(array, checker)` returns the index of the last element of `array` where the provided `checker` function returns true.\n\nReturns `None` if no item matches.\n\nSee [`Array.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findLastIndex) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"hello\", \"world\", \"!\"]\n\narray->Array.findLastIndexOpt(item => item->String.includes(\"o\")) == Some(1)\n```\n"} - }, { - "label": "pushMany", + "documentation": { + "kind": "markdown", + "value": "\n`findIndexOpt(array, checker)` returns the index of the last element of `array` where the provided `checker` function returns true.\n\nReturns `None` if no item matches.\n\nSee [`Array.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findLastIndex) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"hello\", \"world\", \"!\"]\n\narray->Array.findLastIndexOpt(item => item->String.includes(\"o\")) == Some(1)\n```\n" + }, "kind": 12, - "tags": [], + "label": "findLastIndexOpt", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, array<'a>) => unit", - "documentation": {"kind": "markdown", "value": "\n`pushMany(array, itemsArray)` appends many new items to the end of the array.\n\nBeware this will *mutate* the array.\n\nSee [`Array.push`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push) on MDN.\n\n## Examples\n\n```rescript\nlet someArray = [\"hi\", \"hello\"]\n\nsomeArray->Array.pushMany([\"yay\", \"wehoo\"])\nsomeArray == [\"hi\", \"hello\", \"yay\", \"wehoo\"]\n```\n"} - }, { - "label": "unzip", + "documentation": { + "kind": "markdown", + "value": "\n`pushMany(array, itemsArray)` appends many new items to the end of the array.\n\nBeware this will *mutate* the array.\n\nSee [`Array.push`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push) on MDN.\n\n## Examples\n\n```rescript\nlet someArray = [\"hi\", \"hello\"]\n\nsomeArray->Array.pushMany([\"yay\", \"wehoo\"])\nsomeArray == [\"hi\", \"hello\", \"yay\", \"wehoo\"]\n```\n" + }, "kind": 12, - "tags": [], + "label": "pushMany", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "array<('a, 'b)> => (t<'a>, array<'b>)", - "documentation": {"kind": "markdown", "value": "\n`unzip(a)` takes an array of pairs and creates a pair of arrays. The first array\ncontains all the first items of the pairs; the second array contains all the\nsecond items.\n\n## Examples\n\n```rescript\nArray.unzip([(1, 2), (3, 4)]) == ([1, 3], [2, 4])\n\nArray.unzip([(1, 2), (3, 4), (5, 6), (7, 8)]) == ([1, 3, 5, 7], [2, 4, 6, 8])\n```\n"} - }, { - "label": "forEach", + "documentation": { + "kind": "markdown", + "value": "\n`unzip(a)` takes an array of pairs and creates a pair of arrays. The first array\ncontains all the first items of the pairs; the second array contains all the\nsecond items.\n\n## Examples\n\n```rescript\nArray.unzip([(1, 2), (3, 4)]) == ([1, 3], [2, 4])\n\nArray.unzip([(1, 2), (3, 4), (5, 6), (7, 8)]) == ([1, 3, 5, 7], [2, 4, 6, 8])\n```\n" + }, "kind": 12, - "tags": [], + "label": "unzip", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a => unit) => unit", - "documentation": {"kind": "markdown", "value": "\n`forEach(array, fn)` runs the provided `fn` on every element of `array`.\n\nSee [`Array.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach) on MDN.\n\n## Examples\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\n\narray->Array.forEach(item => {\n Console.log(item)\n})\n```\n"} - }, { - "label": "flatMap", + "documentation": { + "kind": "markdown", + "value": "\n`forEach(array, fn)` runs the provided `fn` on every element of `array`.\n\nSee [`Array.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach) on MDN.\n\n## Examples\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\n\narray->Array.forEach(item => {\n Console.log(item)\n})\n```\n" + }, "kind": 12, - "tags": [], + "label": "forEach", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a => array<'b>) => array<'b>", - "documentation": {"kind": "markdown", "value": "\n`flatMap(array, mapper)` returns a new array concatenating the arrays returned from running `mapper` on all items in `array`.\n\n## Examples\n\n```rescript\ntype language = ReScript | TypeScript | JavaScript\n\nlet array = [ReScript, TypeScript, JavaScript]\n\narray->Array.flatMap(item =>\n switch item {\n | ReScript => [1, 2, 3]\n | TypeScript => [4, 5, 6]\n | JavaScript => [7, 8, 9]\n }\n) == [1, 2, 3, 4, 5, 6, 7, 8, 9]\n```\n"} - }, { - "label": "fromArrayLike", + "documentation": { + "kind": "markdown", + "value": "\n`flatMap(array, mapper)` returns a new array concatenating the arrays returned from running `mapper` on all items in `array`.\n\n## Examples\n\n```rescript\ntype language = ReScript | TypeScript | JavaScript\n\nlet array = [ReScript, TypeScript, JavaScript]\n\narray->Array.flatMap(item =>\n switch item {\n | ReScript => [1, 2, 3]\n | TypeScript => [4, 5, 6]\n | JavaScript => [7, 8, 9]\n }\n) == [1, 2, 3, 4, 5, 6, 7, 8, 9]\n```\n" + }, "kind": 12, - "tags": [], + "label": "flatMap", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "arrayLike<'a> => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`fromArrayLike(source)` converts an array-like value (anything with indexed items and a `length`) into a regular array.\n\nSee [`Array.from`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from) on MDN.\n\n## Examples\n\n```rescript\nlet source: Array.arrayLike = %raw(`{0: 10, 1: 20, length: 2}`)\nArray.fromArrayLike(source) == [10, 20]\n```\n"} - }, { - "label": "indexOfFrom", + "documentation": { + "kind": "markdown", + "value": "\n`fromArrayLike(source)` converts an array-like value (anything with indexed items and a `length`) into a regular array.\n\nSee [`Array.from`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from) on MDN.\n\n## Examples\n\n```rescript\nlet source: Array.arrayLike = %raw(`{0: 10, 1: 20, length: 2}`)\nArray.fromArrayLike(source) == [10, 20]\n```\n" + }, "kind": 12, - "tags": [1], + "label": "fromArrayLike", + "tags": [] + }, + { + "data": null, + "deprecated": true, "detail": "(array<'a>, 'a, int) => int", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `indexOf` instead\n\n"} - }] + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `indexOf` instead\n\n" + }, + "kind": 12, + "label": "indexOfFrom", + "tags": [ 1 ] + } +] Complete src/Completion.res 5:10 posCursor:[5:10] posNoWhite:[5:9] Found expr:[5:3->5:10] @@ -662,25 +1298,44 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[Array, m] Path Array.m -[{ - "label": "make", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(~length: int, 'a) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`make(~length, init)` creates an array of length `length` initialized with the value of `init`.\n\n## Examples\n\n```rescript\nArray.make(~length=3, #apple) == [#apple, #apple, #apple]\nArray.make(~length=6, 7) == [7, 7, 7, 7, 7, 7]\n```\n"} - }, { - "label": "map", + "documentation": { + "kind": "markdown", + "value": "\n`make(~length, init)` creates an array of length `length` initialized with the value of `init`.\n\n## Examples\n\n```rescript\nArray.make(~length=3, #apple) == [#apple, #apple, #apple]\nArray.make(~length=6, 7) == [7, 7, 7, 7, 7, 7]\n```\n" + }, "kind": 12, - "tags": [], + "label": "make", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a => 'b) => array<'b>", - "documentation": {"kind": "markdown", "value": "\n`map(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray = array->Array.map(greeting => greeting ++ \" to you\")\n\nmappedArray == [\"Hello to you\", \"Hi to you\", \"Good bye to you\"]\n```\n"} - }, { - "label": "mapWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`map(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray = array->Array.map(greeting => greeting ++ \" to you\")\n\nmappedArray == [\"Hello to you\", \"Hi to you\", \"Good bye to you\"]\n```\n" + }, "kind": 12, - "tags": [], + "label": "map", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, ('a, int) => 'b) => array<'b>", - "documentation": {"kind": "markdown", "value": "\n`mapWithIndex(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray =\n array->Array.mapWithIndex((greeting, index) => greeting ++ \" at position \" ++ Int.toString(index))\n\nmappedArray == [\"Hello at position 0\", \"Hi at position 1\", \"Good bye at position 2\"]\n```\n"} - }] + "documentation": { + "kind": "markdown", + "value": "\n`mapWithIndex(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray =\n array->Array.mapWithIndex((greeting, index) => greeting ++ \" at position \" ++ Int.toString(index))\n\nmappedArray == [\"Hello at position 0\", \"Hi at position 1\", \"Good bye at position 2\"]\n```\n" + }, + "kind": 12, + "label": "mapWithIndex", + "tags": [] + } +] Complete src/Completion.res 15:17 posCursor:[15:17] posNoWhite:[15:16] Found expr:[15:12->15:17] @@ -690,13 +1345,20 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[Dep, c] Path Dep.c -[{ - "label": "customDouble", - "kind": 12, - "tags": [1], +[ + { + "data": null, + "deprecated": true, "detail": "int => int", - "documentation": {"kind": "markdown", "value": "Deprecated: Use customDouble instead\n\nSome doc comment"} - }] + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use customDouble instead\n\nSome doc comment" + }, + "kind": 12, + "label": "customDouble", + "tags": [ 1 ] + } +] Complete src/Completion.res 23:20 posCursor:[23:20] posNoWhite:[23:19] Found expr:[23:11->23:20] @@ -707,19 +1369,26 @@ Resolved opens 1 Stdlib ContextPath Value[Lib, foo] Path Lib.foo Found type for function (~age: int, ~name: string) => string -[{ - "label": "age", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }, { - "label": "name", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "age", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "name", + "tags": [] + } +] Complete src/Completion.res 26:13 posCursor:[26:13] posNoWhite:[26:12] Found expr:[26:3->26:13] @@ -731,19 +1400,32 @@ ContextPath array Path Stdlib.Array.m Path ArrayUtils.m Path m -[{ - "label": "Array.map", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a => 'b) => array<'b>", - "documentation": {"kind": "markdown", "value": "\n`map(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray = array->Array.map(greeting => greeting ++ \" to you\")\n\nmappedArray == [\"Hello to you\", \"Hi to you\", \"Good bye to you\"]\n```\n"} - }, { - "label": "Array.mapWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`map(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray = array->Array.map(greeting => greeting ++ \" to you\")\n\nmappedArray == [\"Hello to you\", \"Hi to you\", \"Good bye to you\"]\n```\n" + }, "kind": 12, - "tags": [], + "label": "Array.map", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, ('a, int) => 'b) => array<'b>", - "documentation": {"kind": "markdown", "value": "\n`mapWithIndex(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray =\n array->Array.mapWithIndex((greeting, index) => greeting ++ \" at position \" ++ Int.toString(index))\n\nmappedArray == [\"Hello at position 0\", \"Hi at position 1\", \"Good bye at position 2\"]\n```\n"} - }] + "documentation": { + "kind": "markdown", + "value": "\n`mapWithIndex(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray =\n array->Array.mapWithIndex((greeting, index) => greeting ++ \" at position \" ++ Int.toString(index))\n\nmappedArray == [\"Hello at position 0\", \"Hi at position 1\", \"Good bye at position 2\"]\n```\n" + }, + "kind": 12, + "label": "Array.mapWithIndex", + "tags": [] + } +] Complete src/Completion.res 29:13 posCursor:[29:13] posNoWhite:[29:12] Found expr:[29:3->29:13] @@ -754,13 +1436,20 @@ ContextPath string->toU ContextPath string Path Stdlib.String.toU Path toU -[{ - "label": "String.toUpperCase", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string => string", - "documentation": {"kind": "markdown", "value": "\n`toUpperCase(str)` converts `str` to upper case using the locale-insensitive\ncase mappings in the Unicode Character Database. Notice that the conversion can\nexpand the number of letters in the result, for example the German ß\ncapitalizes to two Ses in a row.\nSee [`String.toUpperCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase) on MDN.\n\n## Examples\n\n```rescript\nString.toUpperCase(\"abc\") == \"ABC\"\nString.toUpperCase(`Straße`) == `STRASSE`\nString.toUpperCase(`πς`) == `ΠΣ`\n```\n"} - }] + "documentation": { + "kind": "markdown", + "value": "\n`toUpperCase(str)` converts `str` to upper case using the locale-insensitive\ncase mappings in the Unicode Character Database. Notice that the conversion can\nexpand the number of letters in the result, for example the German ß\ncapitalizes to two Ses in a row.\nSee [`String.toUpperCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase) on MDN.\n\n## Examples\n\n```rescript\nString.toUpperCase(\"abc\") == \"ABC\"\nString.toUpperCase(`Straße`) == `STRASSE`\nString.toUpperCase(`πς`) == `ΠΣ`\n```\n" + }, + "kind": 12, + "label": "String.toUpperCase", + "tags": [] + } +] Complete src/Completion.res 34:8 posCursor:[34:8] posNoWhite:[34:7] Found expr:[34:3->34:8] @@ -772,13 +1461,20 @@ ContextPath Value[op] Path op Path Stdlib.Option.e Path e -[{ - "label": "Option.equal", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(option<'a>, option<'b>, ('a, 'b) => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`equal(opt1, opt2, f)` evaluates two optional values for equality with respect to a predicate function `f`. If both `opt1` and `opt2` are `None`, returns `true`.\nIf one of the arguments is `Some(value)` and the other is `None`, returns\n`false`.\nIf arguments are `Some(value1)` and `Some(value2)`, returns the result of\n`f(value1, value2)`, the predicate function `f` must return a bool.\n\n## Examples\n\n```rescript\nlet clockEqual = (a, b) => mod(a, 12) == mod(b, 12)\n\nopen Option\n\nequal(Some(3), Some(15), clockEqual) // true\nequal(Some(3), None, clockEqual) // false\nequal(None, Some(3), clockEqual) // false\nequal(None, None, clockEqual) // true\n```\n"} - }] + "documentation": { + "kind": "markdown", + "value": "\n`equal(opt1, opt2, f)` evaluates two optional values for equality with respect to a predicate function `f`. If both `opt1` and `opt2` are `None`, returns `true`.\nIf one of the arguments is `Some(value)` and the other is `None`, returns\n`false`.\nIf arguments are `Some(value1)` and `Some(value2)`, returns the result of\n`f(value1, value2)`, the predicate function `f` must return a bool.\n\n## Examples\n\n```rescript\nlet clockEqual = (a, b) => mod(a, 12) == mod(b, 12)\n\nopen Option\n\nequal(Some(3), Some(15), clockEqual) // true\nequal(Some(3), None, clockEqual) // false\nequal(None, Some(3), clockEqual) // false\nequal(None, None, clockEqual) // true\n```\n" + }, + "kind": 12, + "label": "Option.equal", + "tags": [] + } +] Complete src/Completion.res 44:7 posCursor:[44:7] posNoWhite:[44:6] Found expr:[44:3->54:3] @@ -793,19 +1489,26 @@ Path fa CPPipe pathFromEnv:ForAuto found:true Path ForAuto. Path -[{ - "label": "ForAuto.abc", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(t, int) => t", - "documentation": null - }, { - "label": "ForAuto.abd", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "ForAuto.abc", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(t, int) => t", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "ForAuto.abd", + "tags": [] + } +] Complete src/Completion.res 47:21 XXX Not found! @@ -819,13 +1522,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath CJsxPropValue [O, Comp] second Path O.Comp.make -[{ - "label": "zzz", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "zzz", + "tags": [] + } +] Complete src/Completion.res 62:23 posCursor:[62:23] posNoWhite:[62:22] Found expr:[62:14->62:23] @@ -834,34 +1541,51 @@ Completable: Cjsx([O, Comp], z, [z]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path O.Comp.make -[{ - "label": "zoo", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "option", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "zoo", + "tags": [] + } +] Complete src/Completion.res 65:8 Attribute id:reac:[65:3->65:8] label:reac Completable: Cdecorator(reac) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib -[{ - "label": "react.component", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "", - "documentation": {"kind": "markdown", "value": "The `@react.component` decorator is used to annotate functions that are RescriptReact components.\n\nYou will need this decorator whenever you want to use a ReScript / React component in ReScript JSX expressions.\n\nNote: The `@react.component` decorator requires the `jsx` config to be set in your `rescript.json` to enable the required React transformations.\n\n[Read more and see examples in the documentation](https://rescript-lang.org/syntax-lookup#react-component-decorator)."}, - "insertTextFormat": 2 - }, { - "label": "react.componentWithProps", + "documentation": { + "kind": "markdown", + "value": "The `@react.component` decorator is used to annotate functions that are RescriptReact components.\n\nYou will need this decorator whenever you want to use a ReScript / React component in ReScript JSX expressions.\n\nNote: The `@react.component` decorator requires the `jsx` config to be set in your `rescript.json` to enable the required React transformations.\n\n[Read more and see examples in the documentation](https://rescript-lang.org/syntax-lookup#react-component-decorator)." + }, + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "react.component", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "", - "documentation": {"kind": "markdown", "value": "The `@react.componentWithProps` decorator is used to annotate functions that are RescriptReact components.\n\nYou will need this decorator whenever you want to use a ReScript / React component in ReScript JSX expressions.\n\nNote: The `@react.componentWithProps` decorator requires the `jsx` config to be set in your `rescript.json` to enable the required React transformations.\n\n[Read more and see examples in the documentation](https://rescript-lang.org/syntax-lookup#react-component-with-props-decorator)."}, - "insertTextFormat": 2 - }] + "documentation": { + "kind": "markdown", + "value": "The `@react.componentWithProps` decorator is used to annotate functions that are RescriptReact components.\n\nYou will need this decorator whenever you want to use a ReScript / React component in ReScript JSX expressions.\n\nNote: The `@react.componentWithProps` decorator requires the `jsx` config to be set in your `rescript.json` to enable the required React transformations.\n\n[Read more and see examples in the documentation](https://rescript-lang.org/syntax-lookup#react-component-with-props-decorator)." + }, + "insertTextFormat": 2, + "kind": 4, + "label": "react.componentWithProps", + "tags": [] + } +] Complete src/Completion.res 68:10 posCursor:[68:10] posNoWhite:[68:9] Found expr:[0:-1->86:1] @@ -870,21 +1594,34 @@ Attribute id:react.let:[68:3->80:3] label:react. Completable: Cdecorator(react.) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib -[{ - "label": "component", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "", - "documentation": {"kind": "markdown", "value": "The `@react.component` decorator is used to annotate functions that are RescriptReact components.\n\nYou will need this decorator whenever you want to use a ReScript / React component in ReScript JSX expressions.\n\nNote: The `@react.component` decorator requires the `jsx` config to be set in your `rescript.json` to enable the required React transformations.\n\n[Read more and see examples in the documentation](https://rescript-lang.org/syntax-lookup#react-component-decorator)."}, - "insertTextFormat": 2 - }, { - "label": "componentWithProps", + "documentation": { + "kind": "markdown", + "value": "The `@react.component` decorator is used to annotate functions that are RescriptReact components.\n\nYou will need this decorator whenever you want to use a ReScript / React component in ReScript JSX expressions.\n\nNote: The `@react.component` decorator requires the `jsx` config to be set in your `rescript.json` to enable the required React transformations.\n\n[Read more and see examples in the documentation](https://rescript-lang.org/syntax-lookup#react-component-decorator)." + }, + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "component", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "", - "documentation": {"kind": "markdown", "value": "The `@react.componentWithProps` decorator is used to annotate functions that are RescriptReact components.\n\nYou will need this decorator whenever you want to use a ReScript / React component in ReScript JSX expressions.\n\nNote: The `@react.componentWithProps` decorator requires the `jsx` config to be set in your `rescript.json` to enable the required React transformations.\n\n[Read more and see examples in the documentation](https://rescript-lang.org/syntax-lookup#react-component-with-props-decorator)."}, - "insertTextFormat": 2 - }] + "documentation": { + "kind": "markdown", + "value": "The `@react.componentWithProps` decorator is used to annotate functions that are RescriptReact components.\n\nYou will need this decorator whenever you want to use a ReScript / React component in ReScript JSX expressions.\n\nNote: The `@react.componentWithProps` decorator requires the `jsx` config to be set in your `rescript.json` to enable the required React transformations.\n\n[Read more and see examples in the documentation](https://rescript-lang.org/syntax-lookup#react-component-with-props-decorator)." + }, + "insertTextFormat": 2, + "kind": 4, + "label": "componentWithProps", + "tags": [] + } +] Complete src/Completion.res 71:27 posCursor:[71:27] posNoWhite:[71:26] Found expr:[71:11->71:27] @@ -895,13 +1632,17 @@ Resolved opens 1 Stdlib ContextPath Value[Lib, foo] Path Lib.foo Found type for function (~age: int, ~name: string) => string -[{ - "label": "age", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "age", + "tags": [] + } +] Complete src/Completion.res 74:26 posCursor:[74:26] posNoWhite:[74:25] Found expr:[74:11->74:26] @@ -912,13 +1653,17 @@ Resolved opens 1 Stdlib ContextPath Value[Lib, foo] Path Lib.foo Found type for function (~age: int, ~name: string) => string -[{ - "label": "name", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "name", + "tags": [] + } +] Complete src/Completion.res 77:32 posCursor:[77:32] posNoWhite:[77:31] Found expr:[77:11->77:32] @@ -929,13 +1674,17 @@ Resolved opens 1 Stdlib ContextPath Value[Lib, foo] Path Lib.foo Found type for function (~age: int, ~name: string) => string -[{ - "label": "name", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "name", + "tags": [] + } +] Complete src/Completion.res 82:5 posCursor:[82:5] posNoWhite:[82:4] Found expr:[80:8->86:1] @@ -957,13 +1706,17 @@ Resolved opens 1 Stdlib ContextPath Value[someObj]["a"] ContextPath Value[someObj] Path someObj -[{ - "label": "age", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "age", + "tags": [] + } +] Complete src/Completion.res 95:24 posCursor:[95:24] posNoWhite:[95:23] Found expr:[95:3->99:6] @@ -976,19 +1729,26 @@ ContextPath Value[nestedObj]["x"]["y"] ContextPath Value[nestedObj]["x"] ContextPath Value[nestedObj] Path nestedObj -[{ - "label": "age", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }, { - "label": "name", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "age", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "name", + "tags": [] + } +] Complete src/Completion.res 99:7 posCursor:[99:7] posNoWhite:[99:6] Found expr:[99:3->102:20] @@ -999,13 +1759,17 @@ Resolved opens 1 Stdlib ContextPath Value[o]["a"] ContextPath Value[o] Path o -[{ - "label": "age", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "age", + "tags": [] + } +] Complete src/Completion.res 104:17 posCursor:[104:17] posNoWhite:[104:16] Found expr:[104:3->125:19] @@ -1018,19 +1782,26 @@ ContextPath Value[no]["x"]["y"] ContextPath Value[no]["x"] ContextPath Value[no] Path no -[{ - "label": "name", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }, { - "label": "age", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "name", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "age", + "tags": [] + } +] Complete src/Completion.res 110:5 posCursor:[110:5] posNoWhite:[110:4] Found expr:[110:3->110:5] @@ -1047,19 +1818,32 @@ Path r CPPipe pathFromEnv: found:true Path Completion. Path -[{ - "label": "x", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nx: int\n```\n\n```rescript\ntype r = {x: int, y: string}\n```"} - }, { - "label": "y", + "documentation": { + "kind": "markdown", + "value": "```rescript\nx: int\n```\n\n```rescript\ntype r = {x: int, y: string}\n```" + }, "kind": 5, - "tags": [], + "label": "x", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\ny: string\n```\n\n```rescript\ntype r = {x: int, y: string}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\ny: string\n```\n\n```rescript\ntype r = {x: int, y: string}\n```" + }, + "kind": 5, + "label": "y", + "tags": [] + } +] Complete src/Completion.res 113:25 posCursor:[113:25] posNoWhite:[113:24] Found expr:[113:3->113:25] @@ -1076,19 +1860,32 @@ Path Objects.Rec.recordVal CPPipe pathFromEnv:Rec found:true Path Objects.Rec. Path -[{ - "label": "xx", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nxx: int\n```\n\n```rescript\ntype recordt = {xx: int, ss: string}\n```"} - }, { - "label": "ss", + "documentation": { + "kind": "markdown", + "value": "```rescript\nxx: int\n```\n\n```rescript\ntype recordt = {xx: int, ss: string}\n```" + }, "kind": 5, - "tags": [], + "label": "xx", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nss: string\n```\n\n```rescript\ntype recordt = {xx: int, ss: string}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nss: string\n```\n\n```rescript\ntype recordt = {xx: int, ss: string}\n```" + }, + "kind": 5, + "label": "ss", + "tags": [] + } +] Complete src/Completion.res 120:7 posCursor:[120:7] posNoWhite:[120:6] Found expr:[119:11->123:1] @@ -1100,13 +1897,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[my] Path my -[{ - "label": "myAmazingFunction", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(int, int) => int", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "myAmazingFunction", + "tags": [] + } +] Complete src/Completion.res 125:19 posCursor:[125:19] posNoWhite:[125:18] Found expr:[125:3->145:32] @@ -1117,19 +1918,26 @@ Resolved opens 1 Stdlib ContextPath Value[Objects, object][""] ContextPath Value[Objects, object] Path Objects.object -[{ - "label": "name", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }, { - "label": "age", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "name", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "age", + "tags": [] + } +] Complete src/Completion.res 151:6 posCursor:[151:6] posNoWhite:[151:5] Found expr:[151:3->151:6] @@ -1165,19 +1973,32 @@ Path aa CPPipe pathFromEnv: found:true Path Completion. Path -[{ - "label": "x", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nx: int\n```\n\n```rescript\ntype aa = {x: int, name: string}\n```"} - }, { - "label": "name", + "documentation": { + "kind": "markdown", + "value": "```rescript\nx: int\n```\n\n```rescript\ntype aa = {x: int, name: string}\n```" + }, "kind": 5, - "tags": [], + "label": "x", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nname: string\n```\n\n```rescript\ntype aa = {x: int, name: string}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nname: string\n```\n\n```rescript\ntype aa = {x: int, name: string}\n```" + }, + "kind": 5, + "label": "name", + "tags": [] + } +] Complete src/Completion.res 159:9 posCursor:[159:9] posNoWhite:[159:8] Found expr:[159:3->159:9] @@ -1208,13 +2029,20 @@ Path aa CPPipe pathFromEnv: found:true Path Completion.n Path n -[{ - "label": "name", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nname: string\n```\n\n```rescript\ntype aa = {x: int, name: string}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nname: string\n```\n\n```rescript\ntype aa = {x: int, name: string}\n```" + }, + "kind": 5, + "label": "name", + "tags": [] + } +] Complete src/Completion.res 162:6 posCursor:[162:6] posNoWhite:[162:5] Found expr:[162:3->162:6] @@ -1224,13 +2052,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[Lis] Path Lis -[{ - "label": "List", - "kind": 9, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "module List", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 9, + "label": "List", + "tags": [] + } +] Complete src/Completion.res 169:16 posCursor:[169:16] posNoWhite:[169:15] Found expr:[169:3->169:16] @@ -1240,13 +2072,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Module[WithChildren] Path WithChildren -[{ - "label": "WithChildren", - "kind": 9, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "module WithChildren", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 9, + "label": "WithChildren", + "tags": [] + } +] Complete src/Completion.res 172:17 posCursor:[172:17] posNoWhite:[172:16] Found type:[172:12->172:17] @@ -1256,13 +2092,20 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Type[Null, ""] Path Null. -[{ - "label": "t", - "kind": 22, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "type t", - "documentation": {"kind": "markdown", "value": "\nA type representing a value that can be either `'a` or `null`.\n\n\n```rescript\n@unboxed\ntype t<'a> = Primitive_js_extern.null<'a> =\n | Value('a)\n | @as(null) Null\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "\nA type representing a value that can be either `'a` or `null`.\n\n\n```rescript\n@unboxed\ntype t<'a> = Primitive_js_extern.null<'a> =\n | Value('a)\n | @as(null) Null\n```" + }, + "kind": 22, + "label": "t", + "tags": [] + } +] Complete src/Completion.res 174:20 posCursor:[174:20] posNoWhite:[174:19] Found type:[174:12->174:20] @@ -1272,13 +2115,20 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Type[ForAuto, ""] Path ForAuto. -[{ - "label": "t", - "kind": 22, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "type t", - "documentation": {"kind": "markdown", "value": "```rescript\ntype t = int\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype t = int\n```" + }, + "kind": 22, + "label": "t", + "tags": [] + } +] Complete src/Completion.res 179:13 posCursor:[179:13] posNoWhite:[179:12] Found expr:[179:11->179:13] @@ -1288,37 +2138,56 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[As] Path As -[{ - "label": "Asterix", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "Asterix", - "documentation": {"kind": "markdown", "value": "```rescript\nAsterix\n```\n\n```rescript\ntype z = Allo | Asterix | Baba\n```"} - }, { - "label": "AsyncIterable", - "kind": 9, - "tags": [], + "documentation": { + "kind": "markdown", + "value": "```rescript\nAsterix\n```\n\n```rescript\ntype z = Allo | Asterix | Baba\n```" + }, + "kind": 4, + "label": "Asterix", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "module AsyncIterable", - "documentation": null - }, { - "label": "AsyncIterator", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], + "label": "AsyncIterable", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "module AsyncIterator", - "documentation": null - }, { - "label": "AsyncGenerator", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], + "label": "AsyncIterator", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "module AsyncGenerator", - "documentation": null - }, { - "label": "AsyncIterableIterator", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], + "label": "AsyncGenerator", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "module AsyncIterableIterator", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 9, + "label": "AsyncIterableIterator", + "tags": [] + } +] Complete src/Completion.res 182:17 Pmod_ident For:[182:14->182:17] @@ -1327,13 +2196,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Module[For] Path For -[{ - "label": "ForAuto", - "kind": 9, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "module ForAuto", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 9, + "label": "ForAuto", + "tags": [] + } +] Complete src/Completion.res 190:11 posCursor:[190:11] posNoWhite:[190:10] Found expr:[190:3->190:11] @@ -1343,13 +2216,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[Private, ""] Path Private. -[{ - "label": "b", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "b", + "tags": [] + } +] Complete src/Completion.res 202:6 posCursor:[202:6] posNoWhite:[202:5] Found expr:[202:3->202:6] @@ -1370,13 +2247,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 2 Stdlib Completion ContextPath Value[sha] Path sha -[{ - "label": "shadowed", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "shadowed", + "tags": [] + } +] Complete src/Completion.res 208:6 posCursor:[208:6] posNoWhite:[208:5] Found expr:[208:3->208:6] @@ -1387,13 +2268,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Value[sha] Path sha -[{ - "label": "shadowed", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "shadowed", + "tags": [] + } +] Complete src/Completion.res 221:22 posCursor:[221:22] posNoWhite:[221:21] Found expr:[221:3->224:22] @@ -1405,19 +2290,26 @@ Resolved opens 3 Stdlib Completion Completion ContextPath Value[FAO, forAutoObject][""] ContextPath Value[FAO, forAutoObject] Path FAO.forAutoObject -[{ - "label": "age", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }, { - "label": "forAutoLabel", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "age", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "FAR.forAutoRecord", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "forAutoLabel", + "tags": [] + } +] Complete src/Completion.res 224:37 posCursor:[224:37] posNoWhite:[224:36] Found expr:[224:3->224:37] @@ -1437,19 +2329,32 @@ Path FAO.forAutoObject CPPipe pathFromEnv:FAR found:true Path FAR. Path -[{ - "label": "forAuto", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "ForAuto.t", - "documentation": {"kind": "markdown", "value": "```rescript\nforAuto: ForAuto.t\n```\n\n```rescript\ntype forAutoRecord = {\n forAuto: ForAuto.t,\n something: option,\n}\n```"} - }, { - "label": "something", + "documentation": { + "kind": "markdown", + "value": "```rescript\nforAuto: ForAuto.t\n```\n\n```rescript\ntype forAutoRecord = {\n forAuto: ForAuto.t,\n something: option,\n}\n```" + }, "kind": 5, - "tags": [], + "label": "forAuto", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "option", - "documentation": {"kind": "markdown", "value": "```rescript\nsomething: option\n```\n\n```rescript\ntype forAutoRecord = {\n forAuto: ForAuto.t,\n something: option,\n}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nsomething: option\n```\n\n```rescript\ntype forAutoRecord = {\n forAuto: ForAuto.t,\n something: option,\n}\n```" + }, + "kind": 5, + "label": "something", + "tags": [] + } +] Complete src/Completion.res 227:46 posCursor:[227:46] posNoWhite:[227:45] Found expr:[227:3->0:-1] @@ -1472,25 +2377,35 @@ Path forAuto CPPipe pathFromEnv:ForAuto found:false Path ForAuto. Path -[{ - "label": "ForAuto.abc", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(t, int) => t", - "documentation": null - }, { - "label": "ForAuto.abd", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "ForAuto.abc", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(t, int) => t", - "documentation": null - }, { - "label": "myAmazingFunction", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "ForAuto.abd", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, int) => int", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "myAmazingFunction", + "tags": [] + } +] Complete src/Completion.res 230:55 posCursor:[230:55] posNoWhite:[230:54] Found expr:[230:3->230:55] @@ -1502,19 +2417,26 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Value[ForAuto, a] Path ForAuto.a -[{ - "label": "abc", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(t, int) => t", - "documentation": null - }, { - "label": "abd", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "abc", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(t, int) => t", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "abd", + "tags": [] + } +] Complete src/Completion.res 234:34 posCursor:[234:34] posNoWhite:[234:33] Found expr:[234:18->234:36] @@ -1529,13 +2451,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Value[na] Path na -[{ - "label": "name", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "name", + "tags": [] + } +] Complete src/Completion.res 237:17 posCursor:[237:17] posNoWhite:[237:14] Found expr:[237:14->237:22] @@ -1563,19 +2489,32 @@ Path _z CPPipe pathFromEnv: found:true Path Completion. Path -[{ - "label": "x", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nx: int\n```\n\n```rescript\ntype r = {x: int, y: string}\n```"} - }, { - "label": "y", + "documentation": { + "kind": "markdown", + "value": "```rescript\nx: int\n```\n\n```rescript\ntype r = {x: int, y: string}\n```" + }, "kind": 5, - "tags": [], + "label": "x", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\ny: string\n```\n\n```rescript\ntype r = {x: int, y: string}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\ny: string\n```\n\n```rescript\ntype r = {x: int, y: string}\n```" + }, + "kind": 5, + "label": "y", + "tags": [] + } +] Complete src/Completion.res 254:17 posCursor:[254:17] posNoWhite:[254:16] Found expr:[254:11->254:17] @@ -1586,13 +2525,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Value[SomeLo] Path SomeLo -[{ - "label": "SomeLocalModule", - "kind": 9, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "module SomeLocalModule", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 9, + "label": "SomeLocalModule", + "tags": [] + } +] Complete src/Completion.res 256:29 posCursor:[256:29] posNoWhite:[256:28] Found type:[256:13->256:29] @@ -1603,13 +2546,20 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Type[SomeLocalModule, ""] Path SomeLocalModule. -[{ - "label": "zz", - "kind": 22, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "type zz", - "documentation": {"kind": "markdown", "value": "```rescript\ntype zz = int\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype zz = int\n```" + }, + "kind": 22, + "label": "zz", + "tags": [] + } +] Complete src/Completion.res 261:33 posCursor:[261:33] posNoWhite:[261:32] Found type:[261:17->263:11] @@ -1620,13 +2570,20 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Type[SomeLocalModule, ""] Path SomeLocalModule. -[{ - "label": "zz", - "kind": 22, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "type zz", - "documentation": {"kind": "markdown", "value": "```rescript\ntype zz = int\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype zz = int\n```" + }, + "kind": 22, + "label": "zz", + "tags": [] + } +] Complete src/Completion.res 268:21 Ptype_variant unary SomeLocal:[268:12->268:21] @@ -1636,19 +2593,29 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Value[SomeLocal] Path SomeLocal -[{ - "label": "SomeLocalVariantItem", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "SomeLocalVariantItem", - "documentation": {"kind": "markdown", "value": "```rescript\nSomeLocalVariantItem\n```\n\n```rescript\ntype someLocalVariant = SomeLocalVariantItem\n```"} - }, { - "label": "SomeLocalModule", - "kind": 9, - "tags": [], + "documentation": { + "kind": "markdown", + "value": "```rescript\nSomeLocalVariantItem\n```\n\n```rescript\ntype someLocalVariant = SomeLocalVariantItem\n```" + }, + "kind": 4, + "label": "SomeLocalVariantItem", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "module SomeLocalModule", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 9, + "label": "SomeLocalModule", + "tags": [] + } +] Complete src/Completion.res 271:20 posCursor:[271:20] posNoWhite:[271:19] Found pattern:[271:7->274:3] @@ -1660,13 +2627,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Type[SomeLocal] Path SomeLocal -[{ - "label": "SomeLocalModule", - "kind": 9, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "module SomeLocalModule", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 9, + "label": "SomeLocalModule", + "tags": [] + } +] Complete src/Completion.res 275:15 posCursor:[275:15] posNoWhite:[275:14] Found expr:[274:11->278:1] @@ -1679,13 +2650,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Value[_w] Path _w -[{ - "label": "_world", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "'a", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "_world", + "tags": [] + } +] Complete src/Completion.res 281:22 posCursor:[281:22] posNoWhite:[281:21] Found type:[281:21->281:22] @@ -1696,19 +2671,32 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Type[s] Path s -[{ - "label": "someType", - "kind": 22, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "type someType", - "documentation": {"kind": "markdown", "value": "```rescript\ntype someType = {hello: string}\n```"} - }, { - "label": "someLocalVariant", + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype someType = {hello: string}\n```" + }, "kind": 22, - "tags": [], + "label": "someType", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "type someLocalVariant", - "documentation": {"kind": "markdown", "value": "```rescript\ntype someLocalVariant = SomeLocalVariantItem\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype someLocalVariant = SomeLocalVariantItem\n```" + }, + "kind": 22, + "label": "someLocalVariant", + "tags": [] + } +] Complete src/Completion.res 291:30 posCursor:[291:30] posNoWhite:[291:29] Found expr:[291:11->291:32] @@ -1727,13 +2715,17 @@ CPPipe pathFromEnv: found:true Path Completion.someFun Path someFun Found type for function (~name: string) => unit -[{ - "label": "name", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "name", + "tags": [] + } +] Complete src/Completion.res 296:11 posCursor:[296:11] posNoWhite:[296:10] Found expr:[296:3->296:11] @@ -1753,19 +2745,32 @@ Path retAA CPPipe pathFromEnv: found:true Path Completion. Path -[{ - "label": "x", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nx: int\n```\n\n```rescript\ntype aa = {x: int, name: string}\n```"} - }, { - "label": "name", + "documentation": { + "kind": "markdown", + "value": "```rescript\nx: int\n```\n\n```rescript\ntype aa = {x: int, name: string}\n```" + }, "kind": 5, - "tags": [], + "label": "x", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nname: string\n```\n\n```rescript\ntype aa = {x: int, name: string}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nname: string\n```\n\n```rescript\ntype aa = {x: int, name: string}\n```" + }, + "kind": 5, + "label": "name", + "tags": [] + } +] Complete src/Completion.res 301:13 posCursor:[301:13] posNoWhite:[301:12] Found expr:[301:3->301:13] @@ -1785,31 +2790,44 @@ Found type for function ( ~opt2: int=?, unit, ) => int -[{ - "label": "opt1", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "option", - "documentation": null - }, { - "label": "a", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "opt1", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }, { - "label": "b", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "a", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }, { - "label": "opt2", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "b", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "option", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "opt2", + "tags": [] + } +] Complete src/Completion.res 304:15 posCursor:[304:15] posNoWhite:[304:14] Found expr:[304:3->304:15] @@ -1823,25 +2841,35 @@ ContextPath Value[ff](~c) ContextPath Value[ff] Path ff Found type for function (~a: int, ~b: int, ~opt2: int=?, unit) => int -[{ - "label": "a", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }, { - "label": "b", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "a", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }, { - "label": "opt2", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "b", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "option", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "opt2", + "tags": [] + } +] Complete src/Completion.res 307:17 posCursor:[307:17] posNoWhite:[307:16] Found expr:[307:3->307:17] @@ -1854,25 +2882,35 @@ ContextPath Value[ff](~c, Nolabel) ContextPath Value[ff] Path ff Found type for function (~a: int, ~b: int, ~opt2: int=?, unit) => int -[{ - "label": "a", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }, { - "label": "b", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "a", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }, { - "label": "opt2", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "b", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "option", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "opt2", + "tags": [] + } +] Complete src/Completion.res 310:21 posCursor:[310:21] posNoWhite:[310:20] Found expr:[310:3->310:21] @@ -1885,19 +2923,26 @@ ContextPath Value[ff](~c, Nolabel, Nolabel) ContextPath Value[ff] Path ff Found type for function (~a: int, ~b: int) => int -[{ - "label": "a", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }, { - "label": "b", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "a", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "b", + "tags": [] + } +] Complete src/Completion.res 313:23 posCursor:[313:23] posNoWhite:[313:22] Found expr:[313:3->313:23] @@ -1910,19 +2955,26 @@ ContextPath Value[ff](~c, Nolabel, ~b) ContextPath Value[ff] Path ff Found type for function (~a: int, ~opt2: int=?, unit) => int -[{ - "label": "a", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }, { - "label": "opt2", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "a", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "option", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "opt2", + "tags": [] + } +] Complete src/Completion.res 316:16 posCursor:[316:16] posNoWhite:[316:15] Found expr:[316:3->316:16] @@ -1935,31 +2987,44 @@ ContextPath Value[ff](~opt2) ContextPath Value[ff] Path ff Found type for function (~opt1: int=?, ~a: int, ~b: int, unit, unit, ~c: int) => int -[{ - "label": "opt1", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "option", - "documentation": null - }, { - "label": "a", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "opt1", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }, { - "label": "b", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "a", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }, { - "label": "c", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "b", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "c", + "tags": [] + } +] Complete src/Completion.res 326:17 posCursor:[326:17] posNoWhite:[326:16] Found expr:[326:3->326:17] @@ -1971,19 +3036,26 @@ Resolved opens 3 Stdlib Completion Completion ContextPath Value[withCallback] Path withCallback Found type for function (~b: int) => callback -[{ - "label": "b", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }, { - "label": "a", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "b", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "a", + "tags": [] + } +] Complete src/Completion.res 329:21 posCursor:[329:21] posNoWhite:[329:20] Found expr:[329:3->329:21] @@ -1996,19 +3068,26 @@ ContextPath Value[withCallback](~a) ContextPath Value[withCallback] Path withCallback Found type for function (~b: int) => callback -[{ - "label": "b", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }, { - "label": "a", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "b", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "a", + "tags": [] + } +] Complete src/Completion.res 332:21 posCursor:[332:21] posNoWhite:[332:20] Found expr:[332:3->332:21] @@ -2021,13 +3100,17 @@ ContextPath Value[withCallback](~b) ContextPath Value[withCallback] Path withCallback Found type for function callback -[{ - "label": "a", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "a", + "tags": [] + } +] Complete src/Completion.res 339:26 posCursor:[339:26] posNoWhite:[339:25] Found expr:[336:2->349:23] @@ -2048,63 +3131,77 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Type[Res] Path Res -[{ - "label": "Result", - "kind": 9, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "module Result", - "documentation": null - }, { - "label": "RescriptReactErrorBoundary", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module RescriptReactErrorBoundary", - "documentation": null, + "label": "Result", + "tags": [] + }, + { "data": { "modulePath": "RescriptReactErrorBoundary", "filePath": "src/Completion.res" - } - }, { - "label": "RescriptReactRouter", + }, + "deprecated": false, + "detail": "module RescriptReactErrorBoundary", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module RescriptReactRouter", - "documentation": null, + "label": "RescriptReactErrorBoundary", + "tags": [] + }, + { "data": { "modulePath": "RescriptReactRouter", "filePath": "src/Completion.res" - } - }, { - "label": "RescriptTools", + }, + "deprecated": false, + "detail": "module RescriptReactRouter", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module RescriptTools", - "documentation": null, + "label": "RescriptReactRouter", + "tags": [] + }, + { "data": { "modulePath": "RescriptTools", "filePath": "src/Completion.res" - } - }, { - "label": "RescriptTools_Docgen", + }, + "deprecated": false, + "detail": "module RescriptTools", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module RescriptTools_Docgen", - "documentation": null, + "label": "RescriptTools", + "tags": [] + }, + { "data": { "modulePath": "RescriptTools_Docgen", "filePath": "src/Completion.res" - } - }, { - "label": "RescriptTools_ExtractCodeBlocks", + }, + "deprecated": false, + "detail": "module RescriptTools_Docgen", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module RescriptTools_ExtractCodeBlocks", - "documentation": null, + "label": "RescriptTools_Docgen", + "tags": [] + }, + { "data": { "modulePath": "RescriptTools_ExtractCodeBlocks", "filePath": "src/Completion.res" - } - }] + }, + "deprecated": false, + "detail": "module RescriptTools_ExtractCodeBlocks", + "documentation": { "kind": "markdown", "value": "" }, + "kind": 9, + "label": "RescriptTools_ExtractCodeBlocks", + "tags": [] + } +] Complete src/Completion.res 346:57 posCursor:[346:57] posNoWhite:[346:56] Found expr:[346:53->349:23] @@ -2116,16 +3213,25 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Value[this] Path this -[{ - "label": "thisIsNotSaved", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "\\\"Type Not Known\"", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "thisIsNotSaved", + "tags": [] + } +] Hover src/Completion.res 349:14 -{"contents": {"kind": "markdown", "value": "```rescript\nJsxDOM.domProps\n```\n\n---\n\n```\n \n```\n```rescript\ntype JsxDOM.domProps = {\n key?: string,\n children?: Jsx.element,\n ref?: domRef,\n allow?: string,\n ariaCurrent?: [\n | #date\n | #\"false\"\n | #location\n | #page\n | #step\n | #time\n | #\"true\"\n ],\n ariaDetails?: string,\n ariaDisabled?: bool,\n ariaHidden?: bool,\n ariaInvalid?: [#\"false\" | #grammar | #spelling | #\"true\"],\n ariaKeyshortcuts?: string,\n ariaLabel?: string,\n ariaRoledescription?: string,\n ariaAutocomplete?: [#both | #inline | #list | #none],\n ariaChecked?: [#\"false\" | #mixed | #\"true\"],\n ariaExpanded?: bool,\n ariaHaspopup?: [\n | #dialog\n | #\"false\"\n | #grid\n | #listbox\n | #menu\n | #tree\n | #\"true\"\n ],\n ariaLevel?: int,\n ariaModal?: bool,\n ariaMultiline?: bool,\n ariaMultiselectable?: bool,\n ariaOrientation?: [#horizontal | #undefined | #vertical],\n ariaPlaceholder?: string,\n ariaPressed?: [#\"false\" | #mixed | #\"true\"],\n ariaReadonly?: bool,\n ariaRequired?: bool,\n ariaSelected?: bool,\n ariaSort?: string,\n ariaValuemax?: float,\n ariaValuemin?: float,\n ariaValuenow?: float,\n ariaValuetext?: string,\n ariaAtomic?: bool,\n ariaBusy?: bool,\n ariaLive?: [#assertive | #off | #polite | #rude],\n ariaRelevant?: string,\n ariaDropeffect?: [\n | #copy\n | #execute\n | #link\n | #move\n | #none\n | #popup\n ],\n ariaGrabbed?: bool,\n ariaActivedescendant?: string,\n ariaColcount?: int,\n ariaColindex?: int,\n ariaColspan?: int,\n ariaControls?: string,\n ariaDescribedby?: string,\n ariaErrormessage?: string,\n ariaFlowto?: string,\n ariaLabelledby?: string,\n ariaOwns?: string,\n ariaPosinset?: int,\n ariaRowcount?: int,\n ariaRowindex?: int,\n ariaRowspan?: int,\n ariaSetsize?: int,\n defaultChecked?: bool,\n defaultValue?: string,\n accessKey?: string,\n capture?: [#environment | #user],\n className?: string,\n contentEditable?: bool,\n contextMenu?: string,\n dataTestId?: string,\n dir?: string,\n draggable?: bool,\n hidden?: bool,\n id?: string,\n inert?: bool,\n lang?: string,\n popover?: popover,\n popoverTarget?: string,\n popoverTargetAction?: popoverTargetAction,\n role?: string,\n style?: style,\n spellCheck?: bool,\n tabIndex?: int,\n title?: string,\n itemID?: string,\n itemProp?: string,\n itemRef?: string,\n itemScope?: bool,\n itemType?: string,\n accept?: string,\n acceptCharset?: string,\n action?: string,\n allowFullScreen?: bool,\n alt?: string,\n as_?: string,\n async?: bool,\n autoComplete?: string,\n autoCapitalize?: string,\n autoFocus?: bool,\n autoPlay?: bool,\n challenge?: string,\n charSet?: string,\n checked?: bool,\n cite?: string,\n crossOrigin?: string,\n cols?: int,\n colSpan?: int,\n content?: string,\n controls?: bool,\n coords?: string,\n data?: string,\n dateTime?: string,\n default?: bool,\n defer?: bool,\n disabled?: bool,\n download?: string,\n encType?: string,\n form?: string,\n formAction?: string,\n formTarget?: string,\n formMethod?: string,\n frameBorder?: int,\n headers?: string,\n height?: string,\n high?: int,\n href?: string,\n hrefLang?: string,\n htmlFor?: string,\n httpEquiv?: string,\n icon?: string,\n inputMode?: string,\n integrity?: string,\n keyType?: string,\n kind?: string,\n label?: string,\n list?: string,\n loading?: [#eager | #lazy],\n loop?: bool,\n low?: int,\n manifest?: string,\n max?: string,\n maxLength?: int,\n media?: string,\n mediaGroup?: string,\n method?: string,\n min?: string,\n minLength?: int,\n multiple?: bool,\n muted?: bool,\n name?: string,\n nonce?: string,\n noValidate?: bool,\n open_?: bool,\n optimum?: int,\n pattern?: string,\n placeholder?: string,\n playsInline?: bool,\n poster?: string,\n preload?: string,\n radioGroup?: string,\n readOnly?: bool,\n rel?: string,\n required?: bool,\n reversed?: bool,\n rows?: int,\n rowSpan?: int,\n sandbox?: string,\n scope?: string,\n scoped?: bool,\n scrolling?: string,\n selected?: bool,\n shape?: string,\n size?: int,\n sizes?: string,\n span?: int,\n src?: string,\n srcDoc?: string,\n srcLang?: string,\n srcSet?: string,\n start?: int,\n step?: float,\n summary?: string,\n target?: string,\n type_?: string,\n useMap?: string,\n value?: string,\n width?: string,\n wrap?: string,\n onCopy?: JsxEvent.Clipboard.t => unit,\n onCut?: JsxEvent.Clipboard.t => unit,\n onPaste?: JsxEvent.Clipboard.t => unit,\n onCompositionEnd?: JsxEvent.Composition.t => unit,\n onCompositionStart?: JsxEvent.Composition.t => unit,\n onCompositionUpdate?: JsxEvent.Composition.t => unit,\n onKeyDown?: JsxEvent.Keyboard.t => unit,\n onKeyPress?: JsxEvent.Keyboard.t => unit,\n onKeyUp?: JsxEvent.Keyboard.t => unit,\n onFocus?: JsxEvent.Focus.t => unit,\n onBlur?: JsxEvent.Focus.t => unit,\n onBeforeInput?: JsxEvent.Form.t => unit,\n onChange?: JsxEvent.Form.t => unit,\n onInput?: JsxEvent.Form.t => unit,\n onReset?: JsxEvent.Form.t => unit,\n onSubmit?: JsxEvent.Form.t => unit,\n onInvalid?: JsxEvent.Form.t => unit,\n onClick?: JsxEvent.Mouse.t => unit,\n onContextMenu?: JsxEvent.Mouse.t => unit,\n onDoubleClick?: JsxEvent.Mouse.t => unit,\n onDrag?: JsxEvent.Mouse.t => unit,\n onDragEnd?: JsxEvent.Mouse.t => unit,\n onDragEnter?: JsxEvent.Mouse.t => unit,\n onDragExit?: JsxEvent.Mouse.t => unit,\n onDragLeave?: JsxEvent.Mouse.t => unit,\n onDragOver?: JsxEvent.Mouse.t => unit,\n onDragStart?: JsxEvent.Mouse.t => unit,\n onDrop?: JsxEvent.Mouse.t => unit,\n onMouseDown?: JsxEvent.Mouse.t => unit,\n onMouseEnter?: JsxEvent.Mouse.t => unit,\n onMouseLeave?: JsxEvent.Mouse.t => unit,\n onMouseMove?: JsxEvent.Mouse.t => unit,\n onMouseOut?: JsxEvent.Mouse.t => unit,\n onMouseOver?: JsxEvent.Mouse.t => unit,\n onMouseUp?: JsxEvent.Mouse.t => unit,\n onSelect?: JsxEvent.Selection.t => unit,\n onTouchCancel?: JsxEvent.Touch.t => unit,\n onTouchEnd?: JsxEvent.Touch.t => unit,\n onTouchMove?: JsxEvent.Touch.t => unit,\n onTouchStart?: JsxEvent.Touch.t => unit,\n onPointerOver?: JsxEvent.Pointer.t => unit,\n onPointerEnter?: JsxEvent.Pointer.t => unit,\n onPointerDown?: JsxEvent.Pointer.t => unit,\n onPointerMove?: JsxEvent.Pointer.t => unit,\n onPointerUp?: JsxEvent.Pointer.t => unit,\n onPointerCancel?: JsxEvent.Pointer.t => unit,\n onPointerOut?: JsxEvent.Pointer.t => unit,\n onPointerLeave?: JsxEvent.Pointer.t => unit,\n onGotPointerCapture?: JsxEvent.Pointer.t => unit,\n onLostPointerCapture?: JsxEvent.Pointer.t => unit,\n onScroll?: JsxEvent.UI.t => unit,\n onWheel?: JsxEvent.Wheel.t => unit,\n onAbort?: JsxEvent.Media.t => unit,\n onCanPlay?: JsxEvent.Media.t => unit,\n onCanPlayThrough?: JsxEvent.Media.t => unit,\n onDurationChange?: JsxEvent.Media.t => unit,\n onEmptied?: JsxEvent.Media.t => unit,\n onEncrypted?: JsxEvent.Media.t => unit,\n onEnded?: JsxEvent.Media.t => unit,\n onError?: JsxEvent.Media.t => unit,\n onLoadedData?: JsxEvent.Media.t => unit,\n onLoadedMetadata?: JsxEvent.Media.t => unit,\n onLoadStart?: JsxEvent.Media.t => unit,\n onPause?: JsxEvent.Media.t => unit,\n onPlay?: JsxEvent.Media.t => unit,\n onPlaying?: JsxEvent.Media.t => unit,\n onProgress?: JsxEvent.Media.t => unit,\n onRateChange?: JsxEvent.Media.t => unit,\n onSeeked?: JsxEvent.Media.t => unit,\n onSeeking?: JsxEvent.Media.t => unit,\n onStalled?: JsxEvent.Media.t => unit,\n onSuspend?: JsxEvent.Media.t => unit,\n onTimeUpdate?: JsxEvent.Media.t => unit,\n onVolumeChange?: JsxEvent.Media.t => unit,\n onWaiting?: JsxEvent.Media.t => unit,\n onLoad?: JsxEvent.Image.t => unit,\n onAnimationStart?: JsxEvent.Animation.t => unit,\n onAnimationEnd?: JsxEvent.Animation.t => unit,\n onAnimationIteration?: JsxEvent.Animation.t => unit,\n onTransitionEnd?: JsxEvent.Transition.t => unit,\n accentHeight?: string,\n accumulate?: string,\n additive?: string,\n alignmentBaseline?: string,\n allowReorder?: string,\n alphabetic?: string,\n amplitude?: string,\n arabicForm?: string,\n ascent?: string,\n attributeName?: string,\n attributeType?: string,\n autoReverse?: string,\n azimuth?: string,\n baseFrequency?: string,\n baseProfile?: string,\n baselineShift?: string,\n bbox?: string,\n begin?: string,\n begin_?: string,\n bias?: string,\n by?: string,\n calcMode?: string,\n capHeight?: string,\n clip?: string,\n clipPath?: string,\n clipPathUnits?: string,\n clipRule?: string,\n colorInterpolation?: string,\n colorInterpolationFilters?: string,\n colorProfile?: string,\n colorRendering?: string,\n contentScriptType?: string,\n contentStyleType?: string,\n cursor?: string,\n cx?: string,\n cy?: string,\n d?: string,\n decelerate?: string,\n descent?: string,\n diffuseConstant?: string,\n direction?: string,\n display?: string,\n divisor?: string,\n dominantBaseline?: string,\n dur?: string,\n dx?: string,\n dy?: string,\n edgeMode?: string,\n elevation?: string,\n enableBackground?: string,\n end?: string,\n end_?: string,\n exponent?: string,\n externalResourcesRequired?: string,\n fill?: string,\n fillOpacity?: string,\n fillRule?: string,\n filter?: string,\n filterRes?: string,\n filterUnits?: string,\n floodColor?: string,\n floodOpacity?: string,\n focusable?: string,\n fontFamily?: string,\n fontSize?: string,\n fontSizeAdjust?: string,\n fontStretch?: string,\n fontStyle?: string,\n fontVariant?: string,\n fontWeight?: string,\n fomat?: string,\n from?: string,\n fx?: string,\n fy?: string,\n g1?: string,\n g2?: string,\n glyphName?: string,\n glyphOrientationHorizontal?: string,\n glyphOrientationVertical?: string,\n glyphRef?: string,\n gradientTransform?: string,\n gradientUnits?: string,\n hanging?: string,\n horizAdvX?: string,\n horizOriginX?: string,\n ideographic?: string,\n imageRendering?: string,\n in_?: string,\n in2?: string,\n intercept?: string,\n k?: string,\n k1?: string,\n k2?: string,\n k3?: string,\n k4?: string,\n kernelMatrix?: string,\n kernelUnitLength?: string,\n kerning?: string,\n keyPoints?: string,\n keySplines?: string,\n keyTimes?: string,\n lengthAdjust?: string,\n letterSpacing?: string,\n lightingColor?: string,\n limitingConeAngle?: string,\n local?: string,\n markerEnd?: string,\n markerHeight?: string,\n markerMid?: string,\n markerStart?: string,\n markerUnits?: string,\n markerWidth?: string,\n mask?: string,\n maskContentUnits?: string,\n maskUnits?: string,\n mathematical?: string,\n mode?: string,\n numOctaves?: string,\n offset?: string,\n opacity?: string,\n operator?: string,\n order?: string,\n orient?: string,\n orientation?: string,\n origin?: string,\n overflow?: string,\n overflowX?: string,\n overflowY?: string,\n overlinePosition?: string,\n overlineThickness?: string,\n paintOrder?: string,\n panose1?: string,\n pathLength?: string,\n patternContentUnits?: string,\n patternTransform?: string,\n patternUnits?: string,\n pointerEvents?: string,\n points?: string,\n pointsAtX?: string,\n pointsAtY?: string,\n pointsAtZ?: string,\n preserveAlpha?: string,\n preserveAspectRatio?: string,\n primitiveUnits?: string,\n r?: string,\n radius?: string,\n referrerPolicy?: string,\n refX?: string,\n refY?: string,\n renderingIntent?: string,\n repeatCount?: string,\n repeatDur?: string,\n requiredExtensions?: string,\n requiredFeatures?: string,\n restart?: string,\n result?: string,\n rotate?: string,\n rx?: string,\n ry?: string,\n scale?: string,\n seed?: string,\n shapeRendering?: string,\n slope?: string,\n slot?: string,\n spacing?: string,\n specularConstant?: string,\n specularExponent?: string,\n speed?: string,\n spreadMethod?: string,\n startOffset?: string,\n stdDeviation?: string,\n stemh?: string,\n stemv?: string,\n stitchTiles?: string,\n stopColor?: string,\n stopOpacity?: string,\n strikethroughPosition?: string,\n strikethroughThickness?: string,\n string?: string,\n stroke?: string,\n strokeDasharray?: string,\n strokeDashoffset?: string,\n strokeLinecap?: string,\n strokeLinejoin?: string,\n strokeMiterlimit?: string,\n strokeOpacity?: string,\n strokeWidth?: string,\n surfaceScale?: string,\n systemLanguage?: string,\n tableValues?: string,\n targetX?: string,\n targetY?: string,\n textAnchor?: string,\n textDecoration?: string,\n textLength?: string,\n textRendering?: string,\n to?: string,\n to_?: string,\n transform?: string,\n u1?: string,\n u2?: string,\n underlinePosition?: string,\n underlineThickness?: string,\n unicode?: string,\n unicodeBidi?: string,\n unicodeRange?: string,\n unitsPerEm?: string,\n vAlphabetic?: string,\n vHanging?: string,\n vIdeographic?: string,\n vMathematical?: string,\n values?: string,\n vectorEffect?: string,\n version?: string,\n vertAdvX?: string,\n vertAdvY?: string,\n vertOriginX?: string,\n vertOriginY?: string,\n viewBox?: string,\n viewTarget?: string,\n visibility?: string,\n widths?: string,\n wordSpacing?: string,\n writingMode?: string,\n x?: string,\n x1?: string,\n x2?: string,\n xChannelSelector?: string,\n xHeight?: string,\n xlinkActuate?: string,\n xlinkArcrole?: string,\n xlinkHref?: string,\n xlinkRole?: string,\n xlinkShow?: string,\n xlinkTitle?: string,\n xlinkType?: string,\n xmlns?: string,\n xmlnsXlink?: string,\n xmlBase?: string,\n xmlLang?: string,\n xmlSpace?: string,\n y?: string,\n y1?: string,\n y2?: string,\n yChannelSelector?: string,\n z?: string,\n zoomAndPan?: string,\n about?: string,\n datatype?: string,\n inlist?: string,\n prefix?: string,\n property?: string,\n resource?: string,\n typeof?: string,\n vocab?: string,\n dangerouslySetInnerHTML?: {\"__html\": string},\n suppressContentEditableWarning?: bool,\n}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxDOM.res%22%2C20%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype Jsx.element\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Jsx.res%22%2C7%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype domRef\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxDOM.res%22%2C7%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype popover =\n | @as(\"auto\") Auto\n | @as(\"manual\") Manual\n | @as(\"hint\") Hint\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxDOM.res%22%2C11%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype popoverTargetAction =\n | @as(\"toggle\") Toggle\n | @as(\"show\") Show\n | @as(\"hide\") Hide\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxDOM.res%22%2C15%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype style = JsxDOMStyle.t\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxDOM.res%22%2C6%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Clipboard.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C77%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Composition.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C87%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Keyboard.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C96%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Focus.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C118%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Form.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C128%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Mouse.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C135%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Selection.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C212%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Touch.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C219%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Pointer.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C164%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.UI.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C242%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Wheel.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C253%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Media.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C265%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Image.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C272%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Animation.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C279%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Transition.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C290%2C2%5D)\n"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nJsxDOM.domProps\n```\n\n---\n\n```\n \n```\n```rescript\ntype JsxDOM.domProps = {\n key?: string,\n children?: Jsx.element,\n ref?: domRef,\n allow?: string,\n ariaCurrent?: [\n | #date\n | #\"false\"\n | #location\n | #page\n | #step\n | #time\n | #\"true\"\n ],\n ariaDetails?: string,\n ariaDisabled?: bool,\n ariaHidden?: bool,\n ariaInvalid?: [#\"false\" | #grammar | #spelling | #\"true\"],\n ariaKeyshortcuts?: string,\n ariaLabel?: string,\n ariaRoledescription?: string,\n ariaAutocomplete?: [#both | #inline | #list | #none],\n ariaChecked?: [#\"false\" | #mixed | #\"true\"],\n ariaExpanded?: bool,\n ariaHaspopup?: [\n | #dialog\n | #\"false\"\n | #grid\n | #listbox\n | #menu\n | #tree\n | #\"true\"\n ],\n ariaLevel?: int,\n ariaModal?: bool,\n ariaMultiline?: bool,\n ariaMultiselectable?: bool,\n ariaOrientation?: [#horizontal | #undefined | #vertical],\n ariaPlaceholder?: string,\n ariaPressed?: [#\"false\" | #mixed | #\"true\"],\n ariaReadonly?: bool,\n ariaRequired?: bool,\n ariaSelected?: bool,\n ariaSort?: string,\n ariaValuemax?: float,\n ariaValuemin?: float,\n ariaValuenow?: float,\n ariaValuetext?: string,\n ariaAtomic?: bool,\n ariaBusy?: bool,\n ariaLive?: [#assertive | #off | #polite | #rude],\n ariaRelevant?: string,\n ariaDropeffect?: [\n | #copy\n | #execute\n | #link\n | #move\n | #none\n | #popup\n ],\n ariaGrabbed?: bool,\n ariaActivedescendant?: string,\n ariaColcount?: int,\n ariaColindex?: int,\n ariaColspan?: int,\n ariaControls?: string,\n ariaDescribedby?: string,\n ariaErrormessage?: string,\n ariaFlowto?: string,\n ariaLabelledby?: string,\n ariaOwns?: string,\n ariaPosinset?: int,\n ariaRowcount?: int,\n ariaRowindex?: int,\n ariaRowspan?: int,\n ariaSetsize?: int,\n defaultChecked?: bool,\n defaultValue?: string,\n accessKey?: string,\n capture?: [#environment | #user],\n className?: string,\n contentEditable?: bool,\n contextMenu?: string,\n dataTestId?: string,\n dir?: string,\n draggable?: bool,\n hidden?: bool,\n id?: string,\n inert?: bool,\n lang?: string,\n popover?: popover,\n popoverTarget?: string,\n popoverTargetAction?: popoverTargetAction,\n role?: string,\n style?: style,\n spellCheck?: bool,\n tabIndex?: int,\n title?: string,\n itemID?: string,\n itemProp?: string,\n itemRef?: string,\n itemScope?: bool,\n itemType?: string,\n accept?: string,\n acceptCharset?: string,\n action?: string,\n allowFullScreen?: bool,\n alt?: string,\n as_?: string,\n async?: bool,\n autoComplete?: string,\n autoCapitalize?: string,\n autoFocus?: bool,\n autoPlay?: bool,\n challenge?: string,\n charSet?: string,\n checked?: bool,\n cite?: string,\n crossOrigin?: string,\n cols?: int,\n colSpan?: int,\n content?: string,\n controls?: bool,\n coords?: string,\n data?: string,\n dateTime?: string,\n default?: bool,\n defer?: bool,\n disabled?: bool,\n download?: string,\n encType?: string,\n form?: string,\n formAction?: string,\n formTarget?: string,\n formMethod?: string,\n frameBorder?: int,\n headers?: string,\n height?: string,\n high?: int,\n href?: string,\n hrefLang?: string,\n htmlFor?: string,\n httpEquiv?: string,\n icon?: string,\n inputMode?: string,\n integrity?: string,\n keyType?: string,\n kind?: string,\n label?: string,\n list?: string,\n loading?: [#eager | #lazy],\n loop?: bool,\n low?: int,\n manifest?: string,\n max?: string,\n maxLength?: int,\n media?: string,\n mediaGroup?: string,\n method?: string,\n min?: string,\n minLength?: int,\n multiple?: bool,\n muted?: bool,\n name?: string,\n nonce?: string,\n noValidate?: bool,\n open_?: bool,\n optimum?: int,\n pattern?: string,\n placeholder?: string,\n playsInline?: bool,\n poster?: string,\n preload?: string,\n radioGroup?: string,\n readOnly?: bool,\n rel?: string,\n required?: bool,\n reversed?: bool,\n rows?: int,\n rowSpan?: int,\n sandbox?: string,\n scope?: string,\n scoped?: bool,\n scrolling?: string,\n selected?: bool,\n shape?: string,\n size?: int,\n sizes?: string,\n span?: int,\n src?: string,\n srcDoc?: string,\n srcLang?: string,\n srcSet?: string,\n start?: int,\n step?: float,\n summary?: string,\n target?: string,\n type_?: string,\n useMap?: string,\n value?: string,\n width?: string,\n wrap?: string,\n onCopy?: JsxEvent.Clipboard.t => unit,\n onCut?: JsxEvent.Clipboard.t => unit,\n onPaste?: JsxEvent.Clipboard.t => unit,\n onCompositionEnd?: JsxEvent.Composition.t => unit,\n onCompositionStart?: JsxEvent.Composition.t => unit,\n onCompositionUpdate?: JsxEvent.Composition.t => unit,\n onKeyDown?: JsxEvent.Keyboard.t => unit,\n onKeyPress?: JsxEvent.Keyboard.t => unit,\n onKeyUp?: JsxEvent.Keyboard.t => unit,\n onFocus?: JsxEvent.Focus.t => unit,\n onBlur?: JsxEvent.Focus.t => unit,\n onBeforeInput?: JsxEvent.Form.t => unit,\n onChange?: JsxEvent.Form.t => unit,\n onInput?: JsxEvent.Form.t => unit,\n onReset?: JsxEvent.Form.t => unit,\n onSubmit?: JsxEvent.Form.t => unit,\n onInvalid?: JsxEvent.Form.t => unit,\n onClick?: JsxEvent.Mouse.t => unit,\n onContextMenu?: JsxEvent.Mouse.t => unit,\n onDoubleClick?: JsxEvent.Mouse.t => unit,\n onDrag?: JsxEvent.Mouse.t => unit,\n onDragEnd?: JsxEvent.Mouse.t => unit,\n onDragEnter?: JsxEvent.Mouse.t => unit,\n onDragExit?: JsxEvent.Mouse.t => unit,\n onDragLeave?: JsxEvent.Mouse.t => unit,\n onDragOver?: JsxEvent.Mouse.t => unit,\n onDragStart?: JsxEvent.Mouse.t => unit,\n onDrop?: JsxEvent.Mouse.t => unit,\n onMouseDown?: JsxEvent.Mouse.t => unit,\n onMouseEnter?: JsxEvent.Mouse.t => unit,\n onMouseLeave?: JsxEvent.Mouse.t => unit,\n onMouseMove?: JsxEvent.Mouse.t => unit,\n onMouseOut?: JsxEvent.Mouse.t => unit,\n onMouseOver?: JsxEvent.Mouse.t => unit,\n onMouseUp?: JsxEvent.Mouse.t => unit,\n onSelect?: JsxEvent.Selection.t => unit,\n onTouchCancel?: JsxEvent.Touch.t => unit,\n onTouchEnd?: JsxEvent.Touch.t => unit,\n onTouchMove?: JsxEvent.Touch.t => unit,\n onTouchStart?: JsxEvent.Touch.t => unit,\n onPointerOver?: JsxEvent.Pointer.t => unit,\n onPointerEnter?: JsxEvent.Pointer.t => unit,\n onPointerDown?: JsxEvent.Pointer.t => unit,\n onPointerMove?: JsxEvent.Pointer.t => unit,\n onPointerUp?: JsxEvent.Pointer.t => unit,\n onPointerCancel?: JsxEvent.Pointer.t => unit,\n onPointerOut?: JsxEvent.Pointer.t => unit,\n onPointerLeave?: JsxEvent.Pointer.t => unit,\n onGotPointerCapture?: JsxEvent.Pointer.t => unit,\n onLostPointerCapture?: JsxEvent.Pointer.t => unit,\n onScroll?: JsxEvent.UI.t => unit,\n onWheel?: JsxEvent.Wheel.t => unit,\n onAbort?: JsxEvent.Media.t => unit,\n onCanPlay?: JsxEvent.Media.t => unit,\n onCanPlayThrough?: JsxEvent.Media.t => unit,\n onDurationChange?: JsxEvent.Media.t => unit,\n onEmptied?: JsxEvent.Media.t => unit,\n onEncrypted?: JsxEvent.Media.t => unit,\n onEnded?: JsxEvent.Media.t => unit,\n onError?: JsxEvent.Media.t => unit,\n onLoadedData?: JsxEvent.Media.t => unit,\n onLoadedMetadata?: JsxEvent.Media.t => unit,\n onLoadStart?: JsxEvent.Media.t => unit,\n onPause?: JsxEvent.Media.t => unit,\n onPlay?: JsxEvent.Media.t => unit,\n onPlaying?: JsxEvent.Media.t => unit,\n onProgress?: JsxEvent.Media.t => unit,\n onRateChange?: JsxEvent.Media.t => unit,\n onSeeked?: JsxEvent.Media.t => unit,\n onSeeking?: JsxEvent.Media.t => unit,\n onStalled?: JsxEvent.Media.t => unit,\n onSuspend?: JsxEvent.Media.t => unit,\n onTimeUpdate?: JsxEvent.Media.t => unit,\n onVolumeChange?: JsxEvent.Media.t => unit,\n onWaiting?: JsxEvent.Media.t => unit,\n onLoad?: JsxEvent.Image.t => unit,\n onAnimationStart?: JsxEvent.Animation.t => unit,\n onAnimationEnd?: JsxEvent.Animation.t => unit,\n onAnimationIteration?: JsxEvent.Animation.t => unit,\n onTransitionEnd?: JsxEvent.Transition.t => unit,\n accentHeight?: string,\n accumulate?: string,\n additive?: string,\n alignmentBaseline?: string,\n allowReorder?: string,\n alphabetic?: string,\n amplitude?: string,\n arabicForm?: string,\n ascent?: string,\n attributeName?: string,\n attributeType?: string,\n autoReverse?: string,\n azimuth?: string,\n baseFrequency?: string,\n baseProfile?: string,\n baselineShift?: string,\n bbox?: string,\n begin?: string,\n begin_?: string,\n bias?: string,\n by?: string,\n calcMode?: string,\n capHeight?: string,\n clip?: string,\n clipPath?: string,\n clipPathUnits?: string,\n clipRule?: string,\n colorInterpolation?: string,\n colorInterpolationFilters?: string,\n colorProfile?: string,\n colorRendering?: string,\n contentScriptType?: string,\n contentStyleType?: string,\n cursor?: string,\n cx?: string,\n cy?: string,\n d?: string,\n decelerate?: string,\n descent?: string,\n diffuseConstant?: string,\n direction?: string,\n display?: string,\n divisor?: string,\n dominantBaseline?: string,\n dur?: string,\n dx?: string,\n dy?: string,\n edgeMode?: string,\n elevation?: string,\n enableBackground?: string,\n end?: string,\n end_?: string,\n exponent?: string,\n externalResourcesRequired?: string,\n fill?: string,\n fillOpacity?: string,\n fillRule?: string,\n filter?: string,\n filterRes?: string,\n filterUnits?: string,\n floodColor?: string,\n floodOpacity?: string,\n focusable?: string,\n fontFamily?: string,\n fontSize?: string,\n fontSizeAdjust?: string,\n fontStretch?: string,\n fontStyle?: string,\n fontVariant?: string,\n fontWeight?: string,\n fomat?: string,\n from?: string,\n fx?: string,\n fy?: string,\n g1?: string,\n g2?: string,\n glyphName?: string,\n glyphOrientationHorizontal?: string,\n glyphOrientationVertical?: string,\n glyphRef?: string,\n gradientTransform?: string,\n gradientUnits?: string,\n hanging?: string,\n horizAdvX?: string,\n horizOriginX?: string,\n ideographic?: string,\n imageRendering?: string,\n in_?: string,\n in2?: string,\n intercept?: string,\n k?: string,\n k1?: string,\n k2?: string,\n k3?: string,\n k4?: string,\n kernelMatrix?: string,\n kernelUnitLength?: string,\n kerning?: string,\n keyPoints?: string,\n keySplines?: string,\n keyTimes?: string,\n lengthAdjust?: string,\n letterSpacing?: string,\n lightingColor?: string,\n limitingConeAngle?: string,\n local?: string,\n markerEnd?: string,\n markerHeight?: string,\n markerMid?: string,\n markerStart?: string,\n markerUnits?: string,\n markerWidth?: string,\n mask?: string,\n maskContentUnits?: string,\n maskUnits?: string,\n mathematical?: string,\n mode?: string,\n numOctaves?: string,\n offset?: string,\n opacity?: string,\n operator?: string,\n order?: string,\n orient?: string,\n orientation?: string,\n origin?: string,\n overflow?: string,\n overflowX?: string,\n overflowY?: string,\n overlinePosition?: string,\n overlineThickness?: string,\n paintOrder?: string,\n panose1?: string,\n pathLength?: string,\n patternContentUnits?: string,\n patternTransform?: string,\n patternUnits?: string,\n pointerEvents?: string,\n points?: string,\n pointsAtX?: string,\n pointsAtY?: string,\n pointsAtZ?: string,\n preserveAlpha?: string,\n preserveAspectRatio?: string,\n primitiveUnits?: string,\n r?: string,\n radius?: string,\n referrerPolicy?: string,\n refX?: string,\n refY?: string,\n renderingIntent?: string,\n repeatCount?: string,\n repeatDur?: string,\n requiredExtensions?: string,\n requiredFeatures?: string,\n restart?: string,\n result?: string,\n rotate?: string,\n rx?: string,\n ry?: string,\n scale?: string,\n seed?: string,\n shapeRendering?: string,\n slope?: string,\n slot?: string,\n spacing?: string,\n specularConstant?: string,\n specularExponent?: string,\n speed?: string,\n spreadMethod?: string,\n startOffset?: string,\n stdDeviation?: string,\n stemh?: string,\n stemv?: string,\n stitchTiles?: string,\n stopColor?: string,\n stopOpacity?: string,\n strikethroughPosition?: string,\n strikethroughThickness?: string,\n string?: string,\n stroke?: string,\n strokeDasharray?: string,\n strokeDashoffset?: string,\n strokeLinecap?: string,\n strokeLinejoin?: string,\n strokeMiterlimit?: string,\n strokeOpacity?: string,\n strokeWidth?: string,\n surfaceScale?: string,\n systemLanguage?: string,\n tableValues?: string,\n targetX?: string,\n targetY?: string,\n textAnchor?: string,\n textDecoration?: string,\n textLength?: string,\n textRendering?: string,\n to?: string,\n to_?: string,\n transform?: string,\n u1?: string,\n u2?: string,\n underlinePosition?: string,\n underlineThickness?: string,\n unicode?: string,\n unicodeBidi?: string,\n unicodeRange?: string,\n unitsPerEm?: string,\n vAlphabetic?: string,\n vHanging?: string,\n vIdeographic?: string,\n vMathematical?: string,\n values?: string,\n vectorEffect?: string,\n version?: string,\n vertAdvX?: string,\n vertAdvY?: string,\n vertOriginX?: string,\n vertOriginY?: string,\n viewBox?: string,\n viewTarget?: string,\n visibility?: string,\n widths?: string,\n wordSpacing?: string,\n writingMode?: string,\n x?: string,\n x1?: string,\n x2?: string,\n xChannelSelector?: string,\n xHeight?: string,\n xlinkActuate?: string,\n xlinkArcrole?: string,\n xlinkHref?: string,\n xlinkRole?: string,\n xlinkShow?: string,\n xlinkTitle?: string,\n xlinkType?: string,\n xmlns?: string,\n xmlnsXlink?: string,\n xmlBase?: string,\n xmlLang?: string,\n xmlSpace?: string,\n y?: string,\n y1?: string,\n y2?: string,\n yChannelSelector?: string,\n z?: string,\n zoomAndPan?: string,\n about?: string,\n datatype?: string,\n inlist?: string,\n prefix?: string,\n property?: string,\n resource?: string,\n typeof?: string,\n vocab?: string,\n dangerouslySetInnerHTML?: {\"__html\": string},\n suppressContentEditableWarning?: bool,\n}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxDOM.res%22%2C20%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype Jsx.element\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Jsx.res%22%2C7%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype domRef\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxDOM.res%22%2C7%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype popover =\n | @as(\"auto\") Auto\n | @as(\"manual\") Manual\n | @as(\"hint\") Hint\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxDOM.res%22%2C11%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype popoverTargetAction =\n | @as(\"toggle\") Toggle\n | @as(\"show\") Show\n | @as(\"hide\") Hide\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxDOM.res%22%2C15%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype style = JsxDOMStyle.t\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxDOM.res%22%2C6%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Clipboard.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C77%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Composition.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C87%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Keyboard.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C96%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Focus.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C118%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Form.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C128%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Mouse.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C135%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Selection.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C212%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Touch.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C219%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Pointer.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C164%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.UI.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C242%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Wheel.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C253%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Media.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C265%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Image.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C272%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Animation.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C279%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Transition.t = synthetic\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxEvent.res%22%2C290%2C2%5D)\n" + } +} Hover src/Completion.res 352:17 Nothing at that position. Now trying to use completion. @@ -2142,7 +3248,12 @@ Path FAO.forAutoObject Raw opens: 2 Shadow.B.place holder ... Shadow.A.place holder Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib -{"contents": {"kind": "markdown", "value": "```rescript\n{\"age\": int, \"forAutoLabel\": FAR.forAutoRecord}\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\n{\"age\": int, \"forAutoLabel\": FAR.forAutoRecord}\n```" + } +} Hover src/Completion.res 355:17 Nothing at that position. Now trying to use completion. @@ -2163,7 +3274,12 @@ Found type for function ( unit, ~c: int, ) => int -{"contents": {"kind": "markdown", "value": "```rescript\noption\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\noption\n```" + } +} Complete src/Completion.res 358:23 posCursor:[358:23] posNoWhite:[358:22] Found expr:[0:-1->358:23] @@ -2187,87 +3303,116 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Value[T] Path T -[{ - "label": "That", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "That", - "documentation": {"kind": "markdown", "value": "```rescript\nThat\n```\n\n```rescript\ntype v = This | That\n```"} - }, { - "label": "This", + "documentation": { + "kind": "markdown", + "value": "```rescript\nThat\n```\n\n```rescript\ntype v = This | That\n```" + }, "kind": 4, - "tags": [], + "label": "That", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "This", - "documentation": {"kind": "markdown", "value": "```rescript\nThis\n```\n\n```rescript\ntype v = This | That\n```"} - }, { - "label": "TypedArray", - "kind": 9, - "tags": [], + "documentation": { + "kind": "markdown", + "value": "```rescript\nThis\n```\n\n```rescript\ntype v = This | That\n```" + }, + "kind": 4, + "label": "This", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "module TypedArray", - "documentation": null - }, { - "label": "TimeoutId", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], + "label": "TypedArray", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "module TimeoutId", - "documentation": null - }, { - "label": "Type", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], + "label": "TimeoutId", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "module Type", - "documentation": null - }, { - "label": "TableclothMap", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module TableclothMap", - "documentation": null, + "label": "Type", + "tags": [] + }, + { "data": { "modulePath": "TableclothMap", "filePath": "src/Completion.res" - } - }, { - "label": "TypeArgCtx", + }, + "deprecated": false, + "detail": "module TableclothMap", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], + "label": "TableclothMap", + "tags": [] + }, + { + "data": { "modulePath": "TypeArgCtx", "filePath": "src/Completion.res" }, + "deprecated": false, "detail": "module TypeArgCtx", - "documentation": null, - "data": { - "modulePath": "TypeArgCtx", - "filePath": "src/Completion.res" - } - }, { - "label": "TypeAtPosCompletion", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module TypeAtPosCompletion", - "documentation": null, + "label": "TypeArgCtx", + "tags": [] + }, + { "data": { "modulePath": "TypeAtPosCompletion", "filePath": "src/Completion.res" - } - }, { - "label": "TypeConstraint", + }, + "deprecated": false, + "detail": "module TypeAtPosCompletion", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module TypeConstraint", - "documentation": null, + "label": "TypeAtPosCompletion", + "tags": [] + }, + { "data": { "modulePath": "TypeConstraint", "filePath": "src/Completion.res" - } - }, { - "label": "TypeDefinition", + }, + "deprecated": false, + "detail": "module TypeConstraint", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module TypeDefinition", - "documentation": null, + "label": "TypeConstraint", + "tags": [] + }, + { "data": { "modulePath": "TypeDefinition", "filePath": "src/Completion.res" - } - }] + }, + "deprecated": false, + "detail": "module TypeDefinition", + "documentation": { "kind": "markdown", "value": "" }, + "kind": 9, + "label": "TypeDefinition", + "tags": [] + } +] Complete src/Completion.res 376:21 posCursor:[376:21] posNoWhite:[376:20] Found expr:[374:8->379:3] @@ -2280,13 +3425,20 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Value[AndThatOther, T] Path AndThatOther.T -[{ - "label": "ThatOther", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "ThatOther", - "documentation": {"kind": "markdown", "value": "```rescript\nThatOther\n```\n\n```rescript\ntype v = And | ThatOther\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nThatOther\n```\n\n```rescript\ntype v = And | ThatOther\n```" + }, + "kind": 4, + "label": "ThatOther", + "tags": [] + } +] Complete src/Completion.res 381:24 posCursor:[381:24] posNoWhite:[381:23] Found expr:[381:12->381:26] @@ -2301,19 +3453,26 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Value[ForAuto, ""] Path ForAuto. -[{ - "label": "abc", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(t, int) => t", - "documentation": null - }, { - "label": "abd", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "abc", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(t, int) => t", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "abd", + "tags": [] + } +] Complete src/Completion.res 384:38 posCursor:[384:38] posNoWhite:[384:37] Found expr:[384:12->384:41] @@ -2329,19 +3488,26 @@ Resolved opens 3 Stdlib Completion Completion ContextPath Value[FAO, forAutoObject][""] ContextPath Value[FAO, forAutoObject] Path FAO.forAutoObject -[{ - "label": "age", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }, { - "label": "forAutoLabel", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "age", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "FAR.forAutoRecord", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "forAutoLabel", + "tags": [] + } +] Complete src/Completion.res 387:24 posCursor:[387:24] posNoWhite:[387:23] Found expr:[387:11->387:26] @@ -2363,19 +3529,32 @@ Path funRecord CPPipe pathFromEnv: found:true Path Completion. Path -[{ - "label": "someFun", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(~name: string) => unit", - "documentation": {"kind": "markdown", "value": "```rescript\nsomeFun: (~name: string) => unit\n```\n\n```rescript\ntype funRecord = {\n someFun: (~name: string) => unit,\n stuff: string,\n}\n```"} - }, { - "label": "stuff", + "documentation": { + "kind": "markdown", + "value": "```rescript\nsomeFun: (~name: string) => unit\n```\n\n```rescript\ntype funRecord = {\n someFun: (~name: string) => unit,\n stuff: string,\n}\n```" + }, "kind": 5, - "tags": [], + "label": "someFun", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nstuff: string\n```\n\n```rescript\ntype funRecord = {\n someFun: (~name: string) => unit,\n stuff: string,\n}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nstuff: string\n```\n\n```rescript\ntype funRecord = {\n someFun: (~name: string) => unit,\n stuff: string,\n}\n```" + }, + "kind": 5, + "label": "stuff", + "tags": [] + } +] Complete src/Completion.res 391:12 posCursor:[391:12] posNoWhite:[391:11] Found expr:[390:8->394:1] @@ -2390,19 +3569,32 @@ ContextPath array Path Stdlib.Array.ma Path ArrayUtils.ma Path ma -[{ - "label": "Array.map", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a => 'b) => array<'b>", - "documentation": {"kind": "markdown", "value": "\n`map(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray = array->Array.map(greeting => greeting ++ \" to you\")\n\nmappedArray == [\"Hello to you\", \"Hi to you\", \"Good bye to you\"]\n```\n"} - }, { - "label": "Array.mapWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`map(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray = array->Array.map(greeting => greeting ++ \" to you\")\n\nmappedArray == [\"Hello to you\", \"Hi to you\", \"Good bye to you\"]\n```\n" + }, "kind": 12, - "tags": [], + "label": "Array.map", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, ('a, int) => 'b) => array<'b>", - "documentation": {"kind": "markdown", "value": "\n`mapWithIndex(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray =\n array->Array.mapWithIndex((greeting, index) => greeting ++ \" at position \" ++ Int.toString(index))\n\nmappedArray == [\"Hello at position 0\", \"Hi at position 1\", \"Good bye at position 2\"]\n```\n"} - }] + "documentation": { + "kind": "markdown", + "value": "\n`mapWithIndex(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray =\n array->Array.mapWithIndex((greeting, index) => greeting ++ \" at position \" ++ Int.toString(index))\n\nmappedArray == [\"Hello at position 0\", \"Hi at position 1\", \"Good bye at position 2\"]\n```\n" + }, + "kind": 12, + "label": "Array.mapWithIndex", + "tags": [] + } +] Complete src/Completion.res 399:14 posCursor:[399:14] posNoWhite:[399:13] Found expr:[398:14->399:20] @@ -2417,13 +3609,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Value[red] Path red -[{ - "label": "red", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "red", + "tags": [] + } +] Complete src/Completion.res 404:25 posCursor:[404:25] posNoWhite:[404:24] Found expr:[402:14->404:31] @@ -2438,13 +3634,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Value[red] Path red -[{ - "label": "red", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "red", + "tags": [] + } +] Complete src/Completion.res 407:22 posCursor:[407:22] posNoWhite:[407:21] Found expr:[407:11->485:0] @@ -2460,25 +3660,38 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Value[r] Path r -[{ - "label": "red", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }, { - "label": "retAA", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "red", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "unit => aa", - "documentation": null - }, { - "label": "r", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "retAA", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "rAlias", - "documentation": {"kind": "markdown", "value": "```rescript\ntype r = {x: int, y: string}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype r = {x: int, y: string}\n```" + }, + "kind": 12, + "label": "r", + "tags": [] + } +] Complete src/Completion.res 411:21 posCursor:[411:21] posNoWhite:[411:20] Found expr:[410:14->417:1] @@ -2492,19 +3705,26 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Value[SomeLocalModule, ""] Path SomeLocalModule. -[{ - "label": "bb", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }, { - "label": "aa", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "bb", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "aa", + "tags": [] + } +] Complete src/Completion.res 414:21 posCursor:[414:21] posNoWhite:[414:20] Found expr:[410:14->417:1] @@ -2519,19 +3739,26 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Value[SomeLocalModule, ""] Path SomeLocalModule. -[{ - "label": "bb", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }, { - "label": "aa", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "bb", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "aa", + "tags": [] + } +] Complete src/Completion.res 419:17 posCursor:[419:17] posNoWhite:[419:16] Found expr:[419:11->419:17] @@ -2543,67 +3770,128 @@ ContextPath int->t ContextPath int Path Stdlib.Int.t Path t -[{ - "label": "Int.toStringWithRadix", - "kind": 12, - "tags": [1], +[ + { + "data": null, + "deprecated": true, "detail": "(int, ~radix: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toString` instead\n\n\n`toStringWithRadix(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toStringWithRadix(6, ~radix=2) // \"110\"\nInt.toStringWithRadix(373592855, ~radix=16) // \"16449317\"\nInt.toStringWithRadix(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n"} - }, { - "label": "Int.toExponentialWithPrecision", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toString` instead\n\n\n`toStringWithRadix(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toStringWithRadix(6, ~radix=2) // \"110\"\nInt.toStringWithRadix(373592855, ~radix=16) // \"16449317\"\nInt.toStringWithRadix(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n" + }, "kind": 12, - "tags": [1], + "label": "Int.toStringWithRadix", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": true, "detail": "(int, ~digits: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toExponential` instead\n\n\n`toExponential(n, ~digits)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point. See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\non MDN.\n\n## Examples\n\n```rescript\nInt.toExponentialWithPrecision(77, ~digits=2) // \"7.70e+1\"\nInt.toExponentialWithPrecision(5678, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10.\n"} - }, { - "label": "Int.toFixedWithPrecision", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toExponential` instead\n\n\n`toExponential(n, ~digits)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point. See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\non MDN.\n\n## Examples\n\n```rescript\nInt.toExponentialWithPrecision(77, ~digits=2) // \"7.70e+1\"\nInt.toExponentialWithPrecision(5678, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10.\n" + }, "kind": 12, - "tags": [1], + "label": "Int.toExponentialWithPrecision", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": true, "detail": "(int, ~digits: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toFixed` instead\n\n\n`toFixedWithPrecision(n, ~digits)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point. See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)\non MDN.\n\n## Examples\n\n```rescript\nInt.toFixedWithPrecision(300, ~digits=4) // \"300.0000\"\nInt.toFixedWithPrecision(300, ~digits=1) // \"300.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is less than 0 or larger than 100.\n"} - }, { - "label": "Int.toPrecisionWithPrecision", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toFixed` instead\n\n\n`toFixedWithPrecision(n, ~digits)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point. See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)\non MDN.\n\n## Examples\n\n```rescript\nInt.toFixedWithPrecision(300, ~digits=4) // \"300.0000\"\nInt.toFixedWithPrecision(300, ~digits=1) // \"300.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is less than 0 or larger than 100.\n" + }, "kind": 12, - "tags": [1], + "label": "Int.toFixedWithPrecision", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": true, "detail": "(int, ~digits: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toPrecision` instead\n\n\n`toPrecisionWithPrecision(n, ~digits)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits. See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nInt.toPrecisionWithPrecision(100, ~digits=2) // \"1.0e+2\"\nInt.toPrecisionWithPrecision(1, ~digits=2) // \"1.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\n Implementations are allowed to support larger and smaller values as well.\n ECMA-262 only requires a precision of up to 21 significant digits.\n"} - }, { - "label": "Int.toPrecision", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toPrecision` instead\n\n\n`toPrecisionWithPrecision(n, ~digits)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits. See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nInt.toPrecisionWithPrecision(100, ~digits=2) // \"1.0e+2\"\nInt.toPrecisionWithPrecision(1, ~digits=2) // \"1.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\n Implementations are allowed to support larger and smaller values as well.\n ECMA-262 only requires a precision of up to 21 significant digits.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toPrecisionWithPrecision", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~digits: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toPrecision(n, ~digits=?)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits. See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nInt.toPrecision(100) // \"100\"\nInt.toPrecision(1) // \"1\"\nInt.toPrecision(100, ~digits=2) // \"1.0e+2\"\nInt.toPrecision(1, ~digits=2) // \"1.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\n Implementations are allowed to support larger and smaller values as well.\n ECMA-262 only requires a precision of up to 21 significant digits.\n"} - }, { - "label": "Int.toString", + "documentation": { + "kind": "markdown", + "value": "\n`toPrecision(n, ~digits=?)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits. See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nInt.toPrecision(100) // \"100\"\nInt.toPrecision(1) // \"1\"\nInt.toPrecision(100, ~digits=2) // \"1.0e+2\"\nInt.toPrecision(1, ~digits=2) // \"1.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\n Implementations are allowed to support larger and smaller values as well.\n ECMA-262 only requires a precision of up to 21 significant digits.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toPrecision", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~radix: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toString(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toString(1000) // \"1000\"\nInt.toString(-1000) // \"-1000\"\nInt.toString(6, ~radix=2) // \"110\"\nInt.toString(373592855, ~radix=16) // \"16449317\"\nInt.toString(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n"} - }, { - "label": "Int.toFloat", + "documentation": { + "kind": "markdown", + "value": "\n`toString(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toString(1000) // \"1000\"\nInt.toString(-1000) // \"-1000\"\nInt.toString(6, ~radix=2) // \"110\"\nInt.toString(373592855, ~radix=16) // \"16449317\"\nInt.toString(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toString", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int => float", - "documentation": {"kind": "markdown", "value": "\n`toFloat(n)` return a `float` representing the given value.\n\n## Examples\n\n```rescript\nInt.toFloat(100) == 100.0\nInt.toFloat(2) == 2.0\n```\n"} - }, { - "label": "Int.toLocaleString", + "documentation": { + "kind": "markdown", + "value": "\n`toFloat(n)` return a `float` representing the given value.\n\n## Examples\n\n```rescript\nInt.toFloat(100) == 100.0\nInt.toFloat(2) == 2.0\n```\n" + }, "kind": 12, - "tags": [], + "label": "Int.toFloat", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int => string", - "documentation": {"kind": "markdown", "value": "\n`toLocaleString(n)` return a `string` with language-sensitive representing the\ngiven value. See [`Number.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString) on MDN.\n\n## Examples\n\n```rescript\n// If the application uses English as the default language\nInt.toLocaleString(1000) // \"1,000\"\n\n// If the application uses Portuguese Brazil as the default language\nInt.toLocaleString(1000) // \"1.000\"\n```\n"} - }, { - "label": "Int.toExponential", + "documentation": { + "kind": "markdown", + "value": "\n`toLocaleString(n)` return a `string` with language-sensitive representing the\ngiven value. See [`Number.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString) on MDN.\n\n## Examples\n\n```rescript\n// If the application uses English as the default language\nInt.toLocaleString(1000) // \"1,000\"\n\n// If the application uses Portuguese Brazil as the default language\nInt.toLocaleString(1000) // \"1.000\"\n```\n" + }, "kind": 12, - "tags": [], + "label": "Int.toLocaleString", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~digits: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toExponential(n, ~digits=?)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point. See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\n\n## Examples\n\n```rescript\nInt.toExponential(1000) // \"1e+3\"\nInt.toExponential(-1000) // \"-1e+3\"\nInt.toExponential(77, ~digits=2) // \"7.70e+1\"\nInt.toExponential(5678, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10.\n"} - }, { - "label": "Int.toFixed", + "documentation": { + "kind": "markdown", + "value": "\n`toExponential(n, ~digits=?)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point. See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\n\n## Examples\n\n```rescript\nInt.toExponential(1000) // \"1e+3\"\nInt.toExponential(-1000) // \"-1e+3\"\nInt.toExponential(77, ~digits=2) // \"7.70e+1\"\nInt.toExponential(5678, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toExponential", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~digits: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toFixed(n, ~digits=?)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point. See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)\non MDN.\n\n## Examples\n\n```rescript\nInt.toFixed(123456) // \"123456.00\"\nInt.toFixed(10) // \"10.00\"\nInt.toFixed(300, ~digits=4) // \"300.0000\"\nInt.toFixed(300, ~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(n, ~digits=?)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point. See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)\non MDN.\n\n## Examples\n\n```rescript\nInt.toFixed(123456) // \"123456.00\"\nInt.toFixed(10) // \"10.00\"\nInt.toFixed(300, ~digits=4) // \"300.0000\"\nInt.toFixed(300, ~digits=1) // \"300.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is less than 0 or larger than 100.\n" + }, + "kind": 12, + "label": "Int.toFixed", + "tags": [] + } +] Complete src/Completion.res 422:19 posCursor:[422:19] posNoWhite:[422:18] Found expr:[422:11->422:19] @@ -2615,67 +3903,128 @@ ContextPath float->t ContextPath float Path Stdlib.Float.t Path t -[{ - "label": "Float.toStringWithRadix", - "kind": 12, - "tags": [1], +[ + { + "data": null, + "deprecated": true, "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"} - }, { - "label": "Float.toExponentialWithPrecision", + "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" + }, "kind": 12, - "tags": [1], + "label": "Float.toStringWithRadix", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": true, "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"} - }, { - "label": "Float.toInt", + "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" + }, "kind": 12, - "tags": [], + "label": "Float.toExponentialWithPrecision", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": false, "detail": "float => int", - "documentation": {"kind": "markdown", "value": "\n`toInt(v)` returns an int to given float `v`.\n\n## Examples\n\n```rescript\nFloat.toInt(2.0) == 2\nFloat.toInt(1.0) == 1\nFloat.toInt(1.1) == 1\nFloat.toInt(1.6) == 1\n```\n"} - }, { - "label": "Float.toFixedWithPrecision", + "documentation": { + "kind": "markdown", + "value": "\n`toInt(v)` returns an int to given float `v`.\n\n## Examples\n\n```rescript\nFloat.toInt(2.0) == 2\nFloat.toInt(1.0) == 1\nFloat.toInt(1.1) == 1\nFloat.toInt(1.6) == 1\n```\n" + }, "kind": 12, - "tags": [1], + "label": "Float.toInt", + "tags": [] + }, + { + "data": null, + "deprecated": true, "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"} - }, { - "label": "Float.toPrecisionWithPrecision", + "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" + }, "kind": 12, - "tags": [1], + "label": "Float.toFixedWithPrecision", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": true, "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).\n Implementations are allowed to support larger and smaller values as well.\n ECMA-262 only requires a precision of up to 21 significant digits.\n \n"} - }, { - "label": "Float.toPrecision", + "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).\n Implementations are allowed to support larger and smaller values as well.\n ECMA-262 only requires a precision of up to 21 significant digits.\n \n" + }, "kind": 12, - "tags": [], + "label": "Float.toPrecisionWithPrecision", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": false, "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).\n Implementations are allowed to support larger and smaller values as well.\n ECMA-262 only requires a precision of up to 21 significant digits.\n"} - }, { - "label": "Float.toString", + "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).\n Implementations are allowed to support larger and smaller values as well.\n ECMA-262 only requires a precision of up to 21 significant digits.\n" + }, "kind": 12, - "tags": [], + "label": "Float.toPrecision", + "tags": [] + }, + { + "data": null, + "deprecated": false, "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"} - }, { - "label": "Float.toLocaleString", + "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" + }, "kind": 12, - "tags": [], + "label": "Float.toString", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "float => string", - "documentation": {"kind": "markdown", "value": "\n`toLocaleString(v)` return a `string` with language-sensitive representing the\ngiven value.\nSee [`Number.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString) on MDN.\n\n## Examples\n\n```rescript\n// If the application uses English as the default language\nFloat.toLocaleString(1000.0) // \"1,000\"\n\n// If the application uses Portuguese Brazil as the default language\nFloat.toLocaleString(1000.0) // \"1.000\"\n```\n"} - }, { - "label": "Float.toExponential", + "documentation": { + "kind": "markdown", + "value": "\n`toLocaleString(v)` return a `string` with language-sensitive representing the\ngiven value.\nSee [`Number.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString) on MDN.\n\n## Examples\n\n```rescript\n// If the application uses English as the default language\nFloat.toLocaleString(1000.0) // \"1,000\"\n\n// If the application uses Portuguese Brazil as the default language\nFloat.toLocaleString(1000.0) // \"1.000\"\n```\n" + }, "kind": 12, - "tags": [], + "label": "Float.toLocaleString", + "tags": [] + }, + { + "data": null, + "deprecated": false, "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"} - }, { - "label": "Float.toFixed", + "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" + }, "kind": 12, - "tags": [], + "label": "Float.toExponential", + "tags": [] + }, + { + "data": null, + "deprecated": false, "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\"\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"} - }] + "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" + }, + "kind": 12, + "label": "Float.toFixed", + "tags": [] + } +] Complete src/Completion.res 427:8 posCursor:[427:8] posNoWhite:[427:7] Found expr:[427:3->427:8] @@ -2688,31 +4037,56 @@ ContextPath Value[ok] Path ok Path Stdlib.Result.g Path g -[{ - "label": "Result.getExn", - "kind": 12, - "tags": [1], +[ + { + "data": null, + "deprecated": true, "detail": "(result<'a, 'b>, ~message: string=?) => 'a", - "documentation": {"kind": "markdown", "value": "Deprecated: Use 'getOrThrow' instead\n\n\n `getExn(res, ~message=?)` returns `n` if `res` is `Ok(n)`, otherwise throws an exception with the message provided, or a generic message if no message was provided.\n\n ```res example\n Result.getExn(Result.Ok(42)) == 42\n \n switch Result.getExn(Error(\"Invalid data\")) {\n | exception _ => true\n | _ => false\n } == true\n\n switch Result.getExn(Error(\"Invalid data\"), ~message=\"was Error!\") {\n | exception _ => true // Throws a JsError with the message \"was Error!\"\n | _ => false\n } == true\n ```\n"} - }, { - "label": "Result.getOrThrow", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use 'getOrThrow' instead\n\n\n `getExn(res, ~message=?)` returns `n` if `res` is `Ok(n)`, otherwise throws an exception with the message provided, or a generic message if no message was provided.\n\n ```res example\n Result.getExn(Result.Ok(42)) == 42\n \n switch Result.getExn(Error(\"Invalid data\")) {\n | exception _ => true\n | _ => false\n } == true\n\n switch Result.getExn(Error(\"Invalid data\"), ~message=\"was Error!\") {\n | exception _ => true // Throws a JsError with the message \"was Error!\"\n | _ => false\n } == true\n ```\n" + }, "kind": 12, - "tags": [], + "label": "Result.getExn", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": false, "detail": "(result<'a, 'b>, ~message: string=?) => 'a", - "documentation": {"kind": "markdown", "value": "\n `getOrThrow(res, ~message=?)` returns `n` if `res` is `Ok(n)`, otherwise throws an exception with the message provided, or a generic message if no message was provided.\n\n ```res example\n Result.getOrThrow(Result.Ok(42)) == 42\n \n switch Result.getOrThrow(Error(\"Invalid data\")) {\n | exception _ => true\n | _ => false\n } == true\n\n switch Result.getOrThrow(Error(\"Invalid data\"), ~message=\"was Error!\") {\n | exception _ => true // Throws a JsError with the message \"was Error!\"\n | _ => false\n } == true\n ```\n"} - }, { - "label": "Result.getOr", + "documentation": { + "kind": "markdown", + "value": "\n `getOrThrow(res, ~message=?)` returns `n` if `res` is `Ok(n)`, otherwise throws an exception with the message provided, or a generic message if no message was provided.\n\n ```res example\n Result.getOrThrow(Result.Ok(42)) == 42\n \n switch Result.getOrThrow(Error(\"Invalid data\")) {\n | exception _ => true\n | _ => false\n } == true\n\n switch Result.getOrThrow(Error(\"Invalid data\"), ~message=\"was Error!\") {\n | exception _ => true // Throws a JsError with the message \"was Error!\"\n | _ => false\n } == true\n ```\n" + }, "kind": 12, - "tags": [], + "label": "Result.getOrThrow", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(result<'a, 'b>, 'a) => 'a", - "documentation": {"kind": "markdown", "value": "\n`getOr(res, defaultValue)`: If `res` is `Ok(n)`, returns `n`, otherwise `default`\n\n## Examples\n\n```rescript\nResult.getOr(Ok(42), 0) == 42\n\nResult.getOr(Error(\"Invalid Data\"), 0) == 0\n```\n"} - }, { - "label": "Result.getWithDefault", + "documentation": { + "kind": "markdown", + "value": "\n`getOr(res, defaultValue)`: If `res` is `Ok(n)`, returns `n`, otherwise `default`\n\n## Examples\n\n```rescript\nResult.getOr(Ok(42), 0) == 42\n\nResult.getOr(Error(\"Invalid Data\"), 0) == 0\n```\n" + }, "kind": 12, - "tags": [1], + "label": "Result.getOr", + "tags": [] + }, + { + "data": null, + "deprecated": true, "detail": "(result<'a, 'b>, 'a) => 'a", - "documentation": {"kind": "markdown", "value": "Deprecated: Use getOr instead\n\n"} - }] + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use getOr instead\n\n" + }, + "kind": 12, + "label": "Result.getWithDefault", + "tags": [ 1 ] + } +] Complete src/Completion.res 445:15 posCursor:[445:15] posNoWhite:[445:14] Found expr:[445:3->445:15] @@ -2730,19 +4104,32 @@ Path rWithDepr CPPipe pathFromEnv: found:true Path Completion.so Path so -[{ - "label": "someInt", - "kind": 5, - "tags": [1], +[ + { + "data": null, + "deprecated": true, "detail": "int", - "documentation": {"kind": "markdown", "value": "Deprecated: \n\n```rescript\nsomeInt: int\n```\n\n```rescript\ntype someRecordWithDeprecatedField = {\n name: string,\n someInt: int,\n someFloat: float,\n}\n```"} - }, { - "label": "someFloat", + "documentation": { + "kind": "markdown", + "value": "Deprecated: \n\n```rescript\nsomeInt: int\n```\n\n```rescript\ntype someRecordWithDeprecatedField = {\n name: string,\n someInt: int,\n someFloat: float,\n}\n```" + }, "kind": 5, - "tags": [1], + "label": "someInt", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": true, "detail": "float", - "documentation": {"kind": "markdown", "value": "Deprecated: Use 'someInt'.\n\n```rescript\nsomeFloat: float\n```\n\n```rescript\ntype someRecordWithDeprecatedField = {\n name: string,\n someInt: int,\n someFloat: float,\n}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use 'someInt'.\n\n```rescript\nsomeFloat: float\n```\n\n```rescript\ntype someRecordWithDeprecatedField = {\n name: string,\n someInt: int,\n someFloat: float,\n}\n```" + }, + "kind": 5, + "label": "someFloat", + "tags": [ 1 ] + } +] Complete src/Completion.res 452:37 XXX Not found! @@ -2752,31 +4139,50 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Type[someVariantWithDeprecated] Path someVariantWithDeprecated -[{ - "label": "DoNotUseMe", - "kind": 4, - "tags": [1], +[ + { + "data": null, + "deprecated": true, "detail": "DoNotUseMe", - "documentation": {"kind": "markdown", "value": "Deprecated: \n\n```rescript\nDoNotUseMe\n```\n\n```rescript\ntype someVariantWithDeprecated =\n | DoNotUseMe\n | UseMeInstead\n | AndNotMe\n```"}, + "documentation": { + "kind": "markdown", + "value": "Deprecated: \n\n```rescript\nDoNotUseMe\n```\n\n```rescript\ntype someVariantWithDeprecated =\n | DoNotUseMe\n | UseMeInstead\n | AndNotMe\n```" + }, "insertText": "DoNotUseMe", - "insertTextFormat": 2 - }, { - "label": "UseMeInstead", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "DoNotUseMe", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": false, "detail": "UseMeInstead", - "documentation": {"kind": "markdown", "value": "```rescript\nUseMeInstead\n```\n\n```rescript\ntype someVariantWithDeprecated =\n | DoNotUseMe\n | UseMeInstead\n | AndNotMe\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nUseMeInstead\n```\n\n```rescript\ntype someVariantWithDeprecated =\n | DoNotUseMe\n | UseMeInstead\n | AndNotMe\n```" + }, "insertText": "UseMeInstead", - "insertTextFormat": 2 - }, { - "label": "AndNotMe", + "insertTextFormat": 2, "kind": 4, - "tags": [1], + "label": "UseMeInstead", + "tags": [] + }, + { + "data": null, + "deprecated": true, "detail": "AndNotMe", - "documentation": {"kind": "markdown", "value": "Deprecated: Use 'UseMeInstead'\n\n```rescript\nAndNotMe\n```\n\n```rescript\ntype someVariantWithDeprecated =\n | DoNotUseMe\n | UseMeInstead\n | AndNotMe\n```"}, + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use 'UseMeInstead'\n\n```rescript\nAndNotMe\n```\n\n```rescript\ntype someVariantWithDeprecated =\n | DoNotUseMe\n | UseMeInstead\n | AndNotMe\n```" + }, "insertText": "AndNotMe", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "AndNotMe", + "tags": [ 1 ] + } +] Complete src/Completion.res 457:28 posCursor:[457:28] posNoWhite:[457:27] Found expr:[457:11->457:28] @@ -2790,19 +4196,32 @@ ContextPath Value[uncurried] Path uncurried Path Stdlib.Int.toS Path toS -[{ - "label": "Int.toStringWithRadix", - "kind": 12, - "tags": [1], +[ + { + "data": null, + "deprecated": true, "detail": "(int, ~radix: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toString` instead\n\n\n`toStringWithRadix(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toStringWithRadix(6, ~radix=2) // \"110\"\nInt.toStringWithRadix(373592855, ~radix=16) // \"16449317\"\nInt.toStringWithRadix(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n"} - }, { - "label": "Int.toString", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toString` instead\n\n\n`toStringWithRadix(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toStringWithRadix(6, ~radix=2) // \"110\"\nInt.toStringWithRadix(373592855, ~radix=16) // \"16449317\"\nInt.toStringWithRadix(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toStringWithRadix", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~radix: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toString(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toString(1000) // \"1000\"\nInt.toString(-1000) // \"-1000\"\nInt.toString(6, ~radix=2) // \"110\"\nInt.toString(373592855, ~radix=16) // \"16449317\"\nInt.toString(123456, ~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": "\n`toString(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toString(1000) // \"1000\"\nInt.toString(-1000) // \"-1000\"\nInt.toString(6, ~radix=2) // \"110\"\nInt.toString(373592855, ~radix=16) // \"16449317\"\nInt.toString(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n" + }, + "kind": 12, + "label": "Int.toString", + "tags": [] + } +] Complete src/Completion.res 462:30 XXX Not found! @@ -2812,16 +4231,20 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Type[withUncurried] Path withUncurried -[{ - "label": "v => v", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int => unit", - "documentation": null, - "sortText": "A", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "${1:v} => ${0:v}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "v => v", + "sortText": "A", + "tags": [] + } +] Complete src/Completion.res 465:26 posCursor:[465:26] posNoWhite:[465:25] Found expr:[465:22->465:26] @@ -2832,25 +4255,44 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath ValueOrField[FAR, ""] Path FAR. -[{ - "label": "forAutoRecord", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "forAutoRecord", - "documentation": {"kind": "markdown", "value": "```rescript\ntype forAutoRecord = {\n forAuto: ForAuto.t,\n something: option,\n}\n```"} - }, { - "label": "forAuto", - "kind": 5, - "tags": [], + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype forAutoRecord = {\n forAuto: ForAuto.t,\n something: option,\n}\n```" + }, + "kind": 12, + "label": "forAutoRecord", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "ForAuto.t", - "documentation": {"kind": "markdown", "value": "```rescript\nforAuto: ForAuto.t\n```\n\n```rescript\ntype forAutoRecord = {\n forAuto: ForAuto.t,\n something: option,\n}\n```"} - }, { - "label": "something", + "documentation": { + "kind": "markdown", + "value": "```rescript\nforAuto: ForAuto.t\n```\n\n```rescript\ntype forAutoRecord = {\n forAuto: ForAuto.t,\n something: option,\n}\n```" + }, "kind": 5, - "tags": [], + "label": "forAuto", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "option", - "documentation": {"kind": "markdown", "value": "```rescript\nsomething: option\n```\n\n```rescript\ntype forAutoRecord = {\n forAuto: ForAuto.t,\n something: option,\n}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nsomething: option\n```\n\n```rescript\ntype forAutoRecord = {\n forAuto: ForAuto.t,\n something: option,\n}\n```" + }, + "kind": 5, + "label": "something", + "tags": [] + } +] Complete src/Completion.res 471:45 XXX Not found! @@ -2860,19 +4302,32 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Type[someVariantWithRecord] Path someVariantWithRecord -[{ - "label": "field1", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nfield1: string\n```\n\n```rescript\ntype someRecord = {field1: string, field2: int}\n```"} - }, { - "label": "field2", + "documentation": { + "kind": "markdown", + "value": "```rescript\nfield1: string\n```\n\n```rescript\ntype someRecord = {field1: string, field2: int}\n```" + }, "kind": 5, - "tags": [], + "label": "field1", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nfield2: int\n```\n\n```rescript\ntype someRecord = {field1: string, field2: int}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nfield2: int\n```\n\n```rescript\ntype someRecord = {field1: string, field2: int}\n```" + }, + "kind": 5, + "label": "field2", + "tags": [] + } +] Complete src/Completion.res 474:48 XXX Not found! @@ -2882,19 +4337,32 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Type[someVariantWithRecord] Path someVariantWithRecord -[{ - "label": "field1", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nfield1: string\n```\n\n```rescript\ntype someRecord = {field1: string, field2: int}\n```"} - }, { - "label": "field2", + "documentation": { + "kind": "markdown", + "value": "```rescript\nfield1: string\n```\n\n```rescript\ntype someRecord = {field1: string, field2: int}\n```" + }, "kind": 5, - "tags": [], + "label": "field1", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nfield2: int\n```\n\n```rescript\ntype someRecord = {field1: string, field2: int}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nfield2: int\n```\n\n```rescript\ntype someRecord = {field1: string, field2: int}\n```" + }, + "kind": 5, + "label": "field2", + "tags": [] + } +] Complete src/Completion.res 479:57 XXX Not found! @@ -2904,19 +4372,32 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Type[someVariantWithInlineRecord] Path someVariantWithInlineRecord -[{ - "label": "field1", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nfield1: string\n```\n\n```rescript\n{field1: string, field2: int}\n```"} - }, { - "label": "field2", + "documentation": { + "kind": "markdown", + "value": "```rescript\nfield1: string\n```\n\n```rescript\n{field1: string, field2: int}\n```" + }, "kind": 5, - "tags": [], + "label": "field1", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nfield2: int\n```\n\n```rescript\n{field1: string, field2: int}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nfield2: int\n```\n\n```rescript\n{field1: string, field2: int}\n```" + }, + "kind": 5, + "label": "field2", + "tags": [] + } +] Complete src/Completion.res 482:60 XXX Not found! @@ -2926,17 +4407,30 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Type[someVariantWithInlineRecord] Path someVariantWithInlineRecord -[{ - "label": "field1", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nfield1: string\n```\n\n```rescript\n{field1: string, field2: int}\n```"} - }, { - "label": "field2", + "documentation": { + "kind": "markdown", + "value": "```rescript\nfield1: string\n```\n\n```rescript\n{field1: string, field2: int}\n```" + }, "kind": 5, - "tags": [], + "label": "field1", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nfield2: int\n```\n\n```rescript\n{field1: string, field2: int}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nfield2: int\n```\n\n```rescript\n{field1: string, field2: int}\n```" + }, + "kind": 5, + "label": "field2", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/CompletionAttributes.res.txt b/tests/analysis_tests/tests/src/expected/CompletionAttributes.res.txt index 1c7c3fb9df5..46a322d1ebb 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionAttributes.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionAttributes.res.txt @@ -1,254 +1,382 @@ +null Complete src/CompletionAttributes.res 0:8 Attribute id:modu:[0:3->0:8] label:modu Completable: Cdecorator(modu) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib -[{ - "label": "module", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "", - "documentation": {"kind": "markdown", "value": "The `@module` decorator is used to bind to a JavaScript module.\n\n[Read more and see examples in the documentation](https://rescript-lang.org/syntax-lookup#module-decorator)."}, + "documentation": { + "kind": "markdown", + "value": "The `@module` decorator is used to bind to a JavaScript module.\n\n[Read more and see examples in the documentation](https://rescript-lang.org/syntax-lookup#module-decorator)." + }, "insertText": "module(\"$0\")", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "module", + "tags": [] + } +] Complete src/CompletionAttributes.res 3:12 XXX Not found! Completable: CdecoratorPayload(module=) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib -[{ - "label": "@rescript/react", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "Package", - "documentation": null - }, { - "label": "./test.json", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "@rescript/react", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Local file", - "documentation": null - }, { - "label": "./tst.js", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "./test.json", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Local file", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "./tst.js", + "tags": [] + } +] Complete src/CompletionAttributes.res 6:7 Attribute id:js:[6:3->6:7] label:@js Completable: Cdecorator(@js) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib -[{ - "label": "jsxConfig", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "", - "documentation": {"kind": "markdown", "value": "The `@@jsxConfig` decorator is used to change the config for JSX on the fly.\n\n[Read more and see examples in the documentation](https://rescript-lang.org/docs/manual/latest/jsx#file-level-configuration)."}, + "documentation": { + "kind": "markdown", + "value": "The `@@jsxConfig` decorator is used to change the config for JSX on the fly.\n\n[Read more and see examples in the documentation](https://rescript-lang.org/docs/manual/latest/jsx#file-level-configuration)." + }, "insertText": "jsxConfig({$0})", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "jsxConfig", + "tags": [] + } +] Complete src/CompletionAttributes.res 9:16 XXX Not found! Completable: JsxConfig Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib -[{ - "label": "version", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nversion?: int\n```\n\n```rescript\ntype jsxConfig = {version: int, module_: string, mode: string}\n```"} - }, { - "label": "module_", + "documentation": { + "kind": "markdown", + "value": "```rescript\nversion?: int\n```\n\n```rescript\ntype jsxConfig = {version: int, module_: string, mode: string}\n```" + }, "kind": 5, - "tags": [], + "label": "version", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nmodule_?: string\n```\n\n```rescript\ntype jsxConfig = {version: int, module_: string, mode: string}\n```"} - }, { - "label": "mode", + "documentation": { + "kind": "markdown", + "value": "```rescript\nmodule_?: string\n```\n\n```rescript\ntype jsxConfig = {version: int, module_: string, mode: string}\n```" + }, "kind": 5, - "tags": [], + "label": "module_", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nmode?: string\n```\n\n```rescript\ntype jsxConfig = {version: int, module_: string, mode: string}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nmode?: string\n```\n\n```rescript\ntype jsxConfig = {version: int, module_: string, mode: string}\n```" + }, + "kind": 5, + "label": "mode", + "tags": [] + } +] Complete src/CompletionAttributes.res 12:17 XXX Not found! Completable: JsxConfig Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib -[{ - "label": "module_", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nmodule_?: string\n```\n\n```rescript\ntype jsxConfig = {version: int, module_: string, mode: string}\n```"} - }, { - "label": "mode", + "documentation": { + "kind": "markdown", + "value": "```rescript\nmodule_?: string\n```\n\n```rescript\ntype jsxConfig = {version: int, module_: string, mode: string}\n```" + }, "kind": 5, - "tags": [], + "label": "module_", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nmode?: string\n```\n\n```rescript\ntype jsxConfig = {version: int, module_: string, mode: string}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nmode?: string\n```\n\n```rescript\ntype jsxConfig = {version: int, module_: string, mode: string}\n```" + }, + "kind": 5, + "label": "mode", + "tags": [] + } +] Complete src/CompletionAttributes.res 15:25 XXX Not found! Completable: JsxConfig Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib -[{ - "label": "\"\"", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null, - "sortText": "A", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "\"$0\"", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "\"\"", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionAttributes.res 18:29 XXX Not found! Completable: JsxConfig Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib -[{ - "label": "version", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nversion?: int\n```\n\n```rescript\ntype jsxConfig = {version: int, module_: string, mode: string}\n```"} - }, { - "label": "mode", + "documentation": { + "kind": "markdown", + "value": "```rescript\nversion?: int\n```\n\n```rescript\ntype jsxConfig = {version: int, module_: string, mode: string}\n```" + }, "kind": 5, - "tags": [], + "label": "version", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nmode?: string\n```\n\n```rescript\ntype jsxConfig = {version: int, module_: string, mode: string}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nmode?: string\n```\n\n```rescript\ntype jsxConfig = {version: int, module_: string, mode: string}\n```" + }, + "kind": 5, + "label": "mode", + "tags": [] + } +] Complete src/CompletionAttributes.res 21:12 XXX Not found! Completable: CdecoratorPayload(moduleWithImportAttributes) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib -[{ - "label": "from", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nfrom?: string\n```\n\n```rescript\ntype moduleConfig = {from: string, with: string}\n```"} - }, { - "label": "with", + "documentation": { + "kind": "markdown", + "value": "```rescript\nfrom?: string\n```\n\n```rescript\ntype moduleConfig = {from: string, with: string}\n```" + }, "kind": 5, - "tags": [], + "label": "from", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nwith?: string\n```\n\n```rescript\ntype moduleConfig = {from: string, with: string}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nwith?: string\n```\n\n```rescript\ntype moduleConfig = {from: string, with: string}\n```" + }, + "kind": 5, + "label": "with", + "tags": [] + } +] Complete src/CompletionAttributes.res 24:17 XXX Not found! Completable: CdecoratorPayload(moduleWithImportAttributes) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib -[{ - "label": "{}", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "importAttributesConfig", - "documentation": {"kind": "markdown", "value": "```rescript\ntype importAttributesConfig = {type_: string}\n```"}, - "sortText": "A", + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype importAttributesConfig = {type_: string}\n```" + }, "insertText": "{$0}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "{}", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionAttributes.res 27:19 XXX Not found! Completable: CdecoratorPayload(moduleWithImportAttributes) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib -[{ - "label": "type_", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\ntype_?: string\n```\n\n```rescript\ntype importAttributesConfig = {type_: string}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype_?: string\n```\n\n```rescript\ntype importAttributesConfig = {type_: string}\n```" + }, + "kind": 5, + "label": "type_", + "tags": [] + } +] Complete src/CompletionAttributes.res 30:19 XXX Not found! Completable: CdecoratorPayload(module=) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib -[{ - "label": "@rescript/react", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "Package", - "documentation": null - }, { - "label": "./test.json", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "@rescript/react", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Local file", - "documentation": null - }, { - "label": "./tst.js", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "./test.json", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Local file", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "./tst.js", + "tags": [] + } +] Complete src/CompletionAttributes.res 33:17 XXX Not found! Completable: CdecoratorPayload(module=) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib -[{ - "label": "@rescript/react", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "Package", - "documentation": null - }, { - "label": "./test.json", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "@rescript/react", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Local file", - "documentation": null - }, { - "label": "./tst.js", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "./test.json", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Local file", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "./tst.js", + "tags": [] + } +] Complete src/CompletionAttributes.res 36:14 posCursor:[36:14] posNoWhite:[36:13] Found expr:[36:12->36:14] Completable: CextensionNode(t) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib -[{ - "label": "todo", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "`%todo` is used to tell the compiler that some code still needs to be implemented.", - "documentation": null, - "insertText": "todo" - }, { - "label": "todo (with payload)", + "documentation": { "kind": "markdown", "value": "" }, + "insertText": "todo", "kind": 4, - "tags": [], + "label": "todo", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "`%todo` is used to tell the compiler that some code still needs to be implemented. With a payload.", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "todo(\"${0:TODO}\")", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "todo (with payload)", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/CompletionConfiguredBuiltins.res.txt b/tests/analysis_tests/tests/src/expected/CompletionConfiguredBuiltins.res.txt index bb2bf05e4e4..c4433c27cc0 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionConfiguredBuiltins.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionConfiguredBuiltins.res.txt @@ -1,3 +1,4 @@ +null Complete src/CompletionConfiguredBuiltins.res 2:8 posCursor:[2:8] posNoWhite:[2:7] Found expr:[2:3->2:8] Completable: Cpath Value[x]->em @@ -9,13 +10,17 @@ Path x Path Stdlib.Array.em Path ArrayUtils.em Path em -[{ - "label": "ArrayUtils.empty", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "array<'a> => bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "ArrayUtils.empty", + "tags": [] + } +] Complete src/CompletionConfiguredBuiltins.res 7:16 posCursor:[7:16] posNoWhite:[7:15] Found expr:[7:3->7:16] @@ -29,11 +34,15 @@ CPPipe pathFromEnv:Fastify found:false Path Fastify.doSt Path FastifyExt.doSt Path doSt -[{ - "label": "FastifyExt.doStuff", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "Fastify.t => unit", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "FastifyExt.doStuff", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/CompletionDicts.res.txt b/tests/analysis_tests/tests/src/expected/CompletionDicts.res.txt index 60614d70457..32fac397ca5 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionDicts.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionDicts.res.txt @@ -1,3 +1,4 @@ +null Complete src/CompletionDicts.res 0:30 posCursor:[0:30] posNoWhite:[0:29] Found expr:[0:14->0:32] Pexp_apply ...[0:14->0:28] (...[0:29->0:31]) @@ -7,15 +8,19 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[Dict, fromArray]($0) ContextPath Value[Dict, fromArray] Path Dict.fromArray -[{ - "label": "(_, _)", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(string, 'a)", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "(${1:_}, ${2:_})", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "(_, _)", + "tags": [] + } +] Complete src/CompletionDicts.res 3:31 posCursor:[3:31] posNoWhite:[3:30] Found expr:[3:14->3:34] @@ -26,15 +31,19 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[Dict, fromArray]($0) ContextPath Value[Dict, fromArray] Path Dict.fromArray -[{ - "label": "(_, _)", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(string, 'a)", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "(${1:_}, ${2:_})", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "(_, _)", + "tags": [] + } +] Complete src/CompletionDicts.res 6:37 posCursor:[6:37] posNoWhite:[6:36] Found expr:[6:14->6:41] @@ -57,18 +66,25 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[Dict, fromArray]($0) ContextPath Value[Dict, fromArray] Path Dict.fromArray -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "false", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/CompletionExpressions.res.txt b/tests/analysis_tests/tests/src/expected/CompletionExpressions.res.txt index 2e1b28d5f57..f914fcac751 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionExpressions.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionExpressions.res.txt @@ -1,3 +1,4 @@ +null Complete src/CompletionExpressions.res 3:20 XXX Not found! Completable: Cpattern CTuple(Value[s], Value[f]) @@ -8,15 +9,19 @@ ContextPath Value[s] Path s ContextPath Value[f] Path f -[{ - "label": "(_, _)", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(bool, option>)", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "(${1:_}, ${2:_})", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "(_, _)", + "tags": [] + } +] Complete src/CompletionExpressions.res 26:27 posCursor:[26:27] posNoWhite:[26:26] Found expr:[26:11->26:29] @@ -27,43 +32,80 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord -[{ - "label": "age", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nage: int\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```"} - }, { - "label": "offline", + "documentation": { + "kind": "markdown", + "value": "```rescript\nage: int\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```" + }, "kind": 5, - "tags": [], + "label": "age", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": {"kind": "markdown", "value": "```rescript\noffline: bool\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```"} - }, { - "label": "online", + "documentation": { + "kind": "markdown", + "value": "```rescript\noffline: bool\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```" + }, "kind": 5, - "tags": [], + "label": "offline", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "option", - "documentation": {"kind": "markdown", "value": "```rescript\nonline: option\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```"} - }, { - "label": "variant", + "documentation": { + "kind": "markdown", + "value": "```rescript\nonline: option\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```" + }, "kind": 5, - "tags": [], + "label": "online", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "someVariant", - "documentation": {"kind": "markdown", "value": "```rescript\nvariant: someVariant\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```"} - }, { - "label": "polyvariant", + "documentation": { + "kind": "markdown", + "value": "```rescript\nvariant: someVariant\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```" + }, "kind": 5, - "tags": [], + "label": "variant", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "somePolyVariant", - "documentation": {"kind": "markdown", "value": "```rescript\npolyvariant: somePolyVariant\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```"} - }, { - "label": "nested", + "documentation": { + "kind": "markdown", + "value": "```rescript\npolyvariant: somePolyVariant\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```" + }, "kind": 5, - "tags": [], + "label": "polyvariant", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "option", - "documentation": {"kind": "markdown", "value": "```rescript\nnested: option\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nnested: option\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```" + }, + "kind": 5, + "label": "nested", + "tags": [] + } +] Complete src/CompletionExpressions.res 29:28 posCursor:[29:28] posNoWhite:[29:27] Found expr:[29:11->29:30] @@ -74,13 +116,20 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord -[{ - "label": "nested", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "option", - "documentation": {"kind": "markdown", "value": "```rescript\nnested: option\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nnested: option\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```" + }, + "kind": 5, + "label": "nested", + "tags": [] + } +] Complete src/CompletionExpressions.res 32:35 posCursor:[32:35] posNoWhite:[32:34] Found expr:[32:11->32:38] @@ -91,19 +140,26 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "false", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] Complete src/CompletionExpressions.res 35:36 posCursor:[35:36] posNoWhite:[35:35] Found expr:[35:11->35:39] @@ -114,37 +170,68 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord -[{ - "label": "offline", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": {"kind": "markdown", "value": "```rescript\noffline: bool\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```"} - }, { - "label": "online", + "documentation": { + "kind": "markdown", + "value": "```rescript\noffline: bool\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```" + }, "kind": 5, - "tags": [], + "label": "offline", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "option", - "documentation": {"kind": "markdown", "value": "```rescript\nonline: option\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```"} - }, { - "label": "variant", + "documentation": { + "kind": "markdown", + "value": "```rescript\nonline: option\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```" + }, "kind": 5, - "tags": [], + "label": "online", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "someVariant", - "documentation": {"kind": "markdown", "value": "```rescript\nvariant: someVariant\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```"} - }, { - "label": "polyvariant", + "documentation": { + "kind": "markdown", + "value": "```rescript\nvariant: someVariant\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```" + }, "kind": 5, - "tags": [], + "label": "variant", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "somePolyVariant", - "documentation": {"kind": "markdown", "value": "```rescript\npolyvariant: somePolyVariant\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```"} - }, { - "label": "nested", + "documentation": { + "kind": "markdown", + "value": "```rescript\npolyvariant: somePolyVariant\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```" + }, "kind": 5, - "tags": [], + "label": "polyvariant", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "option", - "documentation": {"kind": "markdown", "value": "```rescript\nnested: option\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nnested: option\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```" + }, + "kind": 5, + "label": "nested", + "tags": [] + } +] Complete src/CompletionExpressions.res 38:37 posCursor:[38:37] posNoWhite:[38:35] Found expr:[38:11->38:53] @@ -155,31 +242,56 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord -[{ - "label": "online", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "option", - "documentation": {"kind": "markdown", "value": "```rescript\nonline: option\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```"} - }, { - "label": "variant", + "documentation": { + "kind": "markdown", + "value": "```rescript\nonline: option\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```" + }, "kind": 5, - "tags": [], + "label": "online", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "someVariant", - "documentation": {"kind": "markdown", "value": "```rescript\nvariant: someVariant\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```"} - }, { - "label": "polyvariant", + "documentation": { + "kind": "markdown", + "value": "```rescript\nvariant: someVariant\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```" + }, "kind": 5, - "tags": [], + "label": "variant", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "somePolyVariant", - "documentation": {"kind": "markdown", "value": "```rescript\npolyvariant: somePolyVariant\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```"} - }, { - "label": "nested", + "documentation": { + "kind": "markdown", + "value": "```rescript\npolyvariant: somePolyVariant\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```" + }, "kind": 5, - "tags": [], + "label": "polyvariant", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "option", - "documentation": {"kind": "markdown", "value": "```rescript\nnested: option\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nnested: option\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```" + }, + "kind": 5, + "label": "nested", + "tags": [] + } +] Complete src/CompletionExpressions.res 41:44 posCursor:[41:44] posNoWhite:[41:43] Found expr:[41:11->41:47] @@ -190,37 +302,62 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord -[{ - "label": "Some(nested)", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "otherRecord", - "documentation": {"kind": "markdown", "value": "```rescript\ntype otherRecord = {someField: int, otherField: string}\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype otherRecord = {someField: int, otherField: string}\n```" + }, "insertText": "Some(nested)$0", - "insertTextFormat": 2 - }, { - "label": "Some(_)", + "insertTextFormat": 2, "kind": 12, - "tags": [], + "label": "Some(nested)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "otherRecord", - "documentation": {"kind": "markdown", "value": "```rescript\ntype otherRecord = {someField: int, otherField: string}\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype otherRecord = {someField: int, otherField: string}\n```" + }, "insertText": "Some($0)", - "insertTextFormat": 2 - }, { - "label": "None", + "insertTextFormat": 2, "kind": 12, - "tags": [], + "label": "Some(_)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "otherRecord", - "documentation": {"kind": "markdown", "value": "```rescript\ntype otherRecord = {someField: int, otherField: string}\n```"} - }, { - "label": "Some({})", + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype otherRecord = {someField: int, otherField: string}\n```" + }, "kind": 12, - "tags": [], + "label": "None", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "otherRecord", - "documentation": {"kind": "markdown", "value": "```rescript\ntype otherRecord = {someField: int, otherField: string}\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype otherRecord = {someField: int, otherField: string}\n```" + }, "insertText": "Some({$0})", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "Some({})", + "tags": [] + } +] Complete src/CompletionExpressions.res 44:46 posCursor:[44:46] posNoWhite:[44:45] Found expr:[44:11->44:49] @@ -242,19 +379,32 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord -[{ - "label": "someField", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nsomeField: int\n```\n\n```rescript\ntype otherRecord = {someField: int, otherField: string}\n```"} - }, { - "label": "otherField", + "documentation": { + "kind": "markdown", + "value": "```rescript\nsomeField: int\n```\n\n```rescript\ntype otherRecord = {someField: int, otherField: string}\n```" + }, "kind": 5, - "tags": [], + "label": "someField", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\notherField: string\n```\n\n```rescript\ntype otherRecord = {someField: int, otherField: string}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\notherField: string\n```\n\n```rescript\ntype otherRecord = {someField: int, otherField: string}\n```" + }, + "kind": 5, + "label": "otherField", + "tags": [] + } +] Complete src/CompletionExpressions.res 50:45 posCursor:[50:45] posNoWhite:[50:44] Found expr:[50:11->50:48] @@ -265,31 +415,50 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord -[{ - "label": "One", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "One", - "documentation": {"kind": "markdown", "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two | Three(int, string)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two | Three(int, string)\n```" + }, "insertText": "One", - "insertTextFormat": 2 - }, { - "label": "Two", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "One", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Two", - "documentation": {"kind": "markdown", "value": "```rescript\nTwo\n```\n\n```rescript\ntype someVariant = One | Two | Three(int, string)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nTwo\n```\n\n```rescript\ntype someVariant = One | Two | Three(int, string)\n```" + }, "insertText": "Two", - "insertTextFormat": 2 - }, { - "label": "Three(_, _)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "Two", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Three(int, string)", - "documentation": {"kind": "markdown", "value": "```rescript\nThree(int, string)\n```\n\n```rescript\ntype someVariant = One | Two | Three(int, string)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nThree(int, string)\n```\n\n```rescript\ntype someVariant = One | Two | Three(int, string)\n```" + }, "insertText": "Three(${1:_}, ${2:_})", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "Three(_, _)", + "tags": [] + } +] Complete src/CompletionExpressions.res 53:47 posCursor:[53:47] posNoWhite:[53:46] Found expr:[53:11->53:50] @@ -300,15 +469,22 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord -[{ - "label": "One", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "One", - "documentation": {"kind": "markdown", "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two | Three(int, string)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two | Three(int, string)\n```" + }, "insertText": "One", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "One", + "tags": [] + } +] Complete src/CompletionExpressions.res 56:57 posCursor:[56:57] posNoWhite:[56:56] Found expr:[56:11->56:61] @@ -319,16 +495,23 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord -[{ - "label": "{}", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "someRecord", - "documentation": {"kind": "markdown", "value": "```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```"}, - "sortText": "A", + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype someRecord = {age: int, offline: bool, online: option, variant: someVariant, polyvariant: somePolyVariant, nested: option}\n```" + }, "insertText": "{$0}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "{}", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionExpressions.res 59:60 posCursor:[59:60] posNoWhite:[59:59] Found expr:[59:11->59:65] @@ -339,19 +522,26 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "false", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] Complete src/CompletionExpressions.res 62:62 posCursor:[62:62] posNoWhite:[62:61] Found expr:[62:11->62:66] @@ -362,20 +552,30 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null, - "sortText": "A true" - }, { - "label": "typeof", - "kind": 12, - "tags": [], + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "true", + "sortText": "A true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "'a => Type.t", - "documentation": {"kind": "markdown", "value": "\n`typeof(value)` exposes JavaScript's `typeof` operator and returns a `Type.t` enum.\nIt helps you inspect values that come from JavaScript APIs.\n\n## Examples\n\n```rescript\ntypeof(1) == #number\ntypeof(\"a\") == #string\n```\n"} - }] + "documentation": { + "kind": "markdown", + "value": "\n`typeof(value)` exposes JavaScript's `typeof` operator and returns a `Type.t` enum.\nIt helps you inspect values that come from JavaScript APIs.\n\n## Examples\n\n```rescript\ntypeof(1) == #number\ntypeof(\"a\") == #string\n```\n" + }, + "kind": 12, + "label": "typeof", + "tags": [] + } +] Complete src/CompletionExpressions.res 69:25 posCursor:[69:25] posNoWhite:[69:24] Found expr:[69:11->69:26] @@ -386,16 +586,20 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingArray]($0) ContextPath Value[fnTakingArray] Path fnTakingArray -[{ - "label": "[]", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "option", - "documentation": null, - "sortText": "A", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "[$0]", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "[]", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionExpressions.res 72:26 posCursor:[72:26] posNoWhite:[72:25] Found expr:[72:11->72:28] @@ -406,33 +610,46 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingArray]($0) ContextPath Value[fnTakingArray] Path fnTakingArray -[{ - "label": "None", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "Some(_)", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "None", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "Some($0)", - "insertTextFormat": 2 - }, { - "label": "Some(true)", - "kind": 4, - "tags": [], + "insertTextFormat": 2, + "kind": 12, + "label": "Some(_)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "Some(false)", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "Some(true)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "Some(false)", + "tags": [] + } +] Complete src/CompletionExpressions.res 75:26 posCursor:[75:26] posNoWhite:[75:25] Found expr:[75:11->75:27] @@ -443,37 +660,65 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingArray]($0) ContextPath Value[fnTakingArray] Path fnTakingArray -[{ - "label": "s", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "setTimeoutFloat", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "s", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(unit => unit, float) => timeoutId", - "documentation": {"kind": "markdown", "value": "\n`setTimeoutFloat(callback, durationInMilliseconds)` starts a timer that will execute `callback` after `durationInMilliseconds`.\n\nThe same as `setTimeout`, but allows you to pass a `float` instead of an `int` for the duration.\n\nSee [`setTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/setTimeout) on MDN.\n\n## Examples\n\n```rescript\n// Log to the console after 200 milliseconds.\nlet timeoutId = setTimeoutFloat(() => {\n Console.log(\"This prints in 200 ms.\")\n}, 200.)\n```\n"} - }, { - "label": "setIntervalFloat", + "documentation": { + "kind": "markdown", + "value": "\n`setTimeoutFloat(callback, durationInMilliseconds)` starts a timer that will execute `callback` after `durationInMilliseconds`.\n\nThe same as `setTimeout`, but allows you to pass a `float` instead of an `int` for the duration.\n\nSee [`setTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/setTimeout) on MDN.\n\n## Examples\n\n```rescript\n// Log to the console after 200 milliseconds.\nlet timeoutId = setTimeoutFloat(() => {\n Console.log(\"This prints in 200 ms.\")\n}, 200.)\n```\n" + }, "kind": 12, - "tags": [], + "label": "setTimeoutFloat", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(unit => unit, float) => intervalId", - "documentation": {"kind": "markdown", "value": "\n`setIntervalFloat(callback, intervalInMilliseconds)` starts an interval that will execute `callback` every `durationInMilliseconds` milliseconds.\n\nThe same as `setInterval`, but allows you to pass a `float` instead of an `int` for the duration.\n\nSee [`setInterval`](https://developer.mozilla.org/en-US/docs/Web/API/setInterval) on MDN.\n\n## Examples\n\n```rescript\n// Log to the console ever 2 seconds (200 milliseconds).\nlet intervalId = setIntervalFloat(() => {\n Console.log(\"This prints every 200 ms\")\n}, 200.)\n\n// Stop the interval after 500 ms\nlet timeoutId = setTimeoutFloat(() => {\n clearInterval(intervalId)\n}, 500.0)\n```\n"} - }, { - "label": "setInterval", + "documentation": { + "kind": "markdown", + "value": "\n`setIntervalFloat(callback, intervalInMilliseconds)` starts an interval that will execute `callback` every `durationInMilliseconds` milliseconds.\n\nThe same as `setInterval`, but allows you to pass a `float` instead of an `int` for the duration.\n\nSee [`setInterval`](https://developer.mozilla.org/en-US/docs/Web/API/setInterval) on MDN.\n\n## Examples\n\n```rescript\n// Log to the console ever 2 seconds (200 milliseconds).\nlet intervalId = setIntervalFloat(() => {\n Console.log(\"This prints every 200 ms\")\n}, 200.)\n\n// Stop the interval after 500 ms\nlet timeoutId = setTimeoutFloat(() => {\n clearInterval(intervalId)\n}, 500.0)\n```\n" + }, "kind": 12, - "tags": [], + "label": "setIntervalFloat", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(unit => unit, int) => intervalId", - "documentation": {"kind": "markdown", "value": "\n`setInterval(callback, intervalInMilliseconds)` starts an interval that will execute `callback` every `durationInMilliseconds` milliseconds.\n\nSee [`setInterval`](https://developer.mozilla.org/en-US/docs/Web/API/setInterval) on MDN.\n\n## Examples\n\n```rescript\n// Log to the console ever 200 ms (200 milliseconds).\nlet intervalId = setInterval(() => {\n Console.log(\"This prints every 200 ms.\")\n}, 200)\n\nlet timeoutId = setTimeout(() => {\n clearInterval(intervalId)\n}, 500)\n```\n"} - }, { - "label": "setTimeout", + "documentation": { + "kind": "markdown", + "value": "\n`setInterval(callback, intervalInMilliseconds)` starts an interval that will execute `callback` every `durationInMilliseconds` milliseconds.\n\nSee [`setInterval`](https://developer.mozilla.org/en-US/docs/Web/API/setInterval) on MDN.\n\n## Examples\n\n```rescript\n// Log to the console ever 200 ms (200 milliseconds).\nlet intervalId = setInterval(() => {\n Console.log(\"This prints every 200 ms.\")\n}, 200)\n\nlet timeoutId = setTimeout(() => {\n clearInterval(intervalId)\n}, 500)\n```\n" + }, "kind": 12, - "tags": [], + "label": "setInterval", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(unit => unit, int) => timeoutId", - "documentation": {"kind": "markdown", "value": "\n`setTimeout(callback, durationInMilliseconds)` starts a timer that will execute `callback` after `durationInMilliseconds`.\n\nSee [`setTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/setTimeout) on MDN.\n\n## Examples\n\n```rescript\n// Log to the console after 200 milliseconds.\nlet timeoutId = setTimeout(() => {\n Console.log(\"This prints in 200 ms.\")\n}, 200)\n```\n"} - }] + "documentation": { + "kind": "markdown", + "value": "\n`setTimeout(callback, durationInMilliseconds)` starts a timer that will execute `callback` after `durationInMilliseconds`.\n\nSee [`setTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/setTimeout) on MDN.\n\n## Examples\n\n```rescript\n// Log to the console after 200 milliseconds.\nlet timeoutId = setTimeout(() => {\n Console.log(\"This prints in 200 ms.\")\n}, 200)\n```\n" + }, + "kind": 12, + "label": "setTimeout", + "tags": [] + } +] Complete src/CompletionExpressions.res 78:31 posCursor:[78:31] posNoWhite:[78:30] Found expr:[78:11->78:34] @@ -484,19 +729,26 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingArray]($0) ContextPath Value[fnTakingArray] Path fnTakingArray -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "false", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] Complete src/CompletionExpressions.res 81:31 posCursor:[81:31] posNoWhite:[81:30] Found expr:[81:11->81:34] @@ -507,33 +759,46 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingArray]($0) ContextPath Value[fnTakingArray] Path fnTakingArray -[{ - "label": "None", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "Some(_)", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "None", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "Some($0)", - "insertTextFormat": 2 - }, { - "label": "Some(true)", - "kind": 4, - "tags": [], + "insertTextFormat": 2, + "kind": 12, + "label": "Some(_)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "Some(false)", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "Some(true)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "Some(false)", + "tags": [] + } +] Complete src/CompletionExpressions.res 84:31 posCursor:[84:31] posNoWhite:[84:30] Found expr:[84:11->84:40] @@ -544,33 +809,46 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingArray]($0) ContextPath Value[fnTakingArray] Path fnTakingArray -[{ - "label": "None", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "Some(_)", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "None", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "Some($0)", - "insertTextFormat": 2 - }, { - "label": "Some(true)", - "kind": 4, - "tags": [], + "insertTextFormat": 2, + "kind": 12, + "label": "Some(_)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "Some(false)", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "Some(true)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "Some(false)", + "tags": [] + } +] Complete src/CompletionExpressions.res 89:38 posCursor:[89:38] posNoWhite:[89:37] Found expr:[89:11->89:41] @@ -581,13 +859,17 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord -[{ - "label": "someBoolVar", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "someBoolVar", + "tags": [] + } +] Complete src/CompletionExpressions.res 96:43 posCursor:[96:43] posNoWhite:[96:42] Found expr:[96:11->96:46] @@ -598,16 +880,20 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingOtherRecord]($0) ContextPath Value[fnTakingOtherRecord] Path fnTakingOtherRecord -[{ - "label": "\"\"", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null, - "sortText": "A", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "\"$0\"", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "\"\"", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionExpressions.res 108:57 posCursor:[108:57] posNoWhite:[108:56] Found expr:[108:11->108:60] @@ -618,19 +904,26 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingRecordWithOptionalField]($0) ContextPath Value[fnTakingRecordWithOptionalField] Path fnTakingRecordWithOptionalField -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "false", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] Complete src/CompletionExpressions.res 116:53 posCursor:[116:53] posNoWhite:[116:52] Found expr:[116:11->116:56] @@ -641,53 +934,90 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingRecordWithOptVariant]($0) ContextPath Value[fnTakingRecordWithOptVariant] Path fnTakingRecordWithOptVariant -[{ - "label": "Some(someVariant)", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "someVariant", - "documentation": {"kind": "markdown", "value": "```rescript\ntype someVariant = One | Two | Three(int, string)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype someVariant = One | Two | Three(int, string)\n```" + }, "insertText": "Some(someVariant)$0", - "insertTextFormat": 2 - }, { - "label": "Some(_)", + "insertTextFormat": 2, "kind": 12, - "tags": [], + "label": "Some(someVariant)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "someVariant", - "documentation": {"kind": "markdown", "value": "```rescript\ntype someVariant = One | Two | Three(int, string)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype someVariant = One | Two | Three(int, string)\n```" + }, "insertText": "Some($0)", - "insertTextFormat": 2 - }, { - "label": "None", + "insertTextFormat": 2, "kind": 12, - "tags": [], + "label": "Some(_)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "someVariant", - "documentation": {"kind": "markdown", "value": "```rescript\ntype someVariant = One | Two | Three(int, string)\n```"} - }, { - "label": "Some(One)", - "kind": 4, - "tags": [], + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype someVariant = One | Two | Three(int, string)\n```" + }, + "kind": 12, + "label": "None", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "One", - "documentation": {"kind": "markdown", "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two | Three(int, string)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two | Three(int, string)\n```" + }, "insertText": "Some(One)", - "insertTextFormat": 2 - }, { - "label": "Some(Two)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "Some(One)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Two", - "documentation": {"kind": "markdown", "value": "```rescript\nTwo\n```\n\n```rescript\ntype someVariant = One | Two | Three(int, string)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nTwo\n```\n\n```rescript\ntype someVariant = One | Two | Three(int, string)\n```" + }, "insertText": "Some(Two)", - "insertTextFormat": 2 - }, { - "label": "Some(Three(_, _))", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "Some(Two)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Three(int, string)", - "documentation": {"kind": "markdown", "value": "```rescript\nThree(int, string)\n```\n\n```rescript\ntype someVariant = One | Two | Three(int, string)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nThree(int, string)\n```\n\n```rescript\ntype someVariant = One | Two | Three(int, string)\n```" + }, "insertText": "Some(Three(${1:_}, ${2:_}))", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "Some(Three(_, _))", + "tags": [] + } +] Complete src/CompletionExpressions.res 126:49 posCursor:[126:49] posNoWhite:[126:48] Found expr:[126:11->126:51] @@ -698,16 +1028,23 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingInlineRecord]($0) ContextPath Value[fnTakingInlineRecord] Path fnTakingInlineRecord -[{ - "label": "{}", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "{someBoolField: bool, otherField: option, nestedRecord: otherRecord}", - "documentation": {"kind": "markdown", "value": "```rescript\n{someBoolField: bool, otherField: option, nestedRecord: otherRecord}\n```"}, - "sortText": "A", + "documentation": { + "kind": "markdown", + "value": "```rescript\n{someBoolField: bool, otherField: option, nestedRecord: otherRecord}\n```" + }, "insertText": "{$0}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "{}", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionExpressions.res 129:50 posCursor:[129:50] posNoWhite:[129:49] Found expr:[129:11->129:53] @@ -718,25 +1055,44 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingInlineRecord]($0) ContextPath Value[fnTakingInlineRecord] Path fnTakingInlineRecord -[{ - "label": "someBoolField", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": {"kind": "markdown", "value": "```rescript\nsomeBoolField: bool\n```\n\n```rescript\n{someBoolField: bool, otherField: option, nestedRecord: otherRecord}\n```"} - }, { - "label": "otherField", + "documentation": { + "kind": "markdown", + "value": "```rescript\nsomeBoolField: bool\n```\n\n```rescript\n{someBoolField: bool, otherField: option, nestedRecord: otherRecord}\n```" + }, "kind": 5, - "tags": [], + "label": "someBoolField", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "option", - "documentation": {"kind": "markdown", "value": "```rescript\notherField: option\n```\n\n```rescript\n{someBoolField: bool, otherField: option, nestedRecord: otherRecord}\n```"} - }, { - "label": "nestedRecord", + "documentation": { + "kind": "markdown", + "value": "```rescript\notherField: option\n```\n\n```rescript\n{someBoolField: bool, otherField: option, nestedRecord: otherRecord}\n```" + }, "kind": 5, - "tags": [], + "label": "otherField", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "otherRecord", - "documentation": {"kind": "markdown", "value": "```rescript\nnestedRecord: otherRecord\n```\n\n```rescript\n{someBoolField: bool, otherField: option, nestedRecord: otherRecord}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nnestedRecord: otherRecord\n```\n\n```rescript\n{someBoolField: bool, otherField: option, nestedRecord: otherRecord}\n```" + }, + "kind": 5, + "label": "nestedRecord", + "tags": [] + } +] Complete src/CompletionExpressions.res 132:51 posCursor:[132:51] posNoWhite:[132:50] Found expr:[132:11->132:54] @@ -747,13 +1103,20 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingInlineRecord]($0) ContextPath Value[fnTakingInlineRecord] Path fnTakingInlineRecord -[{ - "label": "someBoolField", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": {"kind": "markdown", "value": "```rescript\nsomeBoolField: bool\n```\n\n```rescript\n{someBoolField: bool, otherField: option, nestedRecord: otherRecord}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nsomeBoolField: bool\n```\n\n```rescript\n{someBoolField: bool, otherField: option, nestedRecord: otherRecord}\n```" + }, + "kind": 5, + "label": "someBoolField", + "tags": [] + } +] Complete src/CompletionExpressions.res 135:63 posCursor:[135:63] posNoWhite:[135:62] Found expr:[135:11->135:67] @@ -764,16 +1127,23 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingInlineRecord]($0) ContextPath Value[fnTakingInlineRecord] Path fnTakingInlineRecord -[{ - "label": "{}", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "otherRecord", - "documentation": {"kind": "markdown", "value": "```rescript\ntype otherRecord = {someField: int, otherField: string}\n```"}, - "sortText": "A", + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype otherRecord = {someField: int, otherField: string}\n```" + }, "insertText": "{$0}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "{}", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionExpressions.res 138:65 posCursor:[138:65] posNoWhite:[138:64] Found expr:[138:11->138:70] @@ -784,19 +1154,32 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingInlineRecord]($0) ContextPath Value[fnTakingInlineRecord] Path fnTakingInlineRecord -[{ - "label": "someField", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nsomeField: int\n```\n\n```rescript\ntype otherRecord = {someField: int, otherField: string}\n```"} - }, { - "label": "otherField", + "documentation": { + "kind": "markdown", + "value": "```rescript\nsomeField: int\n```\n\n```rescript\ntype otherRecord = {someField: int, otherField: string}\n```" + }, "kind": 5, - "tags": [], + "label": "someField", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\notherField: string\n```\n\n```rescript\ntype otherRecord = {someField: int, otherField: string}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\notherField: string\n```\n\n```rescript\ntype otherRecord = {someField: int, otherField: string}\n```" + }, + "kind": 5, + "label": "otherField", + "tags": [] + } +] Complete src/CompletionExpressions.res 159:20 posCursor:[159:20] posNoWhite:[159:19] Found expr:[159:3->159:21] @@ -807,16 +1190,20 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingCallback]($0) ContextPath Value[fnTakingCallback] Path fnTakingCallback -[{ - "label": "() => {}", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "unit => unit", - "documentation": null, - "sortText": "A", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "() => ${0:()}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "() => {}", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionExpressions.res 162:21 posCursor:[162:21] posNoWhite:[162:20] Found expr:[162:3->162:22] @@ -827,13 +1214,20 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingCallback]($0) ContextPath Value[fnTakingCallback] Path fnTakingCallback -[{ - "label": "assertEqual", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "('a, 'a) => unit", - "documentation": {"kind": "markdown", "value": "\n`assertEqual(a, b)` check if `a` is equal `b`. If not throw a panic exception\n\n## Examples\n\n```rescript\nlist{1, 2}->List.tailExn == list{2}\n```\n"} - }] + "documentation": { + "kind": "markdown", + "value": "\n`assertEqual(a, b)` check if `a` is equal `b`. If not throw a panic exception\n\n## Examples\n\n```rescript\nlist{1, 2}->List.tailExn == list{2}\n```\n" + }, + "kind": 12, + "label": "assertEqual", + "tags": [] + } +] Complete src/CompletionExpressions.res 165:22 posCursor:[165:22] posNoWhite:[165:21] Found expr:[165:3->165:24] @@ -844,16 +1238,20 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingCallback]($1) ContextPath Value[fnTakingCallback] Path fnTakingCallback -[{ - "label": "v => v", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool => unit", - "documentation": null, - "sortText": "A", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "${1:v} => ${0:v}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "v => v", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionExpressions.res 168:25 posCursor:[168:25] posNoWhite:[168:24] Found expr:[168:3->168:27] @@ -864,16 +1262,20 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingCallback]($2) ContextPath Value[fnTakingCallback] Path fnTakingCallback -[{ - "label": "event => event", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "ReactEvent.Mouse.t => unit", - "documentation": null, - "sortText": "A", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "${1:event} => ${0:event}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "event => event", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionExpressions.res 171:29 posCursor:[171:29] posNoWhite:[171:27] Found expr:[171:3->171:30] @@ -884,16 +1286,20 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingCallback]($3) ContextPath Value[fnTakingCallback] Path fnTakingCallback -[{ - "label": "(~on, ~off=?, variant) => {}", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(~on: bool, ~off: bool=?, variant) => int", - "documentation": null, - "sortText": "A", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "(~on, ~off=?, ${1:variant}) => {${0:()}}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "(~on, ~off=?, variant) => {}", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionExpressions.res 174:32 posCursor:[174:32] posNoWhite:[174:30] Found expr:[174:3->174:33] @@ -904,16 +1310,20 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingCallback]($4) ContextPath Value[fnTakingCallback] Path fnTakingCallback -[{ - "label": "(v1, v2, v3) => {}", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(bool, option, bool) => unit", - "documentation": null, - "sortText": "A", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "(${1:v1}, ${2:v2}, ${3:v3}) => {${0:()}}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "(v1, v2, v3) => {}", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionExpressions.res 177:34 posCursor:[177:34] posNoWhite:[177:33] Found expr:[177:3->177:36] @@ -924,16 +1334,20 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingCallback]($5) ContextPath Value[fnTakingCallback] Path fnTakingCallback -[{ - "label": "(~on=?, ~off=?, ()) => {}", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(~on: bool=?, ~off: bool=?, unit) => int", - "documentation": null, - "sortText": "A", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "(~on=?, ~off=?, ()) => {${0:()}}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "(~on=?, ~off=?, ()) => {}", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionExpressions.res 185:15 posCursor:[185:15] posNoWhite:[185:14] Found expr:[181:2->185:16] @@ -948,55 +1362,92 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[Console, log]($0) ContextPath Value[Console, log] Path Console.log -[{ - "label": "second2", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }, { - "label": "second", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "second2", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "someBoolVar", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "second", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "s", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "someBoolVar", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "setTimeoutFloat", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "s", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(unit => unit, float) => timeoutId", - "documentation": {"kind": "markdown", "value": "\n`setTimeoutFloat(callback, durationInMilliseconds)` starts a timer that will execute `callback` after `durationInMilliseconds`.\n\nThe same as `setTimeout`, but allows you to pass a `float` instead of an `int` for the duration.\n\nSee [`setTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/setTimeout) on MDN.\n\n## Examples\n\n```rescript\n// Log to the console after 200 milliseconds.\nlet timeoutId = setTimeoutFloat(() => {\n Console.log(\"This prints in 200 ms.\")\n}, 200.)\n```\n"} - }, { - "label": "setIntervalFloat", + "documentation": { + "kind": "markdown", + "value": "\n`setTimeoutFloat(callback, durationInMilliseconds)` starts a timer that will execute `callback` after `durationInMilliseconds`.\n\nThe same as `setTimeout`, but allows you to pass a `float` instead of an `int` for the duration.\n\nSee [`setTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/setTimeout) on MDN.\n\n## Examples\n\n```rescript\n// Log to the console after 200 milliseconds.\nlet timeoutId = setTimeoutFloat(() => {\n Console.log(\"This prints in 200 ms.\")\n}, 200.)\n```\n" + }, "kind": 12, - "tags": [], + "label": "setTimeoutFloat", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(unit => unit, float) => intervalId", - "documentation": {"kind": "markdown", "value": "\n`setIntervalFloat(callback, intervalInMilliseconds)` starts an interval that will execute `callback` every `durationInMilliseconds` milliseconds.\n\nThe same as `setInterval`, but allows you to pass a `float` instead of an `int` for the duration.\n\nSee [`setInterval`](https://developer.mozilla.org/en-US/docs/Web/API/setInterval) on MDN.\n\n## Examples\n\n```rescript\n// Log to the console ever 2 seconds (200 milliseconds).\nlet intervalId = setIntervalFloat(() => {\n Console.log(\"This prints every 200 ms\")\n}, 200.)\n\n// Stop the interval after 500 ms\nlet timeoutId = setTimeoutFloat(() => {\n clearInterval(intervalId)\n}, 500.0)\n```\n"} - }, { - "label": "setInterval", + "documentation": { + "kind": "markdown", + "value": "\n`setIntervalFloat(callback, intervalInMilliseconds)` starts an interval that will execute `callback` every `durationInMilliseconds` milliseconds.\n\nThe same as `setInterval`, but allows you to pass a `float` instead of an `int` for the duration.\n\nSee [`setInterval`](https://developer.mozilla.org/en-US/docs/Web/API/setInterval) on MDN.\n\n## Examples\n\n```rescript\n// Log to the console ever 2 seconds (200 milliseconds).\nlet intervalId = setIntervalFloat(() => {\n Console.log(\"This prints every 200 ms\")\n}, 200.)\n\n// Stop the interval after 500 ms\nlet timeoutId = setTimeoutFloat(() => {\n clearInterval(intervalId)\n}, 500.0)\n```\n" + }, "kind": 12, - "tags": [], + "label": "setIntervalFloat", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(unit => unit, int) => intervalId", - "documentation": {"kind": "markdown", "value": "\n`setInterval(callback, intervalInMilliseconds)` starts an interval that will execute `callback` every `durationInMilliseconds` milliseconds.\n\nSee [`setInterval`](https://developer.mozilla.org/en-US/docs/Web/API/setInterval) on MDN.\n\n## Examples\n\n```rescript\n// Log to the console ever 200 ms (200 milliseconds).\nlet intervalId = setInterval(() => {\n Console.log(\"This prints every 200 ms.\")\n}, 200)\n\nlet timeoutId = setTimeout(() => {\n clearInterval(intervalId)\n}, 500)\n```\n"} - }, { - "label": "setTimeout", + "documentation": { + "kind": "markdown", + "value": "\n`setInterval(callback, intervalInMilliseconds)` starts an interval that will execute `callback` every `durationInMilliseconds` milliseconds.\n\nSee [`setInterval`](https://developer.mozilla.org/en-US/docs/Web/API/setInterval) on MDN.\n\n## Examples\n\n```rescript\n// Log to the console ever 200 ms (200 milliseconds).\nlet intervalId = setInterval(() => {\n Console.log(\"This prints every 200 ms.\")\n}, 200)\n\nlet timeoutId = setTimeout(() => {\n clearInterval(intervalId)\n}, 500)\n```\n" + }, "kind": 12, - "tags": [], + "label": "setInterval", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(unit => unit, int) => timeoutId", - "documentation": {"kind": "markdown", "value": "\n`setTimeout(callback, durationInMilliseconds)` starts a timer that will execute `callback` after `durationInMilliseconds`.\n\nSee [`setTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/setTimeout) on MDN.\n\n## Examples\n\n```rescript\n// Log to the console after 200 milliseconds.\nlet timeoutId = setTimeout(() => {\n Console.log(\"This prints in 200 ms.\")\n}, 200)\n```\n"} - }] + "documentation": { + "kind": "markdown", + "value": "\n`setTimeout(callback, durationInMilliseconds)` starts a timer that will execute `callback` after `durationInMilliseconds`.\n\nSee [`setTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/setTimeout) on MDN.\n\n## Examples\n\n```rescript\n// Log to the console after 200 milliseconds.\nlet timeoutId = setTimeout(() => {\n Console.log(\"This prints in 200 ms.\")\n}, 200)\n```\n" + }, + "kind": 12, + "label": "setTimeout", + "tags": [] + } +] Complete src/CompletionExpressions.res 196:14 posCursor:[196:14] posNoWhite:[196:13] Found expr:[196:3->196:14] @@ -1013,13 +1464,20 @@ Path fff CPPipe pathFromEnv: found:true Path CompletionExpressions.someOpt Path someOpt -[{ - "label": "someOptField", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": {"kind": "markdown", "value": "```rescript\nsomeOptField?: bool\n```\n\n```rescript\ntype recordWithOptionalField = {\n someField: int,\n someOptField?: bool,\n}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nsomeOptField?: bool\n```\n\n```rescript\ntype recordWithOptionalField = {\n someField: int,\n someOptField?: bool,\n}\n```" + }, + "kind": 5, + "label": "someOptField", + "tags": [] + } +] Complete src/CompletionExpressions.res 205:11 posCursor:[205:11] posNoWhite:[205:10] Found expr:[205:3->205:12] @@ -1030,16 +1488,20 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[takesCb]($0) ContextPath Value[takesCb] Path takesCb -[{ - "label": "someTyp => someTyp", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "someTyp => 'a", - "documentation": null, - "sortText": "A", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "${1:someTyp} => ${0:someTyp}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "someTyp => someTyp", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionExpressions.res 216:12 posCursor:[216:12] posNoWhite:[216:11] Found expr:[216:3->216:13] @@ -1050,16 +1512,20 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[takesCb2]($0) ContextPath Value[takesCb2] Path takesCb2 -[{ - "label": "environment => environment", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "Environment.t => 'a", - "documentation": null, - "sortText": "A", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "${1:environment} => ${0:environment}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "environment => environment", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionExpressions.res 225:12 posCursor:[225:12] posNoWhite:[225:11] Found expr:[225:3->225:13] @@ -1070,16 +1536,20 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[takesCb3]($0) ContextPath Value[takesCb3] Path takesCb3 -[{ - "label": "apiCallResult => apiCallResult", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "apiCallResult => 'a", - "documentation": null, - "sortText": "A", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "${1:apiCallResult} => ${0:apiCallResult}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "apiCallResult => apiCallResult", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionExpressions.res 232:12 posCursor:[232:12] posNoWhite:[232:11] Found expr:[232:3->232:13] @@ -1090,16 +1560,20 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[takesCb4]($0) ContextPath Value[takesCb4] Path takesCb4 -[{ - "label": "apiCallResult => apiCallResult", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "option => 'a", - "documentation": null, - "sortText": "A", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "${1:apiCallResult} => ${0:apiCallResult}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "apiCallResult => apiCallResult", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionExpressions.res 239:12 posCursor:[239:12] posNoWhite:[239:11] Found expr:[239:3->239:13] @@ -1110,16 +1584,20 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[takesCb5]($0) ContextPath Value[takesCb5] Path takesCb5 -[{ - "label": "apiCallResults => apiCallResults", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "array> => 'a", - "documentation": null, - "sortText": "A", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "${1:apiCallResults} => ${0:apiCallResults}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "apiCallResults => apiCallResults", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionExpressions.res 250:30 posCursor:[250:30] posNoWhite:[250:29] Found expr:[250:3->250:31] @@ -1130,16 +1608,20 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[commitLocalUpdate](~updater) ContextPath Value[commitLocalUpdate] Path commitLocalUpdate -[{ - "label": "recordSourceSelectorProxy => recordSourceSelectorProxy", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "RecordSourceSelectorProxy.t => unit", - "documentation": null, - "sortText": "A", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "${1:recordSourceSelectorProxy} => ${0:recordSourceSelectorProxy}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "recordSourceSelectorProxy => recordSourceSelectorProxy", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionExpressions.res 257:25 posCursor:[257:25] posNoWhite:[257:24] Found expr:[257:3->257:26] @@ -1150,16 +1632,20 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingAsyncCallback]($0) ContextPath Value[fnTakingAsyncCallback] Path fnTakingAsyncCallback -[{ - "label": "async () => {}", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "unit => promise", - "documentation": null, - "sortText": "A", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "async () => ${0:()}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "async () => {}", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionExpressions.res 262:23 posCursor:[262:23] posNoWhite:[262:22] Found expr:[262:3->262:24] @@ -1169,16 +1655,20 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[Belt, Array, map]($1) ContextPath Value[Belt, Array, map] Path Belt.Array.map -[{ - "label": "v => v", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "'a => 'b", - "documentation": null, - "sortText": "A", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "${1:v} => ${0:v}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "v => v", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionExpressions.res 271:15 posCursor:[271:15] posNoWhite:[271:14] Found expr:[271:3->271:16] @@ -1189,15 +1679,22 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[takesExotic]($0) ContextPath Value[takesExotic] Path takesExotic -[{ - "label": "#\"some exotic\"", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "#\"some exotic\"", - "documentation": {"kind": "markdown", "value": "```rescript\n#\"some exotic\"\n```\n\n```rescript\n[#\"some exotic\"]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#\"some exotic\"\n```\n\n```rescript\n[#\"some exotic\"]\n```" + }, "insertText": "#\"some exotic\"", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "#\"some exotic\"", + "tags": [] + } +] Complete src/CompletionExpressions.res 278:23 posCursor:[278:23] posNoWhite:[278:22] Found expr:[278:3->278:24] @@ -1208,31 +1705,50 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingPolyVariant]($0) ContextPath Value[fnTakingPolyVariant] Path fnTakingPolyVariant -[{ - "label": "#one", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "#one", - "documentation": {"kind": "markdown", "value": "```rescript\n#one\n```\n\n```rescript\n[#one | #three(someRecord, bool) | #two(bool)]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#one\n```\n\n```rescript\n[#one | #three(someRecord, bool) | #two(bool)]\n```" + }, "insertText": "#one", - "insertTextFormat": 2 - }, { - "label": "#three(_, _)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "#one", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "#three(someRecord, bool)", - "documentation": {"kind": "markdown", "value": "```rescript\n#three(someRecord, bool)\n```\n\n```rescript\n[#one | #three(someRecord, bool) | #two(bool)]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#three(someRecord, bool)\n```\n\n```rescript\n[#one | #three(someRecord, bool) | #two(bool)]\n```" + }, "insertText": "#three(${1:_}, ${2:_})", - "insertTextFormat": 2 - }, { - "label": "#two(_)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "#three(_, _)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "#two(bool)", - "documentation": {"kind": "markdown", "value": "```rescript\n#two(bool)\n```\n\n```rescript\n[#one | #three(someRecord, bool) | #two(bool)]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#two(bool)\n```\n\n```rescript\n[#one | #three(someRecord, bool) | #two(bool)]\n```" + }, "insertText": "#two($0)", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "#two(_)", + "tags": [] + } +] Complete src/CompletionExpressions.res 281:24 posCursor:[281:24] posNoWhite:[281:23] Found expr:[281:3->302:1] @@ -1243,31 +1759,50 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingPolyVariant]($0) ContextPath Value[fnTakingPolyVariant] Path fnTakingPolyVariant -[{ - "label": "#one", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "#one", - "documentation": {"kind": "markdown", "value": "```rescript\n#one\n```\n\n```rescript\n[#one | #three(someRecord, bool) | #two(bool)]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#one\n```\n\n```rescript\n[#one | #three(someRecord, bool) | #two(bool)]\n```" + }, "insertText": "one", - "insertTextFormat": 2 - }, { - "label": "#three(_, _)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "#one", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "#three(someRecord, bool)", - "documentation": {"kind": "markdown", "value": "```rescript\n#three(someRecord, bool)\n```\n\n```rescript\n[#one | #three(someRecord, bool) | #two(bool)]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#three(someRecord, bool)\n```\n\n```rescript\n[#one | #three(someRecord, bool) | #two(bool)]\n```" + }, "insertText": "three(${1:_}, ${2:_})", - "insertTextFormat": 2 - }, { - "label": "#two(_)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "#three(_, _)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "#two(bool)", - "documentation": {"kind": "markdown", "value": "```rescript\n#two(bool)\n```\n\n```rescript\n[#one | #three(someRecord, bool) | #two(bool)]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#two(bool)\n```\n\n```rescript\n[#one | #three(someRecord, bool) | #two(bool)]\n```" + }, "insertText": "two($0)", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "#two(_)", + "tags": [] + } +] Complete src/CompletionExpressions.res 284:25 posCursor:[284:25] posNoWhite:[284:24] Found expr:[284:3->284:26] @@ -1278,15 +1813,22 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingPolyVariant]($0) ContextPath Value[fnTakingPolyVariant] Path fnTakingPolyVariant -[{ - "label": "#one", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "#one", - "documentation": {"kind": "markdown", "value": "```rescript\n#one\n```\n\n```rescript\n[#one | #three(someRecord, bool) | #two(bool)]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#one\n```\n\n```rescript\n[#one | #three(someRecord, bool) | #two(bool)]\n```" + }, "insertText": "one", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "#one", + "tags": [] + } +] Complete src/CompletionExpressions.res 287:24 posCursor:[287:24] posNoWhite:[287:23] Found expr:[287:3->287:25] @@ -1297,15 +1839,22 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingPolyVariant]($0) ContextPath Value[fnTakingPolyVariant] Path fnTakingPolyVariant -[{ - "label": "#one", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "#one", - "documentation": {"kind": "markdown", "value": "```rescript\n#one\n```\n\n```rescript\n[#one | #three(someRecord, bool) | #two(bool)]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#one\n```\n\n```rescript\n[#one | #three(someRecord, bool) | #two(bool)]\n```" + }, "insertText": "#one", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "#one", + "tags": [] + } +] Complete src/CompletionExpressions.res 306:41 XXX Not found! @@ -1314,15 +1863,19 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Type[withIntLocal] Path withIntLocal -[{ - "label": "SuperInt.make()", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int => t", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "SuperInt.make($0)", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "SuperInt.make()", + "tags": [] + } +] Complete src/CompletionExpressions.res 309:36 posCursor:[309:36] posNoWhite:[309:35] Found expr:[309:3->309:37] @@ -1333,15 +1886,19 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[CompletionSupport, makeTestHidden]($0) ContextPath Value[CompletionSupport, makeTestHidden] Path CompletionSupport.makeTestHidden -[{ - "label": "CompletionSupport.TestHidden.make()", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int => t", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "CompletionSupport.TestHidden.make($0)", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "CompletionSupport.TestHidden.make()", + "tags": [] + } +] Complete src/CompletionExpressions.res 313:36 posCursor:[313:36] posNoWhite:[313:35] Found expr:[313:3->313:37] @@ -1353,15 +1910,19 @@ Resolved opens 2 Stdlib CompletionSupport ContextPath CArgument Value[CompletionSupport, makeTestHidden]($0) ContextPath Value[CompletionSupport, makeTestHidden] Path CompletionSupport.makeTestHidden -[{ - "label": "TestHidden.make()", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int => t", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "TestHidden.make($0)", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "TestHidden.make()", + "tags": [] + } +] Complete src/CompletionExpressions.res 321:11 posCursor:[321:11] posNoWhite:[321:10] Found expr:[321:3->321:12] @@ -1373,31 +1934,41 @@ Resolved opens 2 Stdlib CompletionSupport ContextPath CArgument Value[mkStuff]($0) ContextPath Value[mkStuff] Path mkStuff -[{ - "label": "//g", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "Regular expression", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "/$0/g", - "insertTextFormat": 2 - }, { - "label": "RegExp.fromString()", - "kind": 12, - "tags": [], + "insertTextFormat": 2, + "kind": 4, + "label": "//g", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(string, ~flags: string=?) => t", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "RegExp.fromString($0)", - "insertTextFormat": 2 - }, { - "label": "RegExp.fromStringWithFlags()", + "insertTextFormat": 2, "kind": 12, - "tags": [], + "label": "RegExp.fromString()", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(string, ~flags: string) => t", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "RegExp.fromStringWithFlags($0)", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "RegExp.fromStringWithFlags()", + "tags": [] + } +] Complete src/CompletionExpressions.res 352:24 posCursor:[352:24] posNoWhite:[352:23] Found expr:[352:3->352:25] @@ -1409,31 +1980,41 @@ Resolved opens 2 Stdlib CompletionSupport ContextPath CArgument Value[tArgCompletionTestFn]($0) ContextPath Value[tArgCompletionTestFn] Path tArgCompletionTestFn -[{ - "label": "Money.fromInt()", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int => t", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "Money.fromInt($0)", - "insertTextFormat": 2 - }, { - "label": "Money.make()", + "insertTextFormat": 2, "kind": 12, - "tags": [], + "label": "Money.fromInt()", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "unit => t", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "Money.make($0)", - "insertTextFormat": 2 - }, { - "label": "Money.zero", + "insertTextFormat": 2, "kind": 12, - "tags": [], + "label": "Money.make()", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "t", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "Money.zero", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "Money.zero", + "tags": [] + } +] Complete src/CompletionExpressions.res 357:37 posCursor:[357:37] posNoWhite:[357:36] Found expr:[357:3->357:38] @@ -1445,31 +2026,41 @@ Resolved opens 2 Stdlib CompletionSupport ContextPath CArgument Value[labeledTArgCompletionTestFn](~tVal) ContextPath Value[labeledTArgCompletionTestFn] Path labeledTArgCompletionTestFn -[{ - "label": "Money.fromInt()", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int => t", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "Money.fromInt($0)", - "insertTextFormat": 2 - }, { - "label": "Money.make()", + "insertTextFormat": 2, "kind": 12, - "tags": [], + "label": "Money.fromInt()", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "unit => t", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "Money.make($0)", - "insertTextFormat": 2 - }, { - "label": "Money.zero", + "insertTextFormat": 2, "kind": 12, - "tags": [], + "label": "Money.make()", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "t", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "Money.zero", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "Money.zero", + "tags": [] + } +] Complete src/CompletionExpressions.res 362:18 posCursor:[362:18] posNoWhite:[362:17] Found expr:[362:3->362:32] @@ -1488,13 +2079,20 @@ Path someTyp CPPipe pathFromEnv: found:true Path CompletionExpressions. Path -[{ - "label": "test", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": {"kind": "markdown", "value": "```rescript\ntest: bool\n```\n\n```rescript\ntype someTyp = {test: bool}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\ntest: bool\n```\n\n```rescript\ntype someTyp = {test: bool}\n```" + }, + "kind": 5, + "label": "test", + "tags": [] + } +] Complete src/CompletionExpressions.res 380:22 posCursor:[380:22] posNoWhite:[380:18] Found expr:[380:13->386:2] @@ -1506,13 +2104,20 @@ Resolved opens 2 Stdlib CompletionSupport ContextPath CArgument Value[hook]($0) ContextPath Value[hook] Path hook -[{ - "label": "operator", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "[#\"and\" | #or]", - "documentation": {"kind": "markdown", "value": "```rescript\noperator?: [#\"and\" | #or]\n```\n\n```rescript\ntype config = {includeName: bool, operator: option<[#\"and\" | #or]>, showMore: bool}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\noperator?: [#\"and\" | #or]\n```\n\n```rescript\ntype config = {includeName: bool, operator: option<[#\"and\" | #or]>, showMore: bool}\n```" + }, + "kind": 5, + "label": "operator", + "tags": [] + } +] Complete src/CompletionExpressions.res 382:8 posCursor:[382:8] posNoWhite:[382:7] Found expr:[380:13->386:2] @@ -1524,13 +2129,20 @@ Resolved opens 2 Stdlib CompletionSupport ContextPath CArgument Value[hook]($0) ContextPath Value[hook] Path hook -[{ - "label": "operator", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "[#\"and\" | #or]", - "documentation": {"kind": "markdown", "value": "```rescript\noperator?: [#\"and\" | #or]\n```\n\n```rescript\ntype config = {includeName: bool, operator: option<[#\"and\" | #or]>, showMore: bool}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\noperator?: [#\"and\" | #or]\n```\n\n```rescript\ntype config = {includeName: bool, operator: option<[#\"and\" | #or]>, showMore: bool}\n```" + }, + "kind": 5, + "label": "operator", + "tags": [] + } +] Complete src/CompletionExpressions.res 388:18 posCursor:[388:18] posNoWhite:[388:17] Found expr:[388:3->388:24] @@ -1549,11 +2161,18 @@ Path someTyp CPPipe pathFromEnv: found:true Path CompletionExpressions. Path -[{ - "label": "test", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": {"kind": "markdown", "value": "```rescript\ntest: bool\n```\n\n```rescript\ntype someTyp = {test: bool}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\ntest: bool\n```\n\n```rescript\ntype someTyp = {test: bool}\n```" + }, + "kind": 5, + "label": "test", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/CompletionFromModule.res.txt b/tests/analysis_tests/tests/src/expected/CompletionFromModule.res.txt index 8cfb06f7ea8..1aed8187d4c 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionFromModule.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionFromModule.res.txt @@ -1,3 +1,4 @@ +null Complete src/CompletionFromModule.res 10:5 posCursor:[10:5] posNoWhite:[10:4] Found expr:[10:3->10:5] Pexp_field [10:3->10:4] _:[13:0->10:5] @@ -13,25 +14,40 @@ Path n CPPipe pathFromEnv:SomeModule found:true Path SomeModule. Path -[{ - "label": "name", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nname: string\n```\n\n```rescript\ntype t = {name: string}\n```"} - }, { - "label": "->SomeModule.getName", - "kind": 12, - "tags": [], + "documentation": { + "kind": "markdown", + "value": "```rescript\nname: string\n```\n\n```rescript\ntype t = {name: string}\n```" + }, + "kind": 5, + "label": "name", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 10 }, + "start": { "character": 4, "line": 10 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t => string", - "documentation": null, - "sortText": "getName", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeModule.getName", - "additionalTextEdits": [{ - "range": {"start": {"line": 10, "character": 4}, "end": {"line": 10, "character": 5}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->SomeModule.getName", + "sortText": "getName", + "tags": [] + } +] Complete src/CompletionFromModule.res 30:6 posCursor:[30:6] posNoWhite:[30:5] Found expr:[30:3->30:6] @@ -49,61 +65,100 @@ CPPipe pathFromEnv:SomeOtherModule found:true Path SomeOtherModule. Path CompletionFromModule.SomeOtherModule. Path -[{ - "label": "nname", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nnname: string\n```\n\n```rescript\ntype typeOutsideModule = {nname: string}\n```"} - }, { - "label": "->SomeOtherModule.getNName", - "kind": 12, - "tags": [], + "documentation": { + "kind": "markdown", + "value": "```rescript\nnname: string\n```\n\n```rescript\ntype typeOutsideModule = {nname: string}\n```" + }, + "kind": 5, + "label": "nname", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 6, "line": 30 }, + "start": { "character": 5, "line": 30 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t => string", - "documentation": null, - "sortText": "getNName", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeOtherModule.getNName", - "additionalTextEdits": [{ - "range": {"start": {"line": 30, "character": 5}, "end": {"line": 30, "character": 6}}, - "newText": "" - }] - }, { - "label": "->SomeOtherModule.getNName2", "kind": 12, - "tags": [], + "label": "->SomeOtherModule.getNName", + "sortText": "getNName", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 6, "line": 30 }, + "start": { "character": 5, "line": 30 } + } + } + ], + "data": null, + "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": null, - "sortText": "getNName2", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeOtherModule.getNName2", - "additionalTextEdits": [{ - "range": {"start": {"line": 30, "character": 5}, "end": {"line": 30, "character": 6}}, - "newText": "" - }] - }, { - "label": "->SomeOtherModule.getNName", "kind": 12, - "tags": [], + "label": "->SomeOtherModule.getNName2", + "sortText": "getNName2", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 6, "line": 30 }, + "start": { "character": 5, "line": 30 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t => string", - "documentation": null, - "sortText": "getNName", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeOtherModule.getNName", - "additionalTextEdits": [{ - "range": {"start": {"line": 30, "character": 5}, "end": {"line": 30, "character": 6}}, - "newText": "" - }] - }, { - "label": "->SomeOtherModule.getNName2", "kind": 12, - "tags": [], + "label": "->SomeOtherModule.getNName", + "sortText": "getNName", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 6, "line": 30 }, + "start": { "character": 5, "line": 30 } + } + } + ], + "data": null, + "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": null, - "sortText": "getNName2", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeOtherModule.getNName2", - "additionalTextEdits": [{ - "range": {"start": {"line": 30, "character": 5}, "end": {"line": 30, "character": 6}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->SomeOtherModule.getNName2", + "sortText": "getNName2", + "tags": [] + } +] Complete src/CompletionFromModule.res 33:32 XXX Not found! @@ -112,13 +167,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Module[SomeOthe] Path SomeOthe -[{ - "label": "SomeOtherModule", - "kind": 9, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "module SomeOtherModule", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 9, + "label": "SomeOtherModule", + "tags": [] + } +] Complete src/CompletionFromModule.res 38:8 posCursor:[38:8] posNoWhite:[38:7] Found expr:[38:3->0:-1] @@ -132,19 +191,26 @@ CPPipe pathFromEnv: found:true Path CompletionFromModule. Path CompletionFromModule.SomeOtherModule. Path -[{ - "label": "SomeOtherModule.getNName", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => string", - "documentation": null - }, { - "label": "SomeOtherModule.getNName2", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "SomeOtherModule.getNName", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "SomeOtherModule.getNName2", + "tags": [] + } +] Complete src/CompletionFromModule.res 42:8 posCursor:[42:8] posNoWhite:[42:7] Found expr:[42:3->0:-1] @@ -159,17 +225,24 @@ CPPipe pathFromEnv: found:true Path CompletionFromModule. Path CompletionFromModule.SomeOtherModule. Path -[{ - "label": "getNName", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => string", - "documentation": null - }, { - "label": "getNName2", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "getNName", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "getNName2", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/CompletionFromModule2.res.txt b/tests/analysis_tests/tests/src/expected/CompletionFromModule2.res.txt index eb647d43c57..60820db4605 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionFromModule2.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionFromModule2.res.txt @@ -1,3 +1,4 @@ +null Complete src/CompletionFromModule2.res 2:26 posCursor:[2:26] posNoWhite:[2:25] Found expr:[2:3->2:26] Pexp_field [2:3->2:25] _:[11:0->2:26] @@ -13,25 +14,40 @@ Path CompletionFromModule.n CPPipe pathFromEnv:SomeModule found:true Path CompletionFromModule.SomeModule. Path -[{ - "label": "name", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nname: string\n```\n\n```rescript\ntype t = {name: string}\n```"} - }, { - "label": "->CompletionFromModule.SomeModule.getName", - "kind": 12, - "tags": [], + "documentation": { + "kind": "markdown", + "value": "```rescript\nname: string\n```\n\n```rescript\ntype t = {name: string}\n```" + }, + "kind": 5, + "label": "name", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 26, "line": 2 }, + "start": { "character": 25, "line": 2 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t => string", - "documentation": null, - "sortText": "getName", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->CompletionFromModule.SomeModule.getName", - "additionalTextEdits": [{ - "range": {"start": {"line": 2, "character": 25}, "end": {"line": 2, "character": 26}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->CompletionFromModule.SomeModule.getName", + "sortText": "getName", + "tags": [] + } +] Complete src/CompletionFromModule2.res 5:27 posCursor:[5:27] posNoWhite:[5:26] Found expr:[5:3->5:27] @@ -49,61 +65,100 @@ CPPipe pathFromEnv:SomeOtherModule found:true Path CompletionFromModule.SomeOtherModule. Path CompletionFromModule.SomeOtherModule. Path -[{ - "label": "nname", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nnname: string\n```\n\n```rescript\ntype typeOutsideModule = {nname: string}\n```"} - }, { - "label": "->CompletionFromModule.SomeOtherModule.getNName", - "kind": 12, - "tags": [], + "documentation": { + "kind": "markdown", + "value": "```rescript\nnname: string\n```\n\n```rescript\ntype typeOutsideModule = {nname: string}\n```" + }, + "kind": 5, + "label": "nname", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 27, "line": 5 }, + "start": { "character": 26, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t => string", - "documentation": null, - "sortText": "getNName", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->CompletionFromModule.SomeOtherModule.getNName", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 26}, "end": {"line": 5, "character": 27}}, - "newText": "" - }] - }, { - "label": "->CompletionFromModule.SomeOtherModule.getNName2", "kind": 12, - "tags": [], + "label": "->CompletionFromModule.SomeOtherModule.getNName", + "sortText": "getNName", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 27, "line": 5 }, + "start": { "character": 26, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": null, - "sortText": "getNName2", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->CompletionFromModule.SomeOtherModule.getNName2", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 26}, "end": {"line": 5, "character": 27}}, - "newText": "" - }] - }, { - "label": "->CompletionFromModule.SomeOtherModule.getNName", "kind": 12, - "tags": [], + "label": "->CompletionFromModule.SomeOtherModule.getNName2", + "sortText": "getNName2", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 27, "line": 5 }, + "start": { "character": 26, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t => string", - "documentation": null, - "sortText": "getNName", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->CompletionFromModule.SomeOtherModule.getNName", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 26}, "end": {"line": 5, "character": 27}}, - "newText": "" - }] - }, { - "label": "->CompletionFromModule.SomeOtherModule.getNName2", "kind": 12, - "tags": [], + "label": "->CompletionFromModule.SomeOtherModule.getNName", + "sortText": "getNName", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 27, "line": 5 }, + "start": { "character": 26, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": null, - "sortText": "getNName2", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->CompletionFromModule.SomeOtherModule.getNName2", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 26}, "end": {"line": 5, "character": 27}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->CompletionFromModule.SomeOtherModule.getNName2", + "sortText": "getNName2", + "tags": [] + } +] Complete src/CompletionFromModule2.res 8:29 posCursor:[8:29] posNoWhite:[8:28] Found expr:[8:3->0:-1] @@ -117,19 +172,26 @@ CPPipe pathFromEnv: found:true Path CompletionFromModule. Path CompletionFromModule.SomeOtherModule. Path -[{ - "label": "CompletionFromModule.SomeOtherModule.getNName", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => string", - "documentation": null - }, { - "label": "CompletionFromModule.SomeOtherModule.getNName2", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "CompletionFromModule.SomeOtherModule.getNName", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "CompletionFromModule.SomeOtherModule.getNName2", + "tags": [] + } +] Complete src/CompletionFromModule2.res 12:29 posCursor:[12:29] posNoWhite:[12:28] Found expr:[12:3->0:-1] @@ -144,17 +206,24 @@ CPPipe pathFromEnv: found:true Path CompletionFromModule. Path CompletionFromModule.SomeOtherModule. Path -[{ - "label": "getNName", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => string", - "documentation": null - }, { - "label": "getNName2", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "getNName", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "getNName2", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/CompletionFunctionArguments.res.txt b/tests/analysis_tests/tests/src/expected/CompletionFunctionArguments.res.txt index 48c89535fbe..82279f81597 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionFunctionArguments.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionFunctionArguments.res.txt @@ -1,3 +1,4 @@ +null Complete src/CompletionFunctionArguments.res 10:24 posCursor:[10:24] posNoWhite:[10:23] Found expr:[10:11->10:25] Pexp_apply ...[10:11->10:17] (~isOn10:19->10:23=...__ghost__[0:-1->0:-1]) @@ -7,19 +8,26 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[someFn](~isOn) ContextPath Value[someFn] Path someFn -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "false", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] Complete src/CompletionFunctionArguments.res 13:25 posCursor:[13:25] posNoWhite:[13:24] Found expr:[13:11->13:26] @@ -30,26 +38,39 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[someFn](~isOn) ContextPath Value[someFn] Path someFn -[{ - "label": "true", +[ + { + "data": null, + "deprecated": false, + "detail": "bool", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "sortText": "A true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null, - "sortText": "A true" - }, { + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, "label": "tLocalVar", + "tags": [] + }, + { + "data": null, + "deprecated": false, + "detail": "'a => Type.t", + "documentation": { + "kind": "markdown", + "value": "\n`typeof(value)` exposes JavaScript's `typeof` operator and returns a `Type.t` enum.\nIt helps you inspect values that come from JavaScript APIs.\n\n## Examples\n\n```rescript\ntypeof(1) == #number\ntypeof(\"a\") == #string\n```\n" + }, "kind": 12, - "tags": [], - "detail": "bool", - "documentation": null - }, { "label": "typeof", - "kind": 12, - "tags": [], - "detail": "'a => Type.t", - "documentation": {"kind": "markdown", "value": "\n`typeof(value)` exposes JavaScript's `typeof` operator and returns a `Type.t` enum.\nIt helps you inspect values that come from JavaScript APIs.\n\n## Examples\n\n```rescript\ntypeof(1) == #number\ntypeof(\"a\") == #string\n```\n"} - }] + "tags": [] + } +] Complete src/CompletionFunctionArguments.res 16:25 posCursor:[16:25] posNoWhite:[16:24] Found expr:[16:11->16:26] @@ -60,19 +81,26 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[someFn](~isOff) ContextPath Value[someFn] Path someFn -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "false", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] Complete src/CompletionFunctionArguments.res 21:27 posCursor:[21:27] posNoWhite:[21:26] Found expr:[19:8->25:1] @@ -87,19 +115,26 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[someFn](~isOn) ContextPath Value[someFn] Path someFn -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "false", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] Complete src/CompletionFunctionArguments.res 34:24 posCursor:[34:24] posNoWhite:[34:23] Found expr:[34:11->34:25] @@ -110,13 +145,17 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[someOtherFn]($0) ContextPath Value[someOtherFn] Path someOtherFn -[{ - "label": "false", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] Complete src/CompletionFunctionArguments.res 51:39 posCursor:[51:39] posNoWhite:[51:38] Found expr:[51:11->51:40] @@ -127,31 +166,50 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[someFnTakingVariant](~config) ContextPath Value[someFnTakingVariant] Path someFnTakingVariant -[{ - "label": "One", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "One", - "documentation": {"kind": "markdown", "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two | Three(int, string)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two | Three(int, string)\n```" + }, "insertText": "One", - "insertTextFormat": 2 - }, { - "label": "Two", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "One", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Two", - "documentation": {"kind": "markdown", "value": "```rescript\nTwo\n```\n\n```rescript\ntype someVariant = One | Two | Three(int, string)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nTwo\n```\n\n```rescript\ntype someVariant = One | Two | Three(int, string)\n```" + }, "insertText": "Two", - "insertTextFormat": 2 - }, { - "label": "Three(_, _)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "Two", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Three(int, string)", - "documentation": {"kind": "markdown", "value": "```rescript\nThree(int, string)\n```\n\n```rescript\ntype someVariant = One | Two | Three(int, string)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nThree(int, string)\n```\n\n```rescript\ntype someVariant = One | Two | Three(int, string)\n```" + }, "insertText": "Three(${1:_}, ${2:_})", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "Three(_, _)", + "tags": [] + } +] Complete src/CompletionFunctionArguments.res 54:40 posCursor:[54:40] posNoWhite:[54:39] Found expr:[54:11->54:41] @@ -162,60 +220,83 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[someFnTakingVariant](~config) ContextPath Value[someFnTakingVariant] Path someFnTakingVariant -[{ - "label": "One", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "One", - "documentation": {"kind": "markdown", "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two | Three(int, string)\n```"}, - "sortText": "A One", + "documentation": { + "kind": "markdown", + "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two | Three(int, string)\n```" + }, "insertText": "One", - "insertTextFormat": 2 - }, { - "label": "OIncludeMeInCompletions", - "kind": 9, - "tags": [], + "insertTextFormat": 2, + "kind": 4, + "label": "One", + "sortText": "A One", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "module OIncludeMeInCompletions", - "documentation": null - }, { - "label": "Option", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], + "label": "OIncludeMeInCompletions", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "module Option", - "documentation": null - }, { - "label": "Ordering", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], + "label": "Option", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "module Ordering", - "documentation": null - }, { - "label": "Object", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], + "label": "Ordering", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "module Object", - "documentation": null - }, { - "label": "Obj", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module Obj", - "documentation": null, + "label": "Object", + "tags": [] + }, + { "data": { "modulePath": "Obj", "filePath": "src/CompletionFunctionArguments.res" - } - }, { - "label": "Objects", + }, + "deprecated": false, + "detail": "module Obj", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module Objects", - "documentation": null, + "label": "Obj", + "tags": [] + }, + { "data": { "modulePath": "Objects", "filePath": "src/CompletionFunctionArguments.res" - } - }] + }, + "deprecated": false, + "detail": "module Objects", + "documentation": { "kind": "markdown", "value": "" }, + "kind": 9, + "label": "Objects", + "tags": [] + } +] Complete src/CompletionFunctionArguments.res 57:33 posCursor:[57:33] posNoWhite:[57:32] Found expr:[57:11->57:34] @@ -226,15 +307,22 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[someFnTakingVariant]($0) ContextPath Value[someFnTakingVariant] Path someFnTakingVariant -[{ - "label": "Some(_)", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "someVariant", - "documentation": {"kind": "markdown", "value": "```rescript\ntype someVariant = One | Two | Three(int, string)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype someVariant = One | Two | Three(int, string)\n```" + }, "insertText": "Some($0)", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "Some(_)", + "tags": [] + } +] Complete src/CompletionFunctionArguments.res 60:44 posCursor:[60:44] posNoWhite:[60:43] Found expr:[60:11->60:45] @@ -245,60 +333,83 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[someFnTakingVariant](~configOpt2) ContextPath Value[someFnTakingVariant] Path someFnTakingVariant -[{ - "label": "One", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "One", - "documentation": {"kind": "markdown", "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two | Three(int, string)\n```"}, - "sortText": "A One", + "documentation": { + "kind": "markdown", + "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two | Three(int, string)\n```" + }, "insertText": "One", - "insertTextFormat": 2 - }, { - "label": "OIncludeMeInCompletions", - "kind": 9, - "tags": [], + "insertTextFormat": 2, + "kind": 4, + "label": "One", + "sortText": "A One", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "module OIncludeMeInCompletions", - "documentation": null - }, { - "label": "Option", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], + "label": "OIncludeMeInCompletions", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "module Option", - "documentation": null - }, { - "label": "Ordering", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], + "label": "Option", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "module Ordering", - "documentation": null - }, { - "label": "Object", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], + "label": "Ordering", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "module Object", - "documentation": null - }, { - "label": "Obj", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module Obj", - "documentation": null, + "label": "Object", + "tags": [] + }, + { "data": { "modulePath": "Obj", "filePath": "src/CompletionFunctionArguments.res" - } - }, { - "label": "Objects", + }, + "deprecated": false, + "detail": "module Obj", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module Objects", - "documentation": null, + "label": "Obj", + "tags": [] + }, + { "data": { "modulePath": "Objects", "filePath": "src/CompletionFunctionArguments.res" - } - }] + }, + "deprecated": false, + "detail": "module Objects", + "documentation": { "kind": "markdown", "value": "" }, + "kind": 9, + "label": "Objects", + "tags": [] + } +] Complete src/CompletionFunctionArguments.res 63:23 posCursor:[63:23] posNoWhite:[63:22] Found expr:[63:11->63:24] @@ -309,19 +420,26 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[someOtherFn]($0) ContextPath Value[someOtherFn] Path someOtherFn -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "false", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] Complete src/CompletionFunctionArguments.res 66:28 posCursor:[66:28] posNoWhite:[66:27] Found expr:[66:11->66:30] @@ -332,19 +450,26 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[someOtherFn]($2) ContextPath Value[someOtherFn] Path someOtherFn -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "false", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] Complete src/CompletionFunctionArguments.res 69:30 posCursor:[69:30] posNoWhite:[69:29] Found expr:[69:11->69:31] @@ -354,26 +479,39 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[someOtherFn]($2) ContextPath Value[someOtherFn] Path someOtherFn -[{ - "label": "true", +[ + { + "data": null, + "deprecated": false, + "detail": "bool", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "sortText": "A true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null, - "sortText": "A true" - }, { + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, "label": "tLocalVar", + "tags": [] + }, + { + "data": null, + "deprecated": false, + "detail": "'a => Type.t", + "documentation": { + "kind": "markdown", + "value": "\n`typeof(value)` exposes JavaScript's `typeof` operator and returns a `Type.t` enum.\nIt helps you inspect values that come from JavaScript APIs.\n\n## Examples\n\n```rescript\ntypeof(1) == #number\ntypeof(\"a\") == #string\n```\n" + }, "kind": 12, - "tags": [], - "detail": "bool", - "documentation": null - }, { "label": "typeof", - "kind": 12, - "tags": [], - "detail": "'a => Type.t", - "documentation": {"kind": "markdown", "value": "\n`typeof(value)` exposes JavaScript's `typeof` operator and returns a `Type.t` enum.\nIt helps you inspect values that come from JavaScript APIs.\n\n## Examples\n\n```rescript\ntypeof(1) == #number\ntypeof(\"a\") == #string\n```\n"} - }] + "tags": [] + } +] Complete src/CompletionFunctionArguments.res 76:25 posCursor:[76:25] posNoWhite:[76:24] Found expr:[76:11->76:26] @@ -384,15 +522,19 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingTuple]($0) ContextPath Value[fnTakingTuple] Path fnTakingTuple -[{ - "label": "(_, _, _)", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(int, int, float)", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "(${1:_}, ${2:_}, ${3:_})", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "(_, _, _)", + "tags": [] + } +] Complete src/CompletionFunctionArguments.res 89:27 posCursor:[89:27] posNoWhite:[89:26] Found expr:[89:11->89:29] @@ -403,25 +545,44 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord -[{ - "label": "age", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nage: int\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option}\n```"} - }, { - "label": "offline", + "documentation": { + "kind": "markdown", + "value": "```rescript\nage: int\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option}\n```" + }, "kind": 5, - "tags": [], + "label": "age", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": {"kind": "markdown", "value": "```rescript\noffline: bool\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option}\n```"} - }, { - "label": "online", + "documentation": { + "kind": "markdown", + "value": "```rescript\noffline: bool\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option}\n```" + }, "kind": 5, - "tags": [], + "label": "offline", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "option", - "documentation": {"kind": "markdown", "value": "```rescript\nonline: option\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nonline: option\n```\n\n```rescript\ntype someRecord = {age: int, offline: bool, online: option}\n```" + }, + "kind": 5, + "label": "online", + "tags": [] + } +] Complete src/CompletionFunctionArguments.res 109:29 posCursor:[109:29] posNoWhite:[109:28] Found expr:[105:2->114:4] @@ -439,13 +600,17 @@ Path thisGetsBrokenLoc CPPipe pathFromEnv:JsxEvent.Mouse found:false Path JsxEvent.Mouse.a Path a -[{ - "label": "JsxEvent.Mouse.altKey", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "JsxEvent.Mouse.altKey", + "tags": [] + } +] Complete src/CompletionFunctionArguments.res 111:27 posCursor:[111:27] posNoWhite:[111:26] Found expr:[105:2->114:4] @@ -463,13 +628,17 @@ Path reassignedWorks CPPipe pathFromEnv:JsxEvent.Mouse found:false Path JsxEvent.Mouse.a Path a -[{ - "label": "JsxEvent.Mouse.altKey", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "JsxEvent.Mouse.altKey", + "tags": [] + } +] Complete src/CompletionFunctionArguments.res 121:57 posCursor:[121:57] posNoWhite:[121:56] Found expr:[121:3->121:73] @@ -485,11 +654,15 @@ Path fineModuleVal CPPipe pathFromEnv:FineModule found:true Path FineModule. Path -[{ - "label": "FineModule.setToFalse", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => t", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "FineModule.setToFalse", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/CompletionInferValues.res.txt b/tests/analysis_tests/tests/src/expected/CompletionInferValues.res.txt index 5d72fc9174d..1652821afe9 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionInferValues.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionInferValues.res.txt @@ -1,3 +1,4 @@ +null Complete src/CompletionInferValues.res 15:43 posCursor:[15:43] posNoWhite:[15:42] Found expr:[15:33->15:43] Completable: Cpath Value[aliased]->t @@ -11,67 +12,128 @@ Path x ContextPath int Path Stdlib.Int.t Path t -[{ - "label": "Int.toStringWithRadix", - "kind": 12, - "tags": [1], +[ + { + "data": null, + "deprecated": true, "detail": "(int, ~radix: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toString` instead\n\n\n`toStringWithRadix(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toStringWithRadix(6, ~radix=2) // \"110\"\nInt.toStringWithRadix(373592855, ~radix=16) // \"16449317\"\nInt.toStringWithRadix(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n"} - }, { - "label": "Int.toExponentialWithPrecision", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toString` instead\n\n\n`toStringWithRadix(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toStringWithRadix(6, ~radix=2) // \"110\"\nInt.toStringWithRadix(373592855, ~radix=16) // \"16449317\"\nInt.toStringWithRadix(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n" + }, "kind": 12, - "tags": [1], + "label": "Int.toStringWithRadix", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": true, "detail": "(int, ~digits: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toExponential` instead\n\n\n`toExponential(n, ~digits)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point. See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\non MDN.\n\n## Examples\n\n```rescript\nInt.toExponentialWithPrecision(77, ~digits=2) // \"7.70e+1\"\nInt.toExponentialWithPrecision(5678, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10.\n"} - }, { - "label": "Int.toFixedWithPrecision", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toExponential` instead\n\n\n`toExponential(n, ~digits)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point. See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\non MDN.\n\n## Examples\n\n```rescript\nInt.toExponentialWithPrecision(77, ~digits=2) // \"7.70e+1\"\nInt.toExponentialWithPrecision(5678, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10.\n" + }, "kind": 12, - "tags": [1], + "label": "Int.toExponentialWithPrecision", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": true, "detail": "(int, ~digits: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toFixed` instead\n\n\n`toFixedWithPrecision(n, ~digits)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point. See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)\non MDN.\n\n## Examples\n\n```rescript\nInt.toFixedWithPrecision(300, ~digits=4) // \"300.0000\"\nInt.toFixedWithPrecision(300, ~digits=1) // \"300.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is less than 0 or larger than 100.\n"} - }, { - "label": "Int.toPrecisionWithPrecision", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toFixed` instead\n\n\n`toFixedWithPrecision(n, ~digits)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point. See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)\non MDN.\n\n## Examples\n\n```rescript\nInt.toFixedWithPrecision(300, ~digits=4) // \"300.0000\"\nInt.toFixedWithPrecision(300, ~digits=1) // \"300.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is less than 0 or larger than 100.\n" + }, "kind": 12, - "tags": [1], + "label": "Int.toFixedWithPrecision", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": true, "detail": "(int, ~digits: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toPrecision` instead\n\n\n`toPrecisionWithPrecision(n, ~digits)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits. See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nInt.toPrecisionWithPrecision(100, ~digits=2) // \"1.0e+2\"\nInt.toPrecisionWithPrecision(1, ~digits=2) // \"1.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\n Implementations are allowed to support larger and smaller values as well.\n ECMA-262 only requires a precision of up to 21 significant digits.\n"} - }, { - "label": "Int.toPrecision", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toPrecision` instead\n\n\n`toPrecisionWithPrecision(n, ~digits)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits. See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nInt.toPrecisionWithPrecision(100, ~digits=2) // \"1.0e+2\"\nInt.toPrecisionWithPrecision(1, ~digits=2) // \"1.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\n Implementations are allowed to support larger and smaller values as well.\n ECMA-262 only requires a precision of up to 21 significant digits.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toPrecisionWithPrecision", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~digits: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toPrecision(n, ~digits=?)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits. See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nInt.toPrecision(100) // \"100\"\nInt.toPrecision(1) // \"1\"\nInt.toPrecision(100, ~digits=2) // \"1.0e+2\"\nInt.toPrecision(1, ~digits=2) // \"1.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\n Implementations are allowed to support larger and smaller values as well.\n ECMA-262 only requires a precision of up to 21 significant digits.\n"} - }, { - "label": "Int.toString", + "documentation": { + "kind": "markdown", + "value": "\n`toPrecision(n, ~digits=?)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits. See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nInt.toPrecision(100) // \"100\"\nInt.toPrecision(1) // \"1\"\nInt.toPrecision(100, ~digits=2) // \"1.0e+2\"\nInt.toPrecision(1, ~digits=2) // \"1.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\n Implementations are allowed to support larger and smaller values as well.\n ECMA-262 only requires a precision of up to 21 significant digits.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toPrecision", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~radix: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toString(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toString(1000) // \"1000\"\nInt.toString(-1000) // \"-1000\"\nInt.toString(6, ~radix=2) // \"110\"\nInt.toString(373592855, ~radix=16) // \"16449317\"\nInt.toString(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n"} - }, { - "label": "Int.toFloat", + "documentation": { + "kind": "markdown", + "value": "\n`toString(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toString(1000) // \"1000\"\nInt.toString(-1000) // \"-1000\"\nInt.toString(6, ~radix=2) // \"110\"\nInt.toString(373592855, ~radix=16) // \"16449317\"\nInt.toString(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toString", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int => float", - "documentation": {"kind": "markdown", "value": "\n`toFloat(n)` return a `float` representing the given value.\n\n## Examples\n\n```rescript\nInt.toFloat(100) == 100.0\nInt.toFloat(2) == 2.0\n```\n"} - }, { - "label": "Int.toLocaleString", + "documentation": { + "kind": "markdown", + "value": "\n`toFloat(n)` return a `float` representing the given value.\n\n## Examples\n\n```rescript\nInt.toFloat(100) == 100.0\nInt.toFloat(2) == 2.0\n```\n" + }, "kind": 12, - "tags": [], + "label": "Int.toFloat", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int => string", - "documentation": {"kind": "markdown", "value": "\n`toLocaleString(n)` return a `string` with language-sensitive representing the\ngiven value. See [`Number.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString) on MDN.\n\n## Examples\n\n```rescript\n// If the application uses English as the default language\nInt.toLocaleString(1000) // \"1,000\"\n\n// If the application uses Portuguese Brazil as the default language\nInt.toLocaleString(1000) // \"1.000\"\n```\n"} - }, { - "label": "Int.toExponential", + "documentation": { + "kind": "markdown", + "value": "\n`toLocaleString(n)` return a `string` with language-sensitive representing the\ngiven value. See [`Number.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString) on MDN.\n\n## Examples\n\n```rescript\n// If the application uses English as the default language\nInt.toLocaleString(1000) // \"1,000\"\n\n// If the application uses Portuguese Brazil as the default language\nInt.toLocaleString(1000) // \"1.000\"\n```\n" + }, "kind": 12, - "tags": [], + "label": "Int.toLocaleString", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~digits: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toExponential(n, ~digits=?)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point. See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\n\n## Examples\n\n```rescript\nInt.toExponential(1000) // \"1e+3\"\nInt.toExponential(-1000) // \"-1e+3\"\nInt.toExponential(77, ~digits=2) // \"7.70e+1\"\nInt.toExponential(5678, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10.\n"} - }, { - "label": "Int.toFixed", + "documentation": { + "kind": "markdown", + "value": "\n`toExponential(n, ~digits=?)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point. See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\n\n## Examples\n\n```rescript\nInt.toExponential(1000) // \"1e+3\"\nInt.toExponential(-1000) // \"-1e+3\"\nInt.toExponential(77, ~digits=2) // \"7.70e+1\"\nInt.toExponential(5678, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toExponential", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~digits: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toFixed(n, ~digits=?)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point. See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)\non MDN.\n\n## Examples\n\n```rescript\nInt.toFixed(123456) // \"123456.00\"\nInt.toFixed(10) // \"10.00\"\nInt.toFixed(300, ~digits=4) // \"300.0000\"\nInt.toFixed(300, ~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(n, ~digits=?)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point. See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)\non MDN.\n\n## Examples\n\n```rescript\nInt.toFixed(123456) // \"123456.00\"\nInt.toFixed(10) // \"10.00\"\nInt.toFixed(300, ~digits=4) // \"300.0000\"\nInt.toFixed(300, ~digits=1) // \"300.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is less than 0 or larger than 100.\n" + }, + "kind": 12, + "label": "Int.toFixed", + "tags": [] + } +] Complete src/CompletionInferValues.res 18:30 posCursor:[18:30] posNoWhite:[18:29] Found expr:[18:28->18:30] @@ -94,19 +156,32 @@ Path getSomeRecord CPPipe pathFromEnv: found:true Path CompletionInferValues. Path -[{ - "label": "name", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nname: string\n```\n\n```rescript\ntype someRecord = {name: string, age: int}\n```"} - }, { - "label": "age", + "documentation": { + "kind": "markdown", + "value": "```rescript\nname: string\n```\n\n```rescript\ntype someRecord = {name: string, age: int}\n```" + }, "kind": 5, - "tags": [], + "label": "name", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nage: int\n```\n\n```rescript\ntype someRecord = {name: string, age: int}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nage: int\n```\n\n```rescript\ntype someRecord = {name: string, age: int}\n```" + }, + "kind": 5, + "label": "age", + "tags": [] + } +] Complete src/CompletionInferValues.res 21:53 posCursor:[21:53] posNoWhite:[21:52] Found expr:[21:45->21:53] @@ -133,19 +208,32 @@ Path getSomeRecord CPPipe pathFromEnv: found:true Path CompletionInferValues. Path -[{ - "label": "name", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nname: string\n```\n\n```rescript\ntype someRecord = {name: string, age: int}\n```"} - }, { - "label": "age", + "documentation": { + "kind": "markdown", + "value": "```rescript\nname: string\n```\n\n```rescript\ntype someRecord = {name: string, age: int}\n```" + }, "kind": 5, - "tags": [], + "label": "name", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nage: int\n```\n\n```rescript\ntype someRecord = {name: string, age: int}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nage: int\n```\n\n```rescript\ntype someRecord = {name: string, age: int}\n```" + }, + "kind": 5, + "label": "age", + "tags": [] + } +] Complete src/CompletionInferValues.res 24:63 posCursor:[24:63] posNoWhite:[24:62] Found expr:[24:3->24:64] @@ -175,19 +263,32 @@ Path someFnWithCallback CPPipe pathFromEnv: found:true Path CompletionInferValues. Path -[{ - "label": "name", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nname: string\n```\n\n```rescript\ntype someRecord = {name: string, age: int}\n```"} - }, { - "label": "age", + "documentation": { + "kind": "markdown", + "value": "```rescript\nname: string\n```\n\n```rescript\ntype someRecord = {name: string, age: int}\n```" + }, "kind": 5, - "tags": [], + "label": "name", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nage: int\n```\n\n```rescript\ntype someRecord = {name: string, age: int}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nage: int\n```\n\n```rescript\ntype someRecord = {name: string, age: int}\n```" + }, + "kind": 5, + "label": "age", + "tags": [] + } +] Complete src/CompletionInferValues.res 27:90 posCursor:[27:90] posNoWhite:[27:89] Found expr:[27:39->27:91] @@ -221,19 +322,32 @@ Path someFnWithCallback CPPipe pathFromEnv: found:true Path CompletionInferValues. Path -[{ - "label": "name", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nname: string\n```\n\n```rescript\ntype someRecord = {name: string, age: int}\n```"} - }, { - "label": "age", + "documentation": { + "kind": "markdown", + "value": "```rescript\nname: string\n```\n\n```rescript\ntype someRecord = {name: string, age: int}\n```" + }, "kind": 5, - "tags": [], + "label": "name", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nage: int\n```\n\n```rescript\ntype someRecord = {name: string, age: int}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nage: int\n```\n\n```rescript\ntype someRecord = {name: string, age: int}\n```" + }, + "kind": 5, + "label": "age", + "tags": [] + } +] Complete src/CompletionInferValues.res 30:36 posCursor:[30:36] posNoWhite:[30:35] Found expr:[30:3->30:39] @@ -253,13 +367,17 @@ Path reactEventFn CPPipe pathFromEnv:ReactEvent.Mouse found:false Path ReactEvent.Mouse.pr Path pr -[{ - "label": "ReactEvent.Mouse.preventDefault", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => unit", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "ReactEvent.Mouse.preventDefault", + "tags": [] + } +] Complete src/CompletionInferValues.res 41:50 posCursor:[41:50] posNoWhite:[41:49] Found expr:[41:11->41:56] @@ -279,13 +397,17 @@ Path JsxDOM.domProps CPPipe pathFromEnv:JsxEvent.Mouse found:false Path JsxEvent.Mouse.pr Path pr -[{ - "label": "JsxEvent.Mouse.preventDefault", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => unit", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "JsxEvent.Mouse.preventDefault", + "tags": [] + } +] Complete src/CompletionInferValues.res 44:50 posCursor:[44:50] posNoWhite:[44:49] Found expr:[44:11->44:56] @@ -304,13 +426,17 @@ Path Div.make CPPipe pathFromEnv:JsxEvent.Mouse found:false Path JsxEvent.Mouse.pr Path pr -[{ - "label": "JsxEvent.Mouse.preventDefault", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => unit", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "JsxEvent.Mouse.preventDefault", + "tags": [] + } +] Complete src/CompletionInferValues.res 47:87 posCursor:[47:87] posNoWhite:[47:86] Found expr:[47:11->47:93] @@ -329,67 +455,128 @@ ContextPath Value[JsxEvent, Mouse, button] Path JsxEvent.Mouse.button Path Stdlib.Int.t Path t -[{ - "label": "Int.toStringWithRadix", - "kind": 12, - "tags": [1], +[ + { + "data": null, + "deprecated": true, "detail": "(int, ~radix: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toString` instead\n\n\n`toStringWithRadix(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toStringWithRadix(6, ~radix=2) // \"110\"\nInt.toStringWithRadix(373592855, ~radix=16) // \"16449317\"\nInt.toStringWithRadix(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n"} - }, { - "label": "Int.toExponentialWithPrecision", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toString` instead\n\n\n`toStringWithRadix(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toStringWithRadix(6, ~radix=2) // \"110\"\nInt.toStringWithRadix(373592855, ~radix=16) // \"16449317\"\nInt.toStringWithRadix(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n" + }, "kind": 12, - "tags": [1], + "label": "Int.toStringWithRadix", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": true, "detail": "(int, ~digits: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toExponential` instead\n\n\n`toExponential(n, ~digits)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point. See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\non MDN.\n\n## Examples\n\n```rescript\nInt.toExponentialWithPrecision(77, ~digits=2) // \"7.70e+1\"\nInt.toExponentialWithPrecision(5678, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10.\n"} - }, { - "label": "Int.toFixedWithPrecision", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toExponential` instead\n\n\n`toExponential(n, ~digits)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point. See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\non MDN.\n\n## Examples\n\n```rescript\nInt.toExponentialWithPrecision(77, ~digits=2) // \"7.70e+1\"\nInt.toExponentialWithPrecision(5678, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10.\n" + }, "kind": 12, - "tags": [1], + "label": "Int.toExponentialWithPrecision", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": true, "detail": "(int, ~digits: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toFixed` instead\n\n\n`toFixedWithPrecision(n, ~digits)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point. See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)\non MDN.\n\n## Examples\n\n```rescript\nInt.toFixedWithPrecision(300, ~digits=4) // \"300.0000\"\nInt.toFixedWithPrecision(300, ~digits=1) // \"300.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is less than 0 or larger than 100.\n"} - }, { - "label": "Int.toPrecisionWithPrecision", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toFixed` instead\n\n\n`toFixedWithPrecision(n, ~digits)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point. See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)\non MDN.\n\n## Examples\n\n```rescript\nInt.toFixedWithPrecision(300, ~digits=4) // \"300.0000\"\nInt.toFixedWithPrecision(300, ~digits=1) // \"300.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is less than 0 or larger than 100.\n" + }, "kind": 12, - "tags": [1], + "label": "Int.toFixedWithPrecision", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": true, "detail": "(int, ~digits: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toPrecision` instead\n\n\n`toPrecisionWithPrecision(n, ~digits)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits. See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nInt.toPrecisionWithPrecision(100, ~digits=2) // \"1.0e+2\"\nInt.toPrecisionWithPrecision(1, ~digits=2) // \"1.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\n Implementations are allowed to support larger and smaller values as well.\n ECMA-262 only requires a precision of up to 21 significant digits.\n"} - }, { - "label": "Int.toPrecision", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toPrecision` instead\n\n\n`toPrecisionWithPrecision(n, ~digits)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits. See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nInt.toPrecisionWithPrecision(100, ~digits=2) // \"1.0e+2\"\nInt.toPrecisionWithPrecision(1, ~digits=2) // \"1.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\n Implementations are allowed to support larger and smaller values as well.\n ECMA-262 only requires a precision of up to 21 significant digits.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toPrecisionWithPrecision", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~digits: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toPrecision(n, ~digits=?)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits. See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nInt.toPrecision(100) // \"100\"\nInt.toPrecision(1) // \"1\"\nInt.toPrecision(100, ~digits=2) // \"1.0e+2\"\nInt.toPrecision(1, ~digits=2) // \"1.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\n Implementations are allowed to support larger and smaller values as well.\n ECMA-262 only requires a precision of up to 21 significant digits.\n"} - }, { - "label": "Int.toString", + "documentation": { + "kind": "markdown", + "value": "\n`toPrecision(n, ~digits=?)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits. See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nInt.toPrecision(100) // \"100\"\nInt.toPrecision(1) // \"1\"\nInt.toPrecision(100, ~digits=2) // \"1.0e+2\"\nInt.toPrecision(1, ~digits=2) // \"1.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\n Implementations are allowed to support larger and smaller values as well.\n ECMA-262 only requires a precision of up to 21 significant digits.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toPrecision", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~radix: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toString(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toString(1000) // \"1000\"\nInt.toString(-1000) // \"-1000\"\nInt.toString(6, ~radix=2) // \"110\"\nInt.toString(373592855, ~radix=16) // \"16449317\"\nInt.toString(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n"} - }, { - "label": "Int.toFloat", + "documentation": { + "kind": "markdown", + "value": "\n`toString(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toString(1000) // \"1000\"\nInt.toString(-1000) // \"-1000\"\nInt.toString(6, ~radix=2) // \"110\"\nInt.toString(373592855, ~radix=16) // \"16449317\"\nInt.toString(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toString", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int => float", - "documentation": {"kind": "markdown", "value": "\n`toFloat(n)` return a `float` representing the given value.\n\n## Examples\n\n```rescript\nInt.toFloat(100) == 100.0\nInt.toFloat(2) == 2.0\n```\n"} - }, { - "label": "Int.toLocaleString", + "documentation": { + "kind": "markdown", + "value": "\n`toFloat(n)` return a `float` representing the given value.\n\n## Examples\n\n```rescript\nInt.toFloat(100) == 100.0\nInt.toFloat(2) == 2.0\n```\n" + }, "kind": 12, - "tags": [], + "label": "Int.toFloat", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int => string", - "documentation": {"kind": "markdown", "value": "\n`toLocaleString(n)` return a `string` with language-sensitive representing the\ngiven value. See [`Number.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString) on MDN.\n\n## Examples\n\n```rescript\n// If the application uses English as the default language\nInt.toLocaleString(1000) // \"1,000\"\n\n// If the application uses Portuguese Brazil as the default language\nInt.toLocaleString(1000) // \"1.000\"\n```\n"} - }, { - "label": "Int.toExponential", + "documentation": { + "kind": "markdown", + "value": "\n`toLocaleString(n)` return a `string` with language-sensitive representing the\ngiven value. See [`Number.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString) on MDN.\n\n## Examples\n\n```rescript\n// If the application uses English as the default language\nInt.toLocaleString(1000) // \"1,000\"\n\n// If the application uses Portuguese Brazil as the default language\nInt.toLocaleString(1000) // \"1.000\"\n```\n" + }, "kind": 12, - "tags": [], + "label": "Int.toLocaleString", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~digits: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toExponential(n, ~digits=?)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point. See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\n\n## Examples\n\n```rescript\nInt.toExponential(1000) // \"1e+3\"\nInt.toExponential(-1000) // \"-1e+3\"\nInt.toExponential(77, ~digits=2) // \"7.70e+1\"\nInt.toExponential(5678, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10.\n"} - }, { - "label": "Int.toFixed", + "documentation": { + "kind": "markdown", + "value": "\n`toExponential(n, ~digits=?)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point. See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\n\n## Examples\n\n```rescript\nInt.toExponential(1000) // \"1e+3\"\nInt.toExponential(-1000) // \"-1e+3\"\nInt.toExponential(77, ~digits=2) // \"7.70e+1\"\nInt.toExponential(5678, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toExponential", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~digits: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toFixed(n, ~digits=?)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point. See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)\non MDN.\n\n## Examples\n\n```rescript\nInt.toFixed(123456) // \"123456.00\"\nInt.toFixed(10) // \"10.00\"\nInt.toFixed(300, ~digits=4) // \"300.0000\"\nInt.toFixed(300, ~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(n, ~digits=?)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point. See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)\non MDN.\n\n## Examples\n\n```rescript\nInt.toFixed(123456) // \"123456.00\"\nInt.toFixed(10) // \"10.00\"\nInt.toFixed(300, ~digits=4) // \"300.0000\"\nInt.toFixed(300, ~digits=1) // \"300.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is less than 0 or larger than 100.\n" + }, + "kind": 12, + "label": "Int.toFixed", + "tags": [] + } +] Complete src/CompletionInferValues.res 50:103 posCursor:[50:103] posNoWhite:[50:102] Found expr:[50:11->50:109] @@ -426,19 +613,32 @@ Path String.split Path Stdlib.Array.ma Path ArrayUtils.ma Path ma -[{ - "label": "Array.map", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a => 'b) => array<'b>", - "documentation": {"kind": "markdown", "value": "\n`map(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray = array->Array.map(greeting => greeting ++ \" to you\")\n\nmappedArray == [\"Hello to you\", \"Hi to you\", \"Good bye to you\"]\n```\n"} - }, { - "label": "Array.mapWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`map(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray = array->Array.map(greeting => greeting ++ \" to you\")\n\nmappedArray == [\"Hello to you\", \"Hi to you\", \"Good bye to you\"]\n```\n" + }, "kind": 12, - "tags": [], + "label": "Array.map", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, ('a, int) => 'b) => array<'b>", - "documentation": {"kind": "markdown", "value": "\n`mapWithIndex(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray =\n array->Array.mapWithIndex((greeting, index) => greeting ++ \" at position \" ++ Int.toString(index))\n\nmappedArray == [\"Hello at position 0\", \"Hi at position 1\", \"Good bye at position 2\"]\n```\n"} - }] + "documentation": { + "kind": "markdown", + "value": "\n`mapWithIndex(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray =\n array->Array.mapWithIndex((greeting, index) => greeting ++ \" at position \" ++ Int.toString(index))\n\nmappedArray == [\"Hello at position 0\", \"Hi at position 1\", \"Good bye at position 2\"]\n```\n" + }, + "kind": 12, + "label": "Array.mapWithIndex", + "tags": [] + } +] Complete src/CompletionInferValues.res 75:78 posCursor:[75:78] posNoWhite:[75:77] Found expr:[75:70->75:78] @@ -465,19 +665,32 @@ Path someRecordWithNestedStuff CPPipe pathFromEnv: found:true Path CompletionInferValues. Path -[{ - "label": "name", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nname: string\n```\n\n```rescript\ntype someRecord = {name: string, age: int}\n```"} - }, { - "label": "age", + "documentation": { + "kind": "markdown", + "value": "```rescript\nname: string\n```\n\n```rescript\ntype someRecord = {name: string, age: int}\n```" + }, "kind": 5, - "tags": [], + "label": "name", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nage: int\n```\n\n```rescript\ntype someRecord = {name: string, age: int}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nage: int\n```\n\n```rescript\ntype someRecord = {name: string, age: int}\n```" + }, + "kind": 5, + "label": "age", + "tags": [] + } +] Complete src/CompletionInferValues.res 79:86 posCursor:[79:86] posNoWhite:[79:85] Found expr:[79:78->79:86] @@ -504,13 +717,20 @@ Path someRecordWithNestedStuff CPPipe pathFromEnv: found:true Path CompletionInferValues. Path -[{ - "label": "someRecord", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "someRecord", - "documentation": {"kind": "markdown", "value": "```rescript\nsomeRecord: someRecord\n```\n\n```rescript\ntype someNestedRecord = {someRecord: someRecord}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nsomeRecord: someRecord\n```\n\n```rescript\ntype someNestedRecord = {someRecord: someRecord}\n```" + }, + "kind": 5, + "label": "someRecord", + "tags": [] + } +] Complete src/CompletionInferValues.res 83:103 posCursor:[83:103] posNoWhite:[83:102] Found expr:[83:92->83:103] @@ -537,19 +757,32 @@ Path someRecordWithNestedStuff CPPipe pathFromEnv: found:true Path CompletionInferValues. Path -[{ - "label": "name", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nname: string\n```\n\n```rescript\ntype someRecord = {name: string, age: int}\n```"} - }, { - "label": "age", + "documentation": { + "kind": "markdown", + "value": "```rescript\nname: string\n```\n\n```rescript\ntype someRecord = {name: string, age: int}\n```" + }, "kind": 5, - "tags": [], + "label": "name", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nage: int\n```\n\n```rescript\ntype someRecord = {name: string, age: int}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nage: int\n```\n\n```rescript\ntype someRecord = {name: string, age: int}\n```" + }, + "kind": 5, + "label": "age", + "tags": [] + } +] Complete src/CompletionInferValues.res 87:81 posCursor:[87:81] posNoWhite:[87:80] Found expr:[87:69->87:81] @@ -566,19 +799,32 @@ ContextPath Type[someRecordWithNestedStuff] Path someRecordWithNestedStuff Path Stdlib.String.slic Path slic -[{ - "label": "String.slice", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(string, ~start: int, ~end: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`slice(str, ~start, ~end)` returns the substring of `str` starting at\ncharacter `start` up to but not including `end`.\n- If either `start` or `end` is negative, then it is evaluated as\n `length(str - start)` or `length(str - end)`.\n- If `end` is greater than the length of `str`, then it is treated as\n `length(str)`.\n- If `start` is greater than `end`, slice returns the empty string.\n See [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n## Examples\n\n```rescript\nString.slice(\"abcdefg\", ~start=2, ~end=5) == \"cde\"\nString.slice(\"abcdefg\", ~start=2, ~end=9) == \"cdefg\"\nString.slice(\"abcdefg\", ~start=-4, ~end=-2) == \"de\"\nString.slice(\"abcdefg\", ~start=5, ~end=1) == \"\"\nString.slice(\"abcdefg\", ~start=2) == \"cdefg\"\nString.slice(\"Hello World\", ~start=6) == \"World\"\n```\n"} - }, { - "label": "String.sliceToEnd", + "documentation": { + "kind": "markdown", + "value": "\n`slice(str, ~start, ~end)` returns the substring of `str` starting at\ncharacter `start` up to but not including `end`.\n- If either `start` or `end` is negative, then it is evaluated as\n `length(str - start)` or `length(str - end)`.\n- If `end` is greater than the length of `str`, then it is treated as\n `length(str)`.\n- If `start` is greater than `end`, slice returns the empty string.\n See [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n## Examples\n\n```rescript\nString.slice(\"abcdefg\", ~start=2, ~end=5) == \"cde\"\nString.slice(\"abcdefg\", ~start=2, ~end=9) == \"cdefg\"\nString.slice(\"abcdefg\", ~start=-4, ~end=-2) == \"de\"\nString.slice(\"abcdefg\", ~start=5, ~end=1) == \"\"\nString.slice(\"abcdefg\", ~start=2) == \"cdefg\"\nString.slice(\"Hello World\", ~start=6) == \"World\"\n```\n" + }, "kind": 12, - "tags": [1], + "label": "String.slice", + "tags": [] + }, + { + "data": null, + "deprecated": true, "detail": "(string, ~start: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(str, ~start)` returns the substring of `str` starting at character\n`start` to the end of the string.\n- If `start` is negative, then it is evaluated as `length(str - start)`.\n- If `start` is greater than the length of `str`, then sliceToEnd returns the empty string.\n See [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n## Examples\n\n```rescript\nString.sliceToEnd(\"abcdefg\", ~start=4) == \"efg\"\nString.sliceToEnd(\"abcdefg\", ~start=-2) == \"fg\"\nString.sliceToEnd(\"abcdefg\", ~start=7) == \"\"\n```\n"} - }] + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(str, ~start)` returns the substring of `str` starting at character\n`start` to the end of the string.\n- If `start` is negative, then it is evaluated as `length(str - start)`.\n- If `start` is greater than the length of `str`, then sliceToEnd returns the empty string.\n See [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n## Examples\n\n```rescript\nString.sliceToEnd(\"abcdefg\", ~start=4) == \"efg\"\nString.sliceToEnd(\"abcdefg\", ~start=-2) == \"fg\"\nString.sliceToEnd(\"abcdefg\", ~start=7) == \"\"\n```\n" + }, + "kind": 12, + "label": "String.sliceToEnd", + "tags": [ 1 ] + } +] Complete src/CompletionInferValues.res 91:82 posCursor:[91:82] posNoWhite:[91:81] Found expr:[91:70->91:82] @@ -595,19 +841,32 @@ ContextPath Type[someRecordWithNestedStuff] Path someRecordWithNestedStuff Path Stdlib.Int.toS Path toS -[{ - "label": "Int.toStringWithRadix", - "kind": 12, - "tags": [1], +[ + { + "data": null, + "deprecated": true, "detail": "(int, ~radix: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toString` instead\n\n\n`toStringWithRadix(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toStringWithRadix(6, ~radix=2) // \"110\"\nInt.toStringWithRadix(373592855, ~radix=16) // \"16449317\"\nInt.toStringWithRadix(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n"} - }, { - "label": "Int.toString", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toString` instead\n\n\n`toStringWithRadix(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toStringWithRadix(6, ~radix=2) // \"110\"\nInt.toStringWithRadix(373592855, ~radix=16) // \"16449317\"\nInt.toStringWithRadix(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toStringWithRadix", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~radix: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toString(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toString(1000) // \"1000\"\nInt.toString(-1000) // \"-1000\"\nInt.toString(6, ~radix=2) // \"110\"\nInt.toString(373592855, ~radix=16) // \"16449317\"\nInt.toString(123456, ~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": "\n`toString(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toString(1000) // \"1000\"\nInt.toString(-1000) // \"-1000\"\nInt.toString(6, ~radix=2) // \"110\"\nInt.toString(373592855, ~radix=16) // \"16449317\"\nInt.toString(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n" + }, + "kind": 12, + "label": "Int.toString", + "tags": [] + } +] Complete src/CompletionInferValues.res 95:109 posCursor:[95:109] posNoWhite:[95:108] Found expr:[95:97->95:109] @@ -627,19 +886,32 @@ ContextPath Type[otherNestedRecord] Path otherNestedRecord Path Stdlib.Int.toS Path toS -[{ - "label": "Int.toStringWithRadix", - "kind": 12, - "tags": [1], +[ + { + "data": null, + "deprecated": true, "detail": "(int, ~radix: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toString` instead\n\n\n`toStringWithRadix(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toStringWithRadix(6, ~radix=2) // \"110\"\nInt.toStringWithRadix(373592855, ~radix=16) // \"16449317\"\nInt.toStringWithRadix(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n"} - }, { - "label": "Int.toString", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toString` instead\n\n\n`toStringWithRadix(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toStringWithRadix(6, ~radix=2) // \"110\"\nInt.toStringWithRadix(373592855, ~radix=16) // \"16449317\"\nInt.toStringWithRadix(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toStringWithRadix", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~radix: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toString(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toString(1000) // \"1000\"\nInt.toString(-1000) // \"-1000\"\nInt.toString(6, ~radix=2) // \"110\"\nInt.toString(373592855, ~radix=16) // \"16449317\"\nInt.toString(123456, ~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": "\n`toString(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toString(1000) // \"1000\"\nInt.toString(-1000) // \"-1000\"\nInt.toString(6, ~radix=2) // \"110\"\nInt.toString(373592855, ~radix=16) // \"16449317\"\nInt.toString(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n" + }, + "kind": 12, + "label": "Int.toString", + "tags": [] + } +] Complete src/CompletionInferValues.res 99:102 posCursor:[99:102] posNoWhite:[99:101] Found expr:[99:57->99:102] @@ -660,19 +932,32 @@ ContextPath Type[otherNestedRecord] Path otherNestedRecord Path Stdlib.Int.toS Path toS -[{ - "label": "Int.toStringWithRadix", - "kind": 12, - "tags": [1], +[ + { + "data": null, + "deprecated": true, "detail": "(int, ~radix: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toString` instead\n\n\n`toStringWithRadix(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toStringWithRadix(6, ~radix=2) // \"110\"\nInt.toStringWithRadix(373592855, ~radix=16) // \"16449317\"\nInt.toStringWithRadix(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n"} - }, { - "label": "Int.toString", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toString` instead\n\n\n`toStringWithRadix(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toStringWithRadix(6, ~radix=2) // \"110\"\nInt.toStringWithRadix(373592855, ~radix=16) // \"16449317\"\nInt.toStringWithRadix(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toStringWithRadix", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~radix: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toString(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toString(1000) // \"1000\"\nInt.toString(-1000) // \"-1000\"\nInt.toString(6, ~radix=2) // \"110\"\nInt.toString(373592855, ~radix=16) // \"16449317\"\nInt.toString(123456, ~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": "\n`toString(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toString(1000) // \"1000\"\nInt.toString(-1000) // \"-1000\"\nInt.toString(6, ~radix=2) // \"110\"\nInt.toString(373592855, ~radix=16) // \"16449317\"\nInt.toString(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n" + }, + "kind": 12, + "label": "Int.toString", + "tags": [] + } +] Complete src/CompletionInferValues.res 103:88 posCursor:[103:88] posNoWhite:[103:87] Found expr:[103:79->103:88] @@ -689,19 +974,32 @@ ContextPath Type[otherNestedRecord] Path otherNestedRecord Path Stdlib.String.slic Path slic -[{ - "label": "String.slice", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(string, ~start: int, ~end: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`slice(str, ~start, ~end)` returns the substring of `str` starting at\ncharacter `start` up to but not including `end`.\n- If either `start` or `end` is negative, then it is evaluated as\n `length(str - start)` or `length(str - end)`.\n- If `end` is greater than the length of `str`, then it is treated as\n `length(str)`.\n- If `start` is greater than `end`, slice returns the empty string.\n See [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n## Examples\n\n```rescript\nString.slice(\"abcdefg\", ~start=2, ~end=5) == \"cde\"\nString.slice(\"abcdefg\", ~start=2, ~end=9) == \"cdefg\"\nString.slice(\"abcdefg\", ~start=-4, ~end=-2) == \"de\"\nString.slice(\"abcdefg\", ~start=5, ~end=1) == \"\"\nString.slice(\"abcdefg\", ~start=2) == \"cdefg\"\nString.slice(\"Hello World\", ~start=6) == \"World\"\n```\n"} - }, { - "label": "String.sliceToEnd", + "documentation": { + "kind": "markdown", + "value": "\n`slice(str, ~start, ~end)` returns the substring of `str` starting at\ncharacter `start` up to but not including `end`.\n- If either `start` or `end` is negative, then it is evaluated as\n `length(str - start)` or `length(str - end)`.\n- If `end` is greater than the length of `str`, then it is treated as\n `length(str)`.\n- If `start` is greater than `end`, slice returns the empty string.\n See [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n## Examples\n\n```rescript\nString.slice(\"abcdefg\", ~start=2, ~end=5) == \"cde\"\nString.slice(\"abcdefg\", ~start=2, ~end=9) == \"cdefg\"\nString.slice(\"abcdefg\", ~start=-4, ~end=-2) == \"de\"\nString.slice(\"abcdefg\", ~start=5, ~end=1) == \"\"\nString.slice(\"abcdefg\", ~start=2) == \"cdefg\"\nString.slice(\"Hello World\", ~start=6) == \"World\"\n```\n" + }, "kind": 12, - "tags": [1], + "label": "String.slice", + "tags": [] + }, + { + "data": null, + "deprecated": true, "detail": "(string, ~start: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(str, ~start)` returns the substring of `str` starting at character\n`start` to the end of the string.\n- If `start` is negative, then it is evaluated as `length(str - start)`.\n- If `start` is greater than the length of `str`, then sliceToEnd returns the empty string.\n See [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n## Examples\n\n```rescript\nString.sliceToEnd(\"abcdefg\", ~start=4) == \"efg\"\nString.sliceToEnd(\"abcdefg\", ~start=-2) == \"fg\"\nString.sliceToEnd(\"abcdefg\", ~start=7) == \"\"\n```\n"} - }] + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(str, ~start)` returns the substring of `str` starting at character\n`start` to the end of the string.\n- If `start` is negative, then it is evaluated as `length(str - start)`.\n- If `start` is greater than the length of `str`, then sliceToEnd returns the empty string.\n See [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n## Examples\n\n```rescript\nString.sliceToEnd(\"abcdefg\", ~start=4) == \"efg\"\nString.sliceToEnd(\"abcdefg\", ~start=-2) == \"fg\"\nString.sliceToEnd(\"abcdefg\", ~start=7) == \"\"\n```\n" + }, + "kind": 12, + "label": "String.sliceToEnd", + "tags": [ 1 ] + } +] Complete src/CompletionInferValues.res 107:89 posCursor:[107:89] posNoWhite:[107:88] Found expr:[107:80->107:89] @@ -718,19 +1016,32 @@ ContextPath Type[otherNestedRecord] Path otherNestedRecord Path Stdlib.String.slic Path slic -[{ - "label": "String.slice", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(string, ~start: int, ~end: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`slice(str, ~start, ~end)` returns the substring of `str` starting at\ncharacter `start` up to but not including `end`.\n- If either `start` or `end` is negative, then it is evaluated as\n `length(str - start)` or `length(str - end)`.\n- If `end` is greater than the length of `str`, then it is treated as\n `length(str)`.\n- If `start` is greater than `end`, slice returns the empty string.\n See [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n## Examples\n\n```rescript\nString.slice(\"abcdefg\", ~start=2, ~end=5) == \"cde\"\nString.slice(\"abcdefg\", ~start=2, ~end=9) == \"cdefg\"\nString.slice(\"abcdefg\", ~start=-4, ~end=-2) == \"de\"\nString.slice(\"abcdefg\", ~start=5, ~end=1) == \"\"\nString.slice(\"abcdefg\", ~start=2) == \"cdefg\"\nString.slice(\"Hello World\", ~start=6) == \"World\"\n```\n"} - }, { - "label": "String.sliceToEnd", + "documentation": { + "kind": "markdown", + "value": "\n`slice(str, ~start, ~end)` returns the substring of `str` starting at\ncharacter `start` up to but not including `end`.\n- If either `start` or `end` is negative, then it is evaluated as\n `length(str - start)` or `length(str - end)`.\n- If `end` is greater than the length of `str`, then it is treated as\n `length(str)`.\n- If `start` is greater than `end`, slice returns the empty string.\n See [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n## Examples\n\n```rescript\nString.slice(\"abcdefg\", ~start=2, ~end=5) == \"cde\"\nString.slice(\"abcdefg\", ~start=2, ~end=9) == \"cdefg\"\nString.slice(\"abcdefg\", ~start=-4, ~end=-2) == \"de\"\nString.slice(\"abcdefg\", ~start=5, ~end=1) == \"\"\nString.slice(\"abcdefg\", ~start=2) == \"cdefg\"\nString.slice(\"Hello World\", ~start=6) == \"World\"\n```\n" + }, "kind": 12, - "tags": [1], + "label": "String.slice", + "tags": [] + }, + { + "data": null, + "deprecated": true, "detail": "(string, ~start: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(str, ~start)` returns the substring of `str` starting at character\n`start` to the end of the string.\n- If `start` is negative, then it is evaluated as `length(str - start)`.\n- If `start` is greater than the length of `str`, then sliceToEnd returns the empty string.\n See [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n## Examples\n\n```rescript\nString.sliceToEnd(\"abcdefg\", ~start=4) == \"efg\"\nString.sliceToEnd(\"abcdefg\", ~start=-2) == \"fg\"\nString.sliceToEnd(\"abcdefg\", ~start=7) == \"\"\n```\n"} - }] + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(str, ~start)` returns the substring of `str` starting at character\n`start` to the end of the string.\n- If `start` is negative, then it is evaluated as `length(str - start)`.\n- If `start` is greater than the length of `str`, then sliceToEnd returns the empty string.\n See [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n## Examples\n\n```rescript\nString.sliceToEnd(\"abcdefg\", ~start=4) == \"efg\"\nString.sliceToEnd(\"abcdefg\", ~start=-2) == \"fg\"\nString.sliceToEnd(\"abcdefg\", ~start=7) == \"\"\n```\n" + }, + "kind": 12, + "label": "String.sliceToEnd", + "tags": [ 1 ] + } +] Complete src/CompletionInferValues.res 111:80 posCursor:[111:80] posNoWhite:[111:79] Found expr:[111:70->111:80] @@ -747,19 +1058,32 @@ ContextPath Type[otherNestedRecord] Path otherNestedRecord Path Stdlib.String.slic Path slic -[{ - "label": "String.slice", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(string, ~start: int, ~end: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`slice(str, ~start, ~end)` returns the substring of `str` starting at\ncharacter `start` up to but not including `end`.\n- If either `start` or `end` is negative, then it is evaluated as\n `length(str - start)` or `length(str - end)`.\n- If `end` is greater than the length of `str`, then it is treated as\n `length(str)`.\n- If `start` is greater than `end`, slice returns the empty string.\n See [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n## Examples\n\n```rescript\nString.slice(\"abcdefg\", ~start=2, ~end=5) == \"cde\"\nString.slice(\"abcdefg\", ~start=2, ~end=9) == \"cdefg\"\nString.slice(\"abcdefg\", ~start=-4, ~end=-2) == \"de\"\nString.slice(\"abcdefg\", ~start=5, ~end=1) == \"\"\nString.slice(\"abcdefg\", ~start=2) == \"cdefg\"\nString.slice(\"Hello World\", ~start=6) == \"World\"\n```\n"} - }, { - "label": "String.sliceToEnd", + "documentation": { + "kind": "markdown", + "value": "\n`slice(str, ~start, ~end)` returns the substring of `str` starting at\ncharacter `start` up to but not including `end`.\n- If either `start` or `end` is negative, then it is evaluated as\n `length(str - start)` or `length(str - end)`.\n- If `end` is greater than the length of `str`, then it is treated as\n `length(str)`.\n- If `start` is greater than `end`, slice returns the empty string.\n See [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n## Examples\n\n```rescript\nString.slice(\"abcdefg\", ~start=2, ~end=5) == \"cde\"\nString.slice(\"abcdefg\", ~start=2, ~end=9) == \"cdefg\"\nString.slice(\"abcdefg\", ~start=-4, ~end=-2) == \"de\"\nString.slice(\"abcdefg\", ~start=5, ~end=1) == \"\"\nString.slice(\"abcdefg\", ~start=2) == \"cdefg\"\nString.slice(\"Hello World\", ~start=6) == \"World\"\n```\n" + }, "kind": 12, - "tags": [1], + "label": "String.slice", + "tags": [] + }, + { + "data": null, + "deprecated": true, "detail": "(string, ~start: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(str, ~start)` returns the substring of `str` starting at character\n`start` to the end of the string.\n- If `start` is negative, then it is evaluated as `length(str - start)`.\n- If `start` is greater than the length of `str`, then sliceToEnd returns the empty string.\n See [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n## Examples\n\n```rescript\nString.sliceToEnd(\"abcdefg\", ~start=4) == \"efg\"\nString.sliceToEnd(\"abcdefg\", ~start=-2) == \"fg\"\nString.sliceToEnd(\"abcdefg\", ~start=7) == \"\"\n```\n"} - }] + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(str, ~start)` returns the substring of `str` starting at character\n`start` to the end of the string.\n- If `start` is negative, then it is evaluated as `length(str - start)`.\n- If `start` is greater than the length of `str`, then sliceToEnd returns the empty string.\n See [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n## Examples\n\n```rescript\nString.sliceToEnd(\"abcdefg\", ~start=4) == \"efg\"\nString.sliceToEnd(\"abcdefg\", ~start=-2) == \"fg\"\nString.sliceToEnd(\"abcdefg\", ~start=7) == \"\"\n```\n" + }, + "kind": 12, + "label": "String.sliceToEnd", + "tags": [ 1 ] + } +] Complete src/CompletionInferValues.res 115:53 posCursor:[115:53] posNoWhite:[115:52] Found expr:[115:46->115:53] @@ -774,19 +1098,32 @@ Path x ContextPath int Path Stdlib.Int.toSt Path toSt -[{ - "label": "Int.toStringWithRadix", - "kind": 12, - "tags": [1], +[ + { + "data": null, + "deprecated": true, "detail": "(int, ~radix: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toString` instead\n\n\n`toStringWithRadix(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toStringWithRadix(6, ~radix=2) // \"110\"\nInt.toStringWithRadix(373592855, ~radix=16) // \"16449317\"\nInt.toStringWithRadix(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n"} - }, { - "label": "Int.toString", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toString` instead\n\n\n`toStringWithRadix(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toStringWithRadix(6, ~radix=2) // \"110\"\nInt.toStringWithRadix(373592855, ~radix=16) // \"16449317\"\nInt.toStringWithRadix(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toStringWithRadix", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~radix: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toString(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toString(1000) // \"1000\"\nInt.toString(-1000) // \"-1000\"\nInt.toString(6, ~radix=2) // \"110\"\nInt.toString(373592855, ~radix=16) // \"16449317\"\nInt.toString(123456, ~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": "\n`toString(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toString(1000) // \"1000\"\nInt.toString(-1000) // \"-1000\"\nInt.toString(6, ~radix=2) // \"110\"\nInt.toString(373592855, ~radix=16) // \"16449317\"\nInt.toString(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n" + }, + "kind": 12, + "label": "Int.toString", + "tags": [] + } +] Complete src/CompletionInferValues.res 123:26 posCursor:[123:26] posNoWhite:[123:25] Found expr:[123:3->123:37] @@ -801,19 +1138,32 @@ ContextPath CArgument CArgument Value[fnWithRecordCallback]($0)($0) ContextPath CArgument Value[fnWithRecordCallback]($0) ContextPath Value[fnWithRecordCallback] Path fnWithRecordCallback -[{ - "label": "name", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nname: string\n```\n\n```rescript\ntype someRecord = {name: string, age: int}\n```"} - }, { - "label": "age", + "documentation": { + "kind": "markdown", + "value": "```rescript\nname: string\n```\n\n```rescript\ntype someRecord = {name: string, age: int}\n```" + }, "kind": 5, - "tags": [], + "label": "name", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nage: int\n```\n\n```rescript\ntype someRecord = {name: string, age: int}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nage: int\n```\n\n```rescript\ntype someRecord = {name: string, age: int}\n```" + }, + "kind": 5, + "label": "age", + "tags": [] + } +] Complete src/CompletionInferValues.res 130:30 posCursor:[130:30] posNoWhite:[130:29] Found expr:[130:3->130:33] @@ -835,19 +1185,26 @@ Path fn2 CPPipe pathFromEnv:ReactDOM.Client.Root found:false Path ReactDOM.Client.Root. Path -[{ - "label": "ReactDOM.Client.Root.unmount", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(t, unit) => unit", - "documentation": null - }, { - "label": "ReactDOM.Client.Root.render", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "ReactDOM.Client.Root.unmount", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(t, React.element) => unit", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "ReactDOM.Client.Root.render", + "tags": [] + } +] Complete src/CompletionInferValues.res 139:30 posCursor:[139:30] posNoWhite:[139:29] Found expr:[139:3->139:33] @@ -869,19 +1226,26 @@ Path fn3 CPPipe pathFromEnv:CompletionSupport.Test found:false Path CompletionSupport.Test. Path -[{ - "label": "CompletionSupport.Test.add", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => int", - "documentation": null - }, { - "label": "CompletionSupport.Test.addSelf", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "CompletionSupport.Test.add", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "t => t", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "CompletionSupport.Test.addSelf", + "tags": [] + } +] Complete src/CompletionInferValues.res 143:47 XXX Not found! @@ -891,16 +1255,20 @@ Resolved opens 1 Stdlib ContextPath Value[Belt, Int, toString](Nolabel) ContextPath Value[Belt, Int, toString] Path Belt.Int.toString -[{ - "label": "\"\"", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null, - "sortText": "A", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "\"$0\"", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "\"\"", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionInferValues.res 147:66 XXX Not found! @@ -910,16 +1278,20 @@ Resolved opens 1 Stdlib ContextPath Value[String, split](Nolabel, Nolabel) ContextPath Value[String, split] Path String.split -[{ - "label": "[]", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null, - "sortText": "A", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "[$0]", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "[]", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionInferValues.res 151:105 posCursor:[151:105] posNoWhite:[151:104] Found expr:[151:18->151:110] @@ -949,13 +1321,20 @@ Path CompletionSupport2.makeRenderer CPPipe pathFromEnv:CompletionSupport.Nested found:false Path CompletionSupport.Nested. Path -[{ - "label": "root", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "ReactDOM.Client.Root.t", - "documentation": {"kind": "markdown", "value": "```rescript\nroot: ReactDOM.Client.Root.t\n```\n\n```rescript\ntype config = {root: ReactDOM.Client.Root.t}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nroot: ReactDOM.Client.Root.t\n```\n\n```rescript\ntype config = {root: ReactDOM.Client.Root.t}\n```" + }, + "kind": 5, + "label": "root", + "tags": [] + } +] Complete src/CompletionInferValues.res 155:110 posCursor:[155:110] posNoWhite:[155:109] Found expr:[155:18->155:115] @@ -977,19 +1356,26 @@ Path CompletionSupport2.makeRenderer CPPipe pathFromEnv:ReactDOM.Client.Root found:false Path ReactDOM.Client.Root. Path -[{ - "label": "ReactDOM.Client.Root.unmount", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(t, unit) => unit", - "documentation": null - }, { - "label": "ReactDOM.Client.Root.render", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "ReactDOM.Client.Root.unmount", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(t, React.element) => unit", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "ReactDOM.Client.Root.render", + "tags": [] + } +] Hover src/CompletionInferValues.res 160:27 Nothing at that position. Now trying to use completion. @@ -1004,5 +1390,5 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[res] Path res -{"contents": {"kind": "markdown", "value": "```rescript\nint\n```"}} +{ "contents": { "kind": "markdown", "value": "```rescript\nint\n```" } } diff --git a/tests/analysis_tests/tests/src/expected/CompletionJsx.res.txt b/tests/analysis_tests/tests/src/expected/CompletionJsx.res.txt index a866ce1ee3e..8ca26c194e7 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionJsx.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionJsx.res.txt @@ -1,3 +1,4 @@ +null Complete src/CompletionJsx.res 3:17 posCursor:[3:17] posNoWhite:[3:16] Found expr:[3:3->3:17] Completable: Cpath Value[someString]->st @@ -8,19 +9,32 @@ ContextPath Value[someString] Path someString Path Stdlib.String.st Path st -[{ - "label": "String.startsWith", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(string, string) => bool", - "documentation": {"kind": "markdown", "value": "\n`startsWith(str, substr)` returns `true` if the `str` starts with `substr`,\n`false` otherwise.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWith(\"BuckleScript\", \"Buckle\") == true\nString.startsWith(\"BuckleScript\", \"\") == true\nString.startsWith(\"JavaScript\", \"Buckle\") == false\n```\n"} - }, { - "label": "String.startsWithFrom", + "documentation": { + "kind": "markdown", + "value": "\n`startsWith(str, substr)` returns `true` if the `str` starts with `substr`,\n`false` otherwise.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWith(\"BuckleScript\", \"Buckle\") == true\nString.startsWith(\"BuckleScript\", \"\") == true\nString.startsWith(\"JavaScript\", \"Buckle\") == false\n```\n" + }, "kind": 12, - "tags": [], + "label": "String.startsWith", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(string, string, int) => bool", - "documentation": {"kind": "markdown", "value": "\n`startsWithFrom(str, substr, n)` returns `true` if the `str` starts\nwith `substr` starting at position `n`, `false` otherwise. If `n` is negative,\nthe search starts at the beginning of `str`.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWithFrom(\"BuckleScript\", \"kle\", 3) == true\nString.startsWithFrom(\"BuckleScript\", \"\", 3) == true\nString.startsWithFrom(\"JavaScript\", \"Buckle\", 2) == false\n```\n"} - }] + "documentation": { + "kind": "markdown", + "value": "\n`startsWithFrom(str, substr, n)` returns `true` if the `str` starts\nwith `substr` starting at position `n`, `false` otherwise. If `n` is negative,\nthe search starts at the beginning of `str`.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWithFrom(\"BuckleScript\", \"kle\", 3) == true\nString.startsWithFrom(\"BuckleScript\", \"\", 3) == true\nString.startsWithFrom(\"JavaScript\", \"Buckle\", 2) == false\n```\n" + }, + "kind": 12, + "label": "String.startsWithFrom", + "tags": [] + } +] Complete src/CompletionJsx.res 13:21 posCursor:[13:21] posNoWhite:[13:20] Found expr:[8:13->33:3] @@ -38,27 +52,46 @@ ContextPath Value[someString] Path someString Path Stdlib.String.st Path st -[{ - "label": "React.string", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "Turns `string` into a JSX element so it can be used inside of JSX."}, - "sortText": "A", - "insertTextFormat": 2 - }, { - "label": "String.startsWith", + "documentation": { + "kind": "markdown", + "value": "Turns `string` into a JSX element so it can be used inside of JSX." + }, + "insertTextFormat": 2, "kind": 12, - "tags": [], + "label": "React.string", + "sortText": "A", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(string, string) => bool", - "documentation": {"kind": "markdown", "value": "\n`startsWith(str, substr)` returns `true` if the `str` starts with `substr`,\n`false` otherwise.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWith(\"BuckleScript\", \"Buckle\") == true\nString.startsWith(\"BuckleScript\", \"\") == true\nString.startsWith(\"JavaScript\", \"Buckle\") == false\n```\n"} - }, { - "label": "String.startsWithFrom", + "documentation": { + "kind": "markdown", + "value": "\n`startsWith(str, substr)` returns `true` if the `str` starts with `substr`,\n`false` otherwise.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWith(\"BuckleScript\", \"Buckle\") == true\nString.startsWith(\"BuckleScript\", \"\") == true\nString.startsWith(\"JavaScript\", \"Buckle\") == false\n```\n" + }, "kind": 12, - "tags": [], + "label": "String.startsWith", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(string, string, int) => bool", - "documentation": {"kind": "markdown", "value": "\n`startsWithFrom(str, substr, n)` returns `true` if the `str` starts\nwith `substr` starting at position `n`, `false` otherwise. If `n` is negative,\nthe search starts at the beginning of `str`.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWithFrom(\"BuckleScript\", \"kle\", 3) == true\nString.startsWithFrom(\"BuckleScript\", \"\", 3) == true\nString.startsWithFrom(\"JavaScript\", \"Buckle\", 2) == false\n```\n"} - }] + "documentation": { + "kind": "markdown", + "value": "\n`startsWithFrom(str, substr, n)` returns `true` if the `str` starts\nwith `substr` starting at position `n`, `false` otherwise. If `n` is negative,\nthe search starts at the beginning of `str`.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWithFrom(\"BuckleScript\", \"kle\", 3) == true\nString.startsWithFrom(\"BuckleScript\", \"\", 3) == true\nString.startsWithFrom(\"JavaScript\", \"Buckle\", 2) == false\n```\n" + }, + "kind": 12, + "label": "String.startsWithFrom", + "tags": [] + } +] Complete src/CompletionJsx.res 18:24 posCursor:[18:24] posNoWhite:[18:23] Found expr:[8:13->33:3] @@ -77,27 +110,46 @@ ContextPath Value[someString] Path someString Path Stdlib.String.st Path st -[{ - "label": "React.string", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "Turns `string` into a JSX element so it can be used inside of JSX."}, - "sortText": "A", - "insertTextFormat": 2 - }, { - "label": "String.startsWith", + "documentation": { + "kind": "markdown", + "value": "Turns `string` into a JSX element so it can be used inside of JSX." + }, + "insertTextFormat": 2, "kind": 12, - "tags": [], + "label": "React.string", + "sortText": "A", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(string, string) => bool", - "documentation": {"kind": "markdown", "value": "\n`startsWith(str, substr)` returns `true` if the `str` starts with `substr`,\n`false` otherwise.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWith(\"BuckleScript\", \"Buckle\") == true\nString.startsWith(\"BuckleScript\", \"\") == true\nString.startsWith(\"JavaScript\", \"Buckle\") == false\n```\n"} - }, { - "label": "String.startsWithFrom", + "documentation": { + "kind": "markdown", + "value": "\n`startsWith(str, substr)` returns `true` if the `str` starts with `substr`,\n`false` otherwise.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWith(\"BuckleScript\", \"Buckle\") == true\nString.startsWith(\"BuckleScript\", \"\") == true\nString.startsWith(\"JavaScript\", \"Buckle\") == false\n```\n" + }, "kind": 12, - "tags": [], + "label": "String.startsWith", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(string, string, int) => bool", - "documentation": {"kind": "markdown", "value": "\n`startsWithFrom(str, substr, n)` returns `true` if the `str` starts\nwith `substr` starting at position `n`, `false` otherwise. If `n` is negative,\nthe search starts at the beginning of `str`.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWithFrom(\"BuckleScript\", \"kle\", 3) == true\nString.startsWithFrom(\"BuckleScript\", \"\", 3) == true\nString.startsWithFrom(\"JavaScript\", \"Buckle\", 2) == false\n```\n"} - }] + "documentation": { + "kind": "markdown", + "value": "\n`startsWithFrom(str, substr, n)` returns `true` if the `str` starts\nwith `substr` starting at position `n`, `false` otherwise. If `n` is negative,\nthe search starts at the beginning of `str`.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWithFrom(\"BuckleScript\", \"kle\", 3) == true\nString.startsWithFrom(\"BuckleScript\", \"\", 3) == true\nString.startsWithFrom(\"JavaScript\", \"Buckle\", 2) == false\n```\n" + }, + "kind": 12, + "label": "String.startsWithFrom", + "tags": [] + } +] Complete src/CompletionJsx.res 20:27 posCursor:[20:27] posNoWhite:[20:26] Found expr:[8:13->33:3] @@ -115,27 +167,46 @@ ContextPath string->st <> ContextPath string Path Stdlib.String.st Path st -[{ - "label": "React.string", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "Turns `string` into a JSX element so it can be used inside of JSX."}, - "sortText": "A", - "insertTextFormat": 2 - }, { - "label": "String.startsWith", + "documentation": { + "kind": "markdown", + "value": "Turns `string` into a JSX element so it can be used inside of JSX." + }, + "insertTextFormat": 2, "kind": 12, - "tags": [], + "label": "React.string", + "sortText": "A", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(string, string) => bool", - "documentation": {"kind": "markdown", "value": "\n`startsWith(str, substr)` returns `true` if the `str` starts with `substr`,\n`false` otherwise.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWith(\"BuckleScript\", \"Buckle\") == true\nString.startsWith(\"BuckleScript\", \"\") == true\nString.startsWith(\"JavaScript\", \"Buckle\") == false\n```\n"} - }, { - "label": "String.startsWithFrom", + "documentation": { + "kind": "markdown", + "value": "\n`startsWith(str, substr)` returns `true` if the `str` starts with `substr`,\n`false` otherwise.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWith(\"BuckleScript\", \"Buckle\") == true\nString.startsWith(\"BuckleScript\", \"\") == true\nString.startsWith(\"JavaScript\", \"Buckle\") == false\n```\n" + }, "kind": 12, - "tags": [], + "label": "String.startsWith", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(string, string, int) => bool", - "documentation": {"kind": "markdown", "value": "\n`startsWithFrom(str, substr, n)` returns `true` if the `str` starts\nwith `substr` starting at position `n`, `false` otherwise. If `n` is negative,\nthe search starts at the beginning of `str`.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWithFrom(\"BuckleScript\", \"kle\", 3) == true\nString.startsWithFrom(\"BuckleScript\", \"\", 3) == true\nString.startsWithFrom(\"JavaScript\", \"Buckle\", 2) == false\n```\n"} - }] + "documentation": { + "kind": "markdown", + "value": "\n`startsWithFrom(str, substr, n)` returns `true` if the `str` starts\nwith `substr` starting at position `n`, `false` otherwise. If `n` is negative,\nthe search starts at the beginning of `str`.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWithFrom(\"BuckleScript\", \"kle\", 3) == true\nString.startsWithFrom(\"BuckleScript\", \"\", 3) == true\nString.startsWithFrom(\"JavaScript\", \"Buckle\", 2) == false\n```\n" + }, + "kind": 12, + "label": "String.startsWithFrom", + "tags": [] + } +] Complete src/CompletionJsx.res 22:40 posCursor:[22:40] posNoWhite:[22:39] Found expr:[8:13->33:3] @@ -155,27 +226,46 @@ ContextPath Value[String, trim] Path String.trim Path Stdlib.String.st Path st -[{ - "label": "React.string", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "Turns `string` into a JSX element so it can be used inside of JSX."}, - "sortText": "A", - "insertTextFormat": 2 - }, { - "label": "String.startsWith", + "documentation": { + "kind": "markdown", + "value": "Turns `string` into a JSX element so it can be used inside of JSX." + }, + "insertTextFormat": 2, "kind": 12, - "tags": [], + "label": "React.string", + "sortText": "A", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(string, string) => bool", - "documentation": {"kind": "markdown", "value": "\n`startsWith(str, substr)` returns `true` if the `str` starts with `substr`,\n`false` otherwise.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWith(\"BuckleScript\", \"Buckle\") == true\nString.startsWith(\"BuckleScript\", \"\") == true\nString.startsWith(\"JavaScript\", \"Buckle\") == false\n```\n"} - }, { - "label": "String.startsWithFrom", + "documentation": { + "kind": "markdown", + "value": "\n`startsWith(str, substr)` returns `true` if the `str` starts with `substr`,\n`false` otherwise.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWith(\"BuckleScript\", \"Buckle\") == true\nString.startsWith(\"BuckleScript\", \"\") == true\nString.startsWith(\"JavaScript\", \"Buckle\") == false\n```\n" + }, "kind": 12, - "tags": [], + "label": "String.startsWith", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(string, string, int) => bool", - "documentation": {"kind": "markdown", "value": "\n`startsWithFrom(str, substr, n)` returns `true` if the `str` starts\nwith `substr` starting at position `n`, `false` otherwise. If `n` is negative,\nthe search starts at the beginning of `str`.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWithFrom(\"BuckleScript\", \"kle\", 3) == true\nString.startsWithFrom(\"BuckleScript\", \"\", 3) == true\nString.startsWithFrom(\"JavaScript\", \"Buckle\", 2) == false\n```\n"} - }] + "documentation": { + "kind": "markdown", + "value": "\n`startsWithFrom(str, substr, n)` returns `true` if the `str` starts\nwith `substr` starting at position `n`, `false` otherwise. If `n` is negative,\nthe search starts at the beginning of `str`.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWithFrom(\"BuckleScript\", \"kle\", 3) == true\nString.startsWithFrom(\"BuckleScript\", \"\", 3) == true\nString.startsWithFrom(\"JavaScript\", \"Buckle\", 2) == false\n```\n" + }, + "kind": 12, + "label": "String.startsWithFrom", + "tags": [] + } +] Complete src/CompletionJsx.res 24:19 posCursor:[24:19] posNoWhite:[24:18] Found expr:[8:13->33:3] @@ -194,159 +284,304 @@ ContextPath Value[someInt] Path someInt Path Stdlib.Int. Path -[{ - "label": "React.int", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "Turns `int` into a JSX element so it can be used inside of JSX."}, - "sortText": "A", - "insertTextFormat": 2 - }, { - "label": "Int.equal", + "documentation": { + "kind": "markdown", + "value": "Turns `int` into a JSX element so it can be used inside of JSX." + }, + "insertTextFormat": 2, "kind": 12, - "tags": [], + "label": "React.int", + "sortText": "A", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, int) => bool", - "documentation": null - }, { - "label": "Int.toStringWithRadix", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [1], + "label": "Int.equal", + "tags": [] + }, + { + "data": null, + "deprecated": true, "detail": "(int, ~radix: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toString` instead\n\n\n`toStringWithRadix(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toStringWithRadix(6, ~radix=2) // \"110\"\nInt.toStringWithRadix(373592855, ~radix=16) // \"16449317\"\nInt.toStringWithRadix(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n"} - }, { - "label": "Int.toExponentialWithPrecision", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toString` instead\n\n\n`toStringWithRadix(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toStringWithRadix(6, ~radix=2) // \"110\"\nInt.toStringWithRadix(373592855, ~radix=16) // \"16449317\"\nInt.toStringWithRadix(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n" + }, "kind": 12, - "tags": [1], + "label": "Int.toStringWithRadix", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": true, "detail": "(int, ~digits: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toExponential` instead\n\n\n`toExponential(n, ~digits)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point. See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\non MDN.\n\n## Examples\n\n```rescript\nInt.toExponentialWithPrecision(77, ~digits=2) // \"7.70e+1\"\nInt.toExponentialWithPrecision(5678, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10.\n"} - }, { - "label": "Int.bitwiseXor", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toExponential` instead\n\n\n`toExponential(n, ~digits)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point. See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\non MDN.\n\n## Examples\n\n```rescript\nInt.toExponentialWithPrecision(77, ~digits=2) // \"7.70e+1\"\nInt.toExponentialWithPrecision(5678, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toExponentialWithPrecision", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": false, "detail": "(int, int) => int", - "documentation": {"kind": "markdown", "value": "\n`bigwiseXor(n1, n2)` calculates the bitwise XOR of two integers.\n\n## Examples\n\n```rescript\nInt.bitwiseXor(7, 4) == 3\n```\n"} - }, { - "label": "Int.clamp", + "documentation": { + "kind": "markdown", + "value": "\n`bigwiseXor(n1, n2)` calculates the bitwise XOR of two integers.\n\n## Examples\n\n```rescript\nInt.bitwiseXor(7, 4) == 3\n```\n" + }, "kind": 12, - "tags": [], + "label": "Int.bitwiseXor", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(~min: int=?, ~max: int=?, int) => int", - "documentation": {"kind": "markdown", "value": "\n`clamp(~min=?, ~max=?, value)` returns `value`, optionally bounded by `min` and `max`.\n\nif `max` \\< `min` returns `min`.\n\n## Examples\n\n```rescript\nInt.clamp(42) == 42\nInt.clamp(42, ~min=50) == 50\nInt.clamp(42, ~max=40) == 40\nInt.clamp(42, ~min=50, ~max=40) == 50\n```\n"} - }, { - "label": "Int.toFixedWithPrecision", + "documentation": { + "kind": "markdown", + "value": "\n`clamp(~min=?, ~max=?, value)` returns `value`, optionally bounded by `min` and `max`.\n\nif `max` \\< `min` returns `min`.\n\n## Examples\n\n```rescript\nInt.clamp(42) == 42\nInt.clamp(42, ~min=50) == 50\nInt.clamp(42, ~max=40) == 40\nInt.clamp(42, ~min=50, ~max=40) == 50\n```\n" + }, "kind": 12, - "tags": [1], + "label": "Int.clamp", + "tags": [] + }, + { + "data": null, + "deprecated": true, "detail": "(int, ~digits: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toFixed` instead\n\n\n`toFixedWithPrecision(n, ~digits)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point. See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)\non MDN.\n\n## Examples\n\n```rescript\nInt.toFixedWithPrecision(300, ~digits=4) // \"300.0000\"\nInt.toFixedWithPrecision(300, ~digits=1) // \"300.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is less than 0 or larger than 100.\n"} - }, { - "label": "Int.toPrecisionWithPrecision", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toFixed` instead\n\n\n`toFixedWithPrecision(n, ~digits)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point. See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)\non MDN.\n\n## Examples\n\n```rescript\nInt.toFixedWithPrecision(300, ~digits=4) // \"300.0000\"\nInt.toFixedWithPrecision(300, ~digits=1) // \"300.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is less than 0 or larger than 100.\n" + }, "kind": 12, - "tags": [1], + "label": "Int.toFixedWithPrecision", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": true, "detail": "(int, ~digits: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toPrecision` instead\n\n\n`toPrecisionWithPrecision(n, ~digits)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits. See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nInt.toPrecisionWithPrecision(100, ~digits=2) // \"1.0e+2\"\nInt.toPrecisionWithPrecision(1, ~digits=2) // \"1.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\n Implementations are allowed to support larger and smaller values as well.\n ECMA-262 only requires a precision of up to 21 significant digits.\n"} - }, { - "label": "Int.bitwiseAnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toPrecision` instead\n\n\n`toPrecisionWithPrecision(n, ~digits)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits. See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nInt.toPrecisionWithPrecision(100, ~digits=2) // \"1.0e+2\"\nInt.toPrecisionWithPrecision(1, ~digits=2) // \"1.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\n Implementations are allowed to support larger and smaller values as well.\n ECMA-262 only requires a precision of up to 21 significant digits.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toPrecisionWithPrecision", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": false, "detail": "(int, int) => int", - "documentation": {"kind": "markdown", "value": "\n`bitwiseAnd(n1, n2)` calculates the bitwise AND of two integers.\n\n## Examples\n\n```rescript\nInt.bitwiseAnd(7, 4) == 4\n```\n"} - }, { - "label": "Int.shiftRight", + "documentation": { + "kind": "markdown", + "value": "\n`bitwiseAnd(n1, n2)` calculates the bitwise AND of two integers.\n\n## Examples\n\n```rescript\nInt.bitwiseAnd(7, 4) == 4\n```\n" + }, "kind": 12, - "tags": [], + "label": "Int.bitwiseAnd", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, int) => int", - "documentation": {"kind": "markdown", "value": "\n`shiftRight(n, length)` calculates the shifted value of an integer `n` by `length` bits to the right.\n\nAlso known as \"arithmetic right shift\" operation.\n\n## Examples\n\n```rescript\nInt.shiftRight(8, 1) == 4\n```\n"} - }, { - "label": "Int.compare", + "documentation": { + "kind": "markdown", + "value": "\n`shiftRight(n, length)` calculates the shifted value of an integer `n` by `length` bits to the right.\n\nAlso known as \"arithmetic right shift\" operation.\n\n## Examples\n\n```rescript\nInt.shiftRight(8, 1) == 4\n```\n" + }, "kind": 12, - "tags": [], + "label": "Int.shiftRight", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, int) => Ordering.t", - "documentation": null - }, { - "label": "Int.ignore", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "Int.compare", + "tags": [] + }, + { + "data": null, + "deprecated": false, "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 an operation with side effects)\n without having to store or process it further.\n"} - }, { - "label": "Int.bitwiseOr", + "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" + }, "kind": 12, - "tags": [], + "label": "Int.ignore", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, int) => int", - "documentation": {"kind": "markdown", "value": "\n`bitwiseOr(n1, n2)` calculates the bitwise OR of two integers.\n\n## Examples\n\n```rescript\nInt.bitwiseOr(7, 4) == 7\n```\n"} - }, { - "label": "Int.toPrecision", + "documentation": { + "kind": "markdown", + "value": "\n`bitwiseOr(n1, n2)` calculates the bitwise OR of two integers.\n\n## Examples\n\n```rescript\nInt.bitwiseOr(7, 4) == 7\n```\n" + }, "kind": 12, - "tags": [], + "label": "Int.bitwiseOr", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~digits: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toPrecision(n, ~digits=?)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits. See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nInt.toPrecision(100) // \"100\"\nInt.toPrecision(1) // \"1\"\nInt.toPrecision(100, ~digits=2) // \"1.0e+2\"\nInt.toPrecision(1, ~digits=2) // \"1.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\n Implementations are allowed to support larger and smaller values as well.\n ECMA-262 only requires a precision of up to 21 significant digits.\n"} - }, { - "label": "Int.range", + "documentation": { + "kind": "markdown", + "value": "\n`toPrecision(n, ~digits=?)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits. See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nInt.toPrecision(100) // \"100\"\nInt.toPrecision(1) // \"1\"\nInt.toPrecision(100, ~digits=2) // \"1.0e+2\"\nInt.toPrecision(1, ~digits=2) // \"1.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\n Implementations are allowed to support larger and smaller values as well.\n ECMA-262 only requires a precision of up to 21 significant digits.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toPrecision", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, int, ~options: rangeOptions=?) => array", - "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"} - }, { - "label": "Int.toString", + "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" + }, "kind": 12, - "tags": [], + "label": "Int.range", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~radix: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toString(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toString(1000) // \"1000\"\nInt.toString(-1000) // \"-1000\"\nInt.toString(6, ~radix=2) // \"110\"\nInt.toString(373592855, ~radix=16) // \"16449317\"\nInt.toString(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n"} - }, { - "label": "Int.shiftLeft", + "documentation": { + "kind": "markdown", + "value": "\n`toString(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toString(1000) // \"1000\"\nInt.toString(-1000) // \"-1000\"\nInt.toString(6, ~radix=2) // \"110\"\nInt.toString(373592855, ~radix=16) // \"16449317\"\nInt.toString(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toString", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, int) => int", - "documentation": {"kind": "markdown", "value": "\n`shiftLeft(n, length)` calculates the shifted value of an integer `n` by `length` bits to the left.\n\n## Examples\n\n```rescript\nInt.shiftLeft(4, 1) == 8\n```\n"} - }, { - "label": "Int.toFloat", + "documentation": { + "kind": "markdown", + "value": "\n`shiftLeft(n, length)` calculates the shifted value of an integer `n` by `length` bits to the left.\n\n## Examples\n\n```rescript\nInt.shiftLeft(4, 1) == 8\n```\n" + }, "kind": 12, - "tags": [], + "label": "Int.shiftLeft", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int => float", - "documentation": {"kind": "markdown", "value": "\n`toFloat(n)` return a `float` representing the given value.\n\n## Examples\n\n```rescript\nInt.toFloat(100) == 100.0\nInt.toFloat(2) == 2.0\n```\n"} - }, { - "label": "Int.mod", + "documentation": { + "kind": "markdown", + "value": "\n`toFloat(n)` return a `float` representing the given value.\n\n## Examples\n\n```rescript\nInt.toFloat(100) == 100.0\nInt.toFloat(2) == 2.0\n```\n" + }, "kind": 12, - "tags": [], + "label": "Int.toFloat", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, int) => int", - "documentation": {"kind": "markdown", "value": "\n`mod(n1, n2)` calculates the modulo (remainder after division) of two integers.\n\n## Examples\n\n```rescript\nInt.mod(7, 4) == 3\n```\n"} - }, { - "label": "Int.rangeWithOptions", + "documentation": { + "kind": "markdown", + "value": "\n`mod(n1, n2)` calculates the modulo (remainder after division) of two integers.\n\n## Examples\n\n```rescript\nInt.mod(7, 4) == 3\n```\n" + }, "kind": 12, - "tags": [1], + "label": "Int.mod", + "tags": [] + }, + { + "data": null, + "deprecated": true, "detail": "(int, int, rangeOptions) => array", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `range` instead\n\n\n`rangeWithOptions(start, end, options)` is like `range`, but with `step` and\n`inclusive` options configurable.\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.rangeWithOptions(3, 7, {step: 2}) == [3, 5]\nInt.rangeWithOptions(3, 7, {step: 2, inclusive: true}) == [3, 5, 7]\nInt.rangeWithOptions(3, 6, {step: -2}) // RangeError\n```\n\n## Exceptions\n\n- Raises `RangeError` if `step == 0 && start != end`.\n"} - }, { - "label": "Int.shiftRightUnsigned", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `range` instead\n\n\n`rangeWithOptions(start, end, options)` is like `range`, but with `step` and\n`inclusive` options configurable.\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.rangeWithOptions(3, 7, {step: 2}) == [3, 5]\nInt.rangeWithOptions(3, 7, {step: 2, inclusive: true}) == [3, 5, 7]\nInt.rangeWithOptions(3, 6, {step: -2}) // RangeError\n```\n\n## Exceptions\n\n- Raises `RangeError` if `step == 0 && start != end`.\n" + }, "kind": 12, - "tags": [], + "label": "Int.rangeWithOptions", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": false, "detail": "(int, int) => int", - "documentation": {"kind": "markdown", "value": "\n`shiftRightUnsigned(n, length)` calculates the shifted value of an integer `n` by `length` bits to the right.\nExcess bits shifted off to the right are discarded, and zero bits are shifted in from the left.\n\nAlso known as \"zero-filling right shift\" operation.\n\n## Examples\n\n```rescript\nInt.shiftRightUnsigned(4, 1) == 2\n```\n"} - }, { - "label": "Int.toLocaleString", + "documentation": { + "kind": "markdown", + "value": "\n`shiftRightUnsigned(n, length)` calculates the shifted value of an integer `n` by `length` bits to the right.\nExcess bits shifted off to the right are discarded, and zero bits are shifted in from the left.\n\nAlso known as \"zero-filling right shift\" operation.\n\n## Examples\n\n```rescript\nInt.shiftRightUnsigned(4, 1) == 2\n```\n" + }, "kind": 12, - "tags": [], + "label": "Int.shiftRightUnsigned", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int => string", - "documentation": {"kind": "markdown", "value": "\n`toLocaleString(n)` return a `string` with language-sensitive representing the\ngiven value. See [`Number.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString) on MDN.\n\n## Examples\n\n```rescript\n// If the application uses English as the default language\nInt.toLocaleString(1000) // \"1,000\"\n\n// If the application uses Portuguese Brazil as the default language\nInt.toLocaleString(1000) // \"1.000\"\n```\n"} - }, { - "label": "Int.bitwiseNot", + "documentation": { + "kind": "markdown", + "value": "\n`toLocaleString(n)` return a `string` with language-sensitive representing the\ngiven value. See [`Number.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString) on MDN.\n\n## Examples\n\n```rescript\n// If the application uses English as the default language\nInt.toLocaleString(1000) // \"1,000\"\n\n// If the application uses Portuguese Brazil as the default language\nInt.toLocaleString(1000) // \"1.000\"\n```\n" + }, "kind": 12, - "tags": [], + "label": "Int.toLocaleString", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int => int", - "documentation": {"kind": "markdown", "value": "\n`bitwiseNot(n)` calculates the bitwise NOT of an integer.\n\n## Examples\n\n```rescript\nInt.bitwiseNot(2) == -3\n```\n"} - }, { - "label": "Int.toExponential", + "documentation": { + "kind": "markdown", + "value": "\n`bitwiseNot(n)` calculates the bitwise NOT of an integer.\n\n## Examples\n\n```rescript\nInt.bitwiseNot(2) == -3\n```\n" + }, "kind": 12, - "tags": [], + "label": "Int.bitwiseNot", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~digits: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toExponential(n, ~digits=?)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point. See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\n\n## Examples\n\n```rescript\nInt.toExponential(1000) // \"1e+3\"\nInt.toExponential(-1000) // \"-1e+3\"\nInt.toExponential(77, ~digits=2) // \"7.70e+1\"\nInt.toExponential(5678, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10.\n"} - }, { - "label": "Int.toFixed", + "documentation": { + "kind": "markdown", + "value": "\n`toExponential(n, ~digits=?)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point. See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\n\n## Examples\n\n```rescript\nInt.toExponential(1000) // \"1e+3\"\nInt.toExponential(-1000) // \"-1e+3\"\nInt.toExponential(77, ~digits=2) // \"7.70e+1\"\nInt.toExponential(5678, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toExponential", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~digits: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toFixed(n, ~digits=?)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point. See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)\non MDN.\n\n## Examples\n\n```rescript\nInt.toFixed(123456) // \"123456.00\"\nInt.toFixed(10) // \"10.00\"\nInt.toFixed(300, ~digits=4) // \"300.0000\"\nInt.toFixed(300, ~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(n, ~digits=?)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point. See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)\non MDN.\n\n## Examples\n\n```rescript\nInt.toFixed(123456) // \"123456.00\"\nInt.toFixed(10) // \"10.00\"\nInt.toFixed(300, ~digits=4) // \"300.0000\"\nInt.toFixed(300, ~digits=1) // \"300.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is less than 0 or larger than 100.\n" + }, + "kind": 12, + "label": "Int.toFixed", + "tags": [] + } +] Complete src/CompletionJsx.res 26:14 posCursor:[26:14] posNoWhite:[26:13] Found expr:[8:13->33:3] @@ -364,159 +599,304 @@ ContextPath int-> <> ContextPath int Path Stdlib.Int. Path -[{ - "label": "React.int", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "Turns `int` into a JSX element so it can be used inside of JSX."}, - "sortText": "A", - "insertTextFormat": 2 - }, { - "label": "Int.equal", + "documentation": { + "kind": "markdown", + "value": "Turns `int` into a JSX element so it can be used inside of JSX." + }, + "insertTextFormat": 2, "kind": 12, - "tags": [], + "label": "React.int", + "sortText": "A", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, int) => bool", - "documentation": null - }, { - "label": "Int.toStringWithRadix", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [1], + "label": "Int.equal", + "tags": [] + }, + { + "data": null, + "deprecated": true, "detail": "(int, ~radix: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toString` instead\n\n\n`toStringWithRadix(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toStringWithRadix(6, ~radix=2) // \"110\"\nInt.toStringWithRadix(373592855, ~radix=16) // \"16449317\"\nInt.toStringWithRadix(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n"} - }, { - "label": "Int.toExponentialWithPrecision", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toString` instead\n\n\n`toStringWithRadix(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toStringWithRadix(6, ~radix=2) // \"110\"\nInt.toStringWithRadix(373592855, ~radix=16) // \"16449317\"\nInt.toStringWithRadix(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n" + }, "kind": 12, - "tags": [1], + "label": "Int.toStringWithRadix", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": true, "detail": "(int, ~digits: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toExponential` instead\n\n\n`toExponential(n, ~digits)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point. See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\non MDN.\n\n## Examples\n\n```rescript\nInt.toExponentialWithPrecision(77, ~digits=2) // \"7.70e+1\"\nInt.toExponentialWithPrecision(5678, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10.\n"} - }, { - "label": "Int.bitwiseXor", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toExponential` instead\n\n\n`toExponential(n, ~digits)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point. See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\non MDN.\n\n## Examples\n\n```rescript\nInt.toExponentialWithPrecision(77, ~digits=2) // \"7.70e+1\"\nInt.toExponentialWithPrecision(5678, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toExponentialWithPrecision", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": false, "detail": "(int, int) => int", - "documentation": {"kind": "markdown", "value": "\n`bigwiseXor(n1, n2)` calculates the bitwise XOR of two integers.\n\n## Examples\n\n```rescript\nInt.bitwiseXor(7, 4) == 3\n```\n"} - }, { - "label": "Int.clamp", + "documentation": { + "kind": "markdown", + "value": "\n`bigwiseXor(n1, n2)` calculates the bitwise XOR of two integers.\n\n## Examples\n\n```rescript\nInt.bitwiseXor(7, 4) == 3\n```\n" + }, "kind": 12, - "tags": [], + "label": "Int.bitwiseXor", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(~min: int=?, ~max: int=?, int) => int", - "documentation": {"kind": "markdown", "value": "\n`clamp(~min=?, ~max=?, value)` returns `value`, optionally bounded by `min` and `max`.\n\nif `max` \\< `min` returns `min`.\n\n## Examples\n\n```rescript\nInt.clamp(42) == 42\nInt.clamp(42, ~min=50) == 50\nInt.clamp(42, ~max=40) == 40\nInt.clamp(42, ~min=50, ~max=40) == 50\n```\n"} - }, { - "label": "Int.toFixedWithPrecision", + "documentation": { + "kind": "markdown", + "value": "\n`clamp(~min=?, ~max=?, value)` returns `value`, optionally bounded by `min` and `max`.\n\nif `max` \\< `min` returns `min`.\n\n## Examples\n\n```rescript\nInt.clamp(42) == 42\nInt.clamp(42, ~min=50) == 50\nInt.clamp(42, ~max=40) == 40\nInt.clamp(42, ~min=50, ~max=40) == 50\n```\n" + }, "kind": 12, - "tags": [1], + "label": "Int.clamp", + "tags": [] + }, + { + "data": null, + "deprecated": true, "detail": "(int, ~digits: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toFixed` instead\n\n\n`toFixedWithPrecision(n, ~digits)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point. See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)\non MDN.\n\n## Examples\n\n```rescript\nInt.toFixedWithPrecision(300, ~digits=4) // \"300.0000\"\nInt.toFixedWithPrecision(300, ~digits=1) // \"300.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is less than 0 or larger than 100.\n"} - }, { - "label": "Int.toPrecisionWithPrecision", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toFixed` instead\n\n\n`toFixedWithPrecision(n, ~digits)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point. See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)\non MDN.\n\n## Examples\n\n```rescript\nInt.toFixedWithPrecision(300, ~digits=4) // \"300.0000\"\nInt.toFixedWithPrecision(300, ~digits=1) // \"300.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is less than 0 or larger than 100.\n" + }, "kind": 12, - "tags": [1], + "label": "Int.toFixedWithPrecision", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": true, "detail": "(int, ~digits: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toPrecision` instead\n\n\n`toPrecisionWithPrecision(n, ~digits)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits. See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nInt.toPrecisionWithPrecision(100, ~digits=2) // \"1.0e+2\"\nInt.toPrecisionWithPrecision(1, ~digits=2) // \"1.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\n Implementations are allowed to support larger and smaller values as well.\n ECMA-262 only requires a precision of up to 21 significant digits.\n"} - }, { - "label": "Int.bitwiseAnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toPrecision` instead\n\n\n`toPrecisionWithPrecision(n, ~digits)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits. See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nInt.toPrecisionWithPrecision(100, ~digits=2) // \"1.0e+2\"\nInt.toPrecisionWithPrecision(1, ~digits=2) // \"1.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\n Implementations are allowed to support larger and smaller values as well.\n ECMA-262 only requires a precision of up to 21 significant digits.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toPrecisionWithPrecision", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": false, "detail": "(int, int) => int", - "documentation": {"kind": "markdown", "value": "\n`bitwiseAnd(n1, n2)` calculates the bitwise AND of two integers.\n\n## Examples\n\n```rescript\nInt.bitwiseAnd(7, 4) == 4\n```\n"} - }, { - "label": "Int.shiftRight", + "documentation": { + "kind": "markdown", + "value": "\n`bitwiseAnd(n1, n2)` calculates the bitwise AND of two integers.\n\n## Examples\n\n```rescript\nInt.bitwiseAnd(7, 4) == 4\n```\n" + }, "kind": 12, - "tags": [], + "label": "Int.bitwiseAnd", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, int) => int", - "documentation": {"kind": "markdown", "value": "\n`shiftRight(n, length)` calculates the shifted value of an integer `n` by `length` bits to the right.\n\nAlso known as \"arithmetic right shift\" operation.\n\n## Examples\n\n```rescript\nInt.shiftRight(8, 1) == 4\n```\n"} - }, { - "label": "Int.compare", + "documentation": { + "kind": "markdown", + "value": "\n`shiftRight(n, length)` calculates the shifted value of an integer `n` by `length` bits to the right.\n\nAlso known as \"arithmetic right shift\" operation.\n\n## Examples\n\n```rescript\nInt.shiftRight(8, 1) == 4\n```\n" + }, "kind": 12, - "tags": [], + "label": "Int.shiftRight", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, int) => Ordering.t", - "documentation": null - }, { - "label": "Int.ignore", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "Int.compare", + "tags": [] + }, + { + "data": null, + "deprecated": false, "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 an operation with side effects)\n without having to store or process it further.\n"} - }, { - "label": "Int.bitwiseOr", + "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" + }, "kind": 12, - "tags": [], + "label": "Int.ignore", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, int) => int", - "documentation": {"kind": "markdown", "value": "\n`bitwiseOr(n1, n2)` calculates the bitwise OR of two integers.\n\n## Examples\n\n```rescript\nInt.bitwiseOr(7, 4) == 7\n```\n"} - }, { - "label": "Int.toPrecision", + "documentation": { + "kind": "markdown", + "value": "\n`bitwiseOr(n1, n2)` calculates the bitwise OR of two integers.\n\n## Examples\n\n```rescript\nInt.bitwiseOr(7, 4) == 7\n```\n" + }, "kind": 12, - "tags": [], + "label": "Int.bitwiseOr", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~digits: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toPrecision(n, ~digits=?)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits. See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nInt.toPrecision(100) // \"100\"\nInt.toPrecision(1) // \"1\"\nInt.toPrecision(100, ~digits=2) // \"1.0e+2\"\nInt.toPrecision(1, ~digits=2) // \"1.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\n Implementations are allowed to support larger and smaller values as well.\n ECMA-262 only requires a precision of up to 21 significant digits.\n"} - }, { - "label": "Int.range", + "documentation": { + "kind": "markdown", + "value": "\n`toPrecision(n, ~digits=?)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits. See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nInt.toPrecision(100) // \"100\"\nInt.toPrecision(1) // \"1\"\nInt.toPrecision(100, ~digits=2) // \"1.0e+2\"\nInt.toPrecision(1, ~digits=2) // \"1.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\n Implementations are allowed to support larger and smaller values as well.\n ECMA-262 only requires a precision of up to 21 significant digits.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toPrecision", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, int, ~options: rangeOptions=?) => array", - "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"} - }, { - "label": "Int.toString", + "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" + }, "kind": 12, - "tags": [], + "label": "Int.range", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~radix: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toString(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toString(1000) // \"1000\"\nInt.toString(-1000) // \"-1000\"\nInt.toString(6, ~radix=2) // \"110\"\nInt.toString(373592855, ~radix=16) // \"16449317\"\nInt.toString(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n"} - }, { - "label": "Int.shiftLeft", + "documentation": { + "kind": "markdown", + "value": "\n`toString(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toString(1000) // \"1000\"\nInt.toString(-1000) // \"-1000\"\nInt.toString(6, ~radix=2) // \"110\"\nInt.toString(373592855, ~radix=16) // \"16449317\"\nInt.toString(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toString", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, int) => int", - "documentation": {"kind": "markdown", "value": "\n`shiftLeft(n, length)` calculates the shifted value of an integer `n` by `length` bits to the left.\n\n## Examples\n\n```rescript\nInt.shiftLeft(4, 1) == 8\n```\n"} - }, { - "label": "Int.toFloat", + "documentation": { + "kind": "markdown", + "value": "\n`shiftLeft(n, length)` calculates the shifted value of an integer `n` by `length` bits to the left.\n\n## Examples\n\n```rescript\nInt.shiftLeft(4, 1) == 8\n```\n" + }, "kind": 12, - "tags": [], + "label": "Int.shiftLeft", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int => float", - "documentation": {"kind": "markdown", "value": "\n`toFloat(n)` return a `float` representing the given value.\n\n## Examples\n\n```rescript\nInt.toFloat(100) == 100.0\nInt.toFloat(2) == 2.0\n```\n"} - }, { - "label": "Int.mod", + "documentation": { + "kind": "markdown", + "value": "\n`toFloat(n)` return a `float` representing the given value.\n\n## Examples\n\n```rescript\nInt.toFloat(100) == 100.0\nInt.toFloat(2) == 2.0\n```\n" + }, "kind": 12, - "tags": [], + "label": "Int.toFloat", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, int) => int", - "documentation": {"kind": "markdown", "value": "\n`mod(n1, n2)` calculates the modulo (remainder after division) of two integers.\n\n## Examples\n\n```rescript\nInt.mod(7, 4) == 3\n```\n"} - }, { - "label": "Int.rangeWithOptions", + "documentation": { + "kind": "markdown", + "value": "\n`mod(n1, n2)` calculates the modulo (remainder after division) of two integers.\n\n## Examples\n\n```rescript\nInt.mod(7, 4) == 3\n```\n" + }, "kind": 12, - "tags": [1], + "label": "Int.mod", + "tags": [] + }, + { + "data": null, + "deprecated": true, "detail": "(int, int, rangeOptions) => array", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `range` instead\n\n\n`rangeWithOptions(start, end, options)` is like `range`, but with `step` and\n`inclusive` options configurable.\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.rangeWithOptions(3, 7, {step: 2}) == [3, 5]\nInt.rangeWithOptions(3, 7, {step: 2, inclusive: true}) == [3, 5, 7]\nInt.rangeWithOptions(3, 6, {step: -2}) // RangeError\n```\n\n## Exceptions\n\n- Raises `RangeError` if `step == 0 && start != end`.\n"} - }, { - "label": "Int.shiftRightUnsigned", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `range` instead\n\n\n`rangeWithOptions(start, end, options)` is like `range`, but with `step` and\n`inclusive` options configurable.\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.rangeWithOptions(3, 7, {step: 2}) == [3, 5]\nInt.rangeWithOptions(3, 7, {step: 2, inclusive: true}) == [3, 5, 7]\nInt.rangeWithOptions(3, 6, {step: -2}) // RangeError\n```\n\n## Exceptions\n\n- Raises `RangeError` if `step == 0 && start != end`.\n" + }, "kind": 12, - "tags": [], + "label": "Int.rangeWithOptions", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": false, "detail": "(int, int) => int", - "documentation": {"kind": "markdown", "value": "\n`shiftRightUnsigned(n, length)` calculates the shifted value of an integer `n` by `length` bits to the right.\nExcess bits shifted off to the right are discarded, and zero bits are shifted in from the left.\n\nAlso known as \"zero-filling right shift\" operation.\n\n## Examples\n\n```rescript\nInt.shiftRightUnsigned(4, 1) == 2\n```\n"} - }, { - "label": "Int.toLocaleString", + "documentation": { + "kind": "markdown", + "value": "\n`shiftRightUnsigned(n, length)` calculates the shifted value of an integer `n` by `length` bits to the right.\nExcess bits shifted off to the right are discarded, and zero bits are shifted in from the left.\n\nAlso known as \"zero-filling right shift\" operation.\n\n## Examples\n\n```rescript\nInt.shiftRightUnsigned(4, 1) == 2\n```\n" + }, "kind": 12, - "tags": [], + "label": "Int.shiftRightUnsigned", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int => string", - "documentation": {"kind": "markdown", "value": "\n`toLocaleString(n)` return a `string` with language-sensitive representing the\ngiven value. See [`Number.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString) on MDN.\n\n## Examples\n\n```rescript\n// If the application uses English as the default language\nInt.toLocaleString(1000) // \"1,000\"\n\n// If the application uses Portuguese Brazil as the default language\nInt.toLocaleString(1000) // \"1.000\"\n```\n"} - }, { - "label": "Int.bitwiseNot", + "documentation": { + "kind": "markdown", + "value": "\n`toLocaleString(n)` return a `string` with language-sensitive representing the\ngiven value. See [`Number.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString) on MDN.\n\n## Examples\n\n```rescript\n// If the application uses English as the default language\nInt.toLocaleString(1000) // \"1,000\"\n\n// If the application uses Portuguese Brazil as the default language\nInt.toLocaleString(1000) // \"1.000\"\n```\n" + }, "kind": 12, - "tags": [], + "label": "Int.toLocaleString", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int => int", - "documentation": {"kind": "markdown", "value": "\n`bitwiseNot(n)` calculates the bitwise NOT of an integer.\n\n## Examples\n\n```rescript\nInt.bitwiseNot(2) == -3\n```\n"} - }, { - "label": "Int.toExponential", + "documentation": { + "kind": "markdown", + "value": "\n`bitwiseNot(n)` calculates the bitwise NOT of an integer.\n\n## Examples\n\n```rescript\nInt.bitwiseNot(2) == -3\n```\n" + }, "kind": 12, - "tags": [], + "label": "Int.bitwiseNot", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~digits: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toExponential(n, ~digits=?)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point. See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\n\n## Examples\n\n```rescript\nInt.toExponential(1000) // \"1e+3\"\nInt.toExponential(-1000) // \"-1e+3\"\nInt.toExponential(77, ~digits=2) // \"7.70e+1\"\nInt.toExponential(5678, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10.\n"} - }, { - "label": "Int.toFixed", + "documentation": { + "kind": "markdown", + "value": "\n`toExponential(n, ~digits=?)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point. See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\n\n## Examples\n\n```rescript\nInt.toExponential(1000) // \"1e+3\"\nInt.toExponential(-1000) // \"-1e+3\"\nInt.toExponential(77, ~digits=2) // \"7.70e+1\"\nInt.toExponential(5678, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toExponential", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~digits: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toFixed(n, ~digits=?)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point. See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)\non MDN.\n\n## Examples\n\n```rescript\nInt.toFixed(123456) // \"123456.00\"\nInt.toFixed(10) // \"10.00\"\nInt.toFixed(300, ~digits=4) // \"300.0000\"\nInt.toFixed(300, ~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(n, ~digits=?)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point. See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)\non MDN.\n\n## Examples\n\n```rescript\nInt.toFixed(123456) // \"123456.00\"\nInt.toFixed(10) // \"10.00\"\nInt.toFixed(300, ~digits=4) // \"300.0000\"\nInt.toFixed(300, ~digits=1) // \"300.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is less than 0 or larger than 100.\n" + }, + "kind": 12, + "label": "Int.toFixed", + "tags": [] + } +] Complete src/CompletionJsx.res 28:20 posCursor:[28:20] posNoWhite:[28:19] Found expr:[8:13->33:3] @@ -536,27 +916,46 @@ Path someArr Path Stdlib.Array.a Path ArrayUtils.a Path a -[{ - "label": "React.array", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "array", - "documentation": {"kind": "markdown", "value": "Turns `array` into a JSX element so it can be used inside of JSX."}, - "sortText": "A", - "insertTextFormat": 2 - }, { - "label": "Array.at", + "documentation": { + "kind": "markdown", + "value": "Turns `array` into a JSX element so it can be used inside of JSX." + }, + "insertTextFormat": 2, "kind": 12, - "tags": [], + "label": "React.array", + "sortText": "A", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, int) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`at(array, index)`\n\nGet an element by its index. Negative indices count backwards from the last item.\n\n## Examples\n\n```rescript\n[\"a\", \"b\", \"c\"]->Array.at(0) == Some(\"a\")\n[\"a\", \"b\", \"c\"]->Array.at(2) == Some(\"c\")\n[\"a\", \"b\", \"c\"]->Array.at(3) == None\n[\"a\", \"b\", \"c\"]->Array.at(-1) == Some(\"c\")\n[\"a\", \"b\", \"c\"]->Array.at(-3) == Some(\"a\")\n[\"a\", \"b\", \"c\"]->Array.at(-4) == None\n```\n"} - }, { - "label": "Array.asIterable", + "documentation": { + "kind": "markdown", + "value": "\n`at(array, index)`\n\nGet an element by its index. Negative indices count backwards from the last item.\n\n## Examples\n\n```rescript\n[\"a\", \"b\", \"c\"]->Array.at(0) == Some(\"a\")\n[\"a\", \"b\", \"c\"]->Array.at(2) == Some(\"c\")\n[\"a\", \"b\", \"c\"]->Array.at(3) == None\n[\"a\", \"b\", \"c\"]->Array.at(-1) == Some(\"c\")\n[\"a\", \"b\", \"c\"]->Array.at(-3) == Some(\"a\")\n[\"a\", \"b\", \"c\"]->Array.at(-4) == None\n```\n" + }, "kind": 12, - "tags": [], + "label": "Array.at", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "array<'a> => Iterable.t<'a>", - "documentation": {"kind": "markdown", "value": "\n`asIterable(array)` views `array` as an `Iterable.t`.\n\nThis is useful when passing an array to APIs that consume iterables, such as\n`Array.from` or `for...of` in JavaScript.\n"} - }] + "documentation": { + "kind": "markdown", + "value": "\n`asIterable(array)` views `array` as an `Iterable.t`.\n\nThis is useful when passing an array to APIs that consume iterables, such as\n`Array.from` or `for...of` in JavaScript.\n" + }, + "kind": 12, + "label": "Array.asIterable", + "tags": [] + } +] Complete src/CompletionJsx.res 30:12 posCursor:[30:12] posNoWhite:[30:11] Found expr:[8:13->33:3] @@ -571,28 +970,47 @@ JSX 30:12] > _children:None Completable: ChtmlElement ", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "Defines a dialog box or subwindow.", - "documentation": {"kind": "markdown", "value": "Defines a dialog box or subwindow."}, - "insertText": "dialog" - }, { - "label": "", + "documentation": { + "kind": "markdown", + "value": "Defines a dialog box or subwindow." + }, + "insertText": "dialog", "kind": 4, - "tags": [1], + "label": "", + "tags": [] + }, + { + "data": null, + "deprecated": true, "detail": "Defines a directory list. Use
    instead.", - "documentation": {"kind": "markdown", "value": "Deprecated: true\n\nDefines a directory list. Use
      instead."}, - "insertText": "dir" - }, { - "label": "
      ", + "documentation": { + "kind": "markdown", + "value": "Deprecated: true\n\nDefines a directory list. Use
        instead." + }, + "insertText": "dir", "kind": 4, - "tags": [], + "label": "", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": false, "detail": "Specifies a division or a section in a document.", - "documentation": {"kind": "markdown", "value": "Specifies a division or a section in a document."}, - "insertText": "div" - }] + "documentation": { + "kind": "markdown", + "value": "Specifies a division or a section in a document." + }, + "insertText": "div", + "kind": 4, + "label": "
        ", + "tags": [] + } +] Complete src/CompletionJsx.res 45:23 posCursor:[45:23] posNoWhite:[45:22] Found expr:[45:3->45:23] @@ -601,13 +1019,17 @@ Completable: Cjsx([CompWithoutJsxPpx], n, [n]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path CompWithoutJsxPpx.make -[{ - "label": "name", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "name", + "tags": [] + } +] Complete src/CompletionJsx.res 48:27 posCursor:[48:27] posNoWhite:[48:26] Found expr:[48:3->48:28] @@ -617,16 +1039,20 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath CJsxPropValue [SomeComponent] someProp Path SomeComponent.make -[{ - "label": "\"\"", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null, - "sortText": "A", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "{\"$0\"}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "\"\"", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionJsx.res 51:11 posCursor:[51:11] posNoWhite:[51:10] Found expr:[51:3->51:11] @@ -636,13 +1062,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path ReactDOM.domProps Path JsxDOM.domProps -[{ - "label": "hidden", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "hidden", + "tags": [] + } +] Complete src/CompletionJsx.res 61:30 posCursor:[61:30] posNoWhite:[61:28] Found expr:[61:3->61:29] @@ -651,25 +1081,35 @@ Completable: Cjsx([IntrinsicElementLowercase], "", []) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path IntrinsicElementLowercase.make -[{ - "label": "name", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "option", - "documentation": null - }, { - "label": "age", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "name", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "option", - "documentation": null - }, { - "label": "key", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "age", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "key", + "tags": [] + } +] Complete src/CompletionJsx.res 73:36 posCursor:[73:36] posNoWhite:[73:35] Found expr:[73:3->73:41] @@ -679,23 +1119,36 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath CJsxPropValue [MultiPropComp] time Path MultiPropComp.make -[{ - "label": "Now", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "Now", - "documentation": {"kind": "markdown", "value": "```rescript\nNow\n```\n\n```rescript\ntype time = Now | Later\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nNow\n```\n\n```rescript\ntype time = Now | Later\n```" + }, "insertText": "{Now}", - "insertTextFormat": 2 - }, { - "label": "Later", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "Now", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Later", - "documentation": {"kind": "markdown", "value": "```rescript\nLater\n```\n\n```rescript\ntype time = Now | Later\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nLater\n```\n\n```rescript\ntype time = Now | Later\n```" + }, "insertText": "{Later}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "Later", + "tags": [] + } +] Complete src/CompletionJsx.res 76:36 posCursor:[76:36] posNoWhite:[76:35] Found expr:[76:3->76:40] @@ -705,23 +1158,36 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath CJsxPropValue [MultiPropComp] time Path MultiPropComp.make -[{ - "label": "Now", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "Now", - "documentation": {"kind": "markdown", "value": "```rescript\nNow\n```\n\n```rescript\ntype time = Now | Later\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nNow\n```\n\n```rescript\ntype time = Now | Later\n```" + }, "insertText": "{Now}", - "insertTextFormat": 2 - }, { - "label": "Later", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "Now", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Later", - "documentation": {"kind": "markdown", "value": "```rescript\nLater\n```\n\n```rescript\ntype time = Now | Later\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nLater\n```\n\n```rescript\ntype time = Now | Later\n```" + }, "insertText": "{Later}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "Later", + "tags": [] + } +] Complete src/CompletionJsx.res 79:28 posCursor:[79:28] posNoWhite:[79:27] Found expr:[79:3->79:32] @@ -731,23 +1197,36 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath CJsxPropValue [MultiPropComp] time Path MultiPropComp.make -[{ - "label": "Now", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "Now", - "documentation": {"kind": "markdown", "value": "```rescript\nNow\n```\n\n```rescript\ntype time = Now | Later\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nNow\n```\n\n```rescript\ntype time = Now | Later\n```" + }, "insertText": "{Now}", - "insertTextFormat": 2 - }, { - "label": "Later", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "Now", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Later", - "documentation": {"kind": "markdown", "value": "```rescript\nLater\n```\n\n```rescript\ntype time = Now | Later\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nLater\n```\n\n```rescript\ntype time = Now | Later\n```" + }, "insertText": "{Later}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "Later", + "tags": [] + } +] Complete src/CompletionJsx.res 89:26 posCursor:[89:26] posNoWhite:[89:24] Found expr:[89:3->89:27] @@ -756,13 +1235,17 @@ Completable: Cjsx([Info], "", [_type]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path Info.make -[{ - "label": "key", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "key", + "tags": [] + } +] Complete src/CompletionJsx.res 93:19 posCursor:[93:19] posNoWhite:[93:18] Found expr:[93:11->93:24] @@ -778,162 +1261,306 @@ ContextPath string->s <> ContextPath string Path Stdlib.String.s Path s -[{ - "label": "->React.string", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 93 }, + "start": { "character": 17, "line": 93 } + } + } + ], + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "Turns `string` into a JSX element so it can be used inside of JSX."}, - "sortText": "A", + "documentation": { + "kind": "markdown", + "value": "Turns `string` into a JSX element so it can be used inside of JSX." + }, "insertText": "->React.string", "insertTextFormat": 2, - "additionalTextEdits": [{ - "range": {"start": {"line": 93, "character": 17}, "end": {"line": 93, "character": 18}}, - "newText": "" - }] - }, { - "label": "->String.searchOpt", "kind": 12, - "tags": [], + "label": "->React.string", + "sortText": "A", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 93 }, + "start": { "character": 17, "line": 93 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(string, RegExp.t) => option", - "documentation": {"kind": "markdown", "value": "\n`searchOpt(str, regexp)`. Like `search`, but return an `option`.\n\n## Examples\n\n```rescript\nString.searchOpt(\"testing 1 2 3\", /\\d+/) == Some(8)\nString.searchOpt(\"no numbers\", /\\d+/) == None\n```\n"}, - "sortText": "searchOpt", + "documentation": { + "kind": "markdown", + "value": "\n`searchOpt(str, regexp)`. Like `search`, but return an `option`.\n\n## Examples\n\n```rescript\nString.searchOpt(\"testing 1 2 3\", /\\d+/) == Some(8)\nString.searchOpt(\"no numbers\", /\\d+/) == None\n```\n" + }, "insertText": "->String.searchOpt", - "additionalTextEdits": [{ - "range": {"start": {"line": 93, "character": 17}, "end": {"line": 93, "character": 18}}, - "newText": "" - }] - }, { - "label": "->String.splitByRegExpAtMost", "kind": 12, - "tags": [], + "label": "->String.searchOpt", + "sortText": "searchOpt", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 93 }, + "start": { "character": 17, "line": 93 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(string, RegExp.t, ~limit: int) => array>", - "documentation": {"kind": "markdown", "value": "\n`splitByRegExpAtMost(str, regexp, ~limit)` splits the given `str` at every\noccurrence of `regexp` and returns an array of the first `limit` resulting\nsubstrings. If `limit` is negative or greater than the number of substrings, the\narray will contain all the substrings.\nSee [`String.split`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split) on MDN.\n\n## Examples\n\n```rescript\nString.splitByRegExpAtMost(\"Hello World. How are you doing?\", / /, ~limit=3) == [\n Some(\"Hello\"),\n Some(\"World.\"),\n Some(\"How\"),\n ]\n```\n"}, - "sortText": "splitByRegExpAtMost", + "documentation": { + "kind": "markdown", + "value": "\n`splitByRegExpAtMost(str, regexp, ~limit)` splits the given `str` at every\noccurrence of `regexp` and returns an array of the first `limit` resulting\nsubstrings. If `limit` is negative or greater than the number of substrings, the\narray will contain all the substrings.\nSee [`String.split`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split) on MDN.\n\n## Examples\n\n```rescript\nString.splitByRegExpAtMost(\"Hello World. How are you doing?\", / /, ~limit=3) == [\n Some(\"Hello\"),\n Some(\"World.\"),\n Some(\"How\"),\n ]\n```\n" + }, "insertText": "->String.splitByRegExpAtMost", - "additionalTextEdits": [{ - "range": {"start": {"line": 93, "character": 17}, "end": {"line": 93, "character": 18}}, - "newText": "" - }] - }, { - "label": "->String.slice", "kind": 12, - "tags": [], + "label": "->String.splitByRegExpAtMost", + "sortText": "splitByRegExpAtMost", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 93 }, + "start": { "character": 17, "line": 93 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(string, ~start: int, ~end: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`slice(str, ~start, ~end)` returns the substring of `str` starting at\ncharacter `start` up to but not including `end`.\n- If either `start` or `end` is negative, then it is evaluated as\n `length(str - start)` or `length(str - end)`.\n- If `end` is greater than the length of `str`, then it is treated as\n `length(str)`.\n- If `start` is greater than `end`, slice returns the empty string.\n See [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n## Examples\n\n```rescript\nString.slice(\"abcdefg\", ~start=2, ~end=5) == \"cde\"\nString.slice(\"abcdefg\", ~start=2, ~end=9) == \"cdefg\"\nString.slice(\"abcdefg\", ~start=-4, ~end=-2) == \"de\"\nString.slice(\"abcdefg\", ~start=5, ~end=1) == \"\"\nString.slice(\"abcdefg\", ~start=2) == \"cdefg\"\nString.slice(\"Hello World\", ~start=6) == \"World\"\n```\n"}, - "sortText": "slice", + "documentation": { + "kind": "markdown", + "value": "\n`slice(str, ~start, ~end)` returns the substring of `str` starting at\ncharacter `start` up to but not including `end`.\n- If either `start` or `end` is negative, then it is evaluated as\n `length(str - start)` or `length(str - end)`.\n- If `end` is greater than the length of `str`, then it is treated as\n `length(str)`.\n- If `start` is greater than `end`, slice returns the empty string.\n See [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n## Examples\n\n```rescript\nString.slice(\"abcdefg\", ~start=2, ~end=5) == \"cde\"\nString.slice(\"abcdefg\", ~start=2, ~end=9) == \"cdefg\"\nString.slice(\"abcdefg\", ~start=-4, ~end=-2) == \"de\"\nString.slice(\"abcdefg\", ~start=5, ~end=1) == \"\"\nString.slice(\"abcdefg\", ~start=2) == \"cdefg\"\nString.slice(\"Hello World\", ~start=6) == \"World\"\n```\n" + }, "insertText": "->String.slice", - "additionalTextEdits": [{ - "range": {"start": {"line": 93, "character": 17}, "end": {"line": 93, "character": 18}}, - "newText": "" - }] - }, { - "label": "->String.substringToEnd", "kind": 12, - "tags": [1], + "label": "->String.slice", + "sortText": "slice", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 93 }, + "start": { "character": 17, "line": 93 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(string, ~start: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `substring` instead\n\n\n`substringToEnd(str, ~start)` returns the substring of `str` from position\n`start` to the end.\n- If `start` is less than or equal to zero, the entire string is returned.\n- If `start` is greater than or equal to the length of `str`, the empty string\n is returned.\n See [`String.substring`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring) on MDN.\n\n## Examples\n\n```rescript\nString.substringToEnd(\"playground\", ~start=4) == \"ground\"\nString.substringToEnd(\"playground\", ~start=-3) == \"playground\"\nString.substringToEnd(\"playground\", ~start=12) == \"\"\n```\n"}, - "sortText": "substringToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `substring` instead\n\n\n`substringToEnd(str, ~start)` returns the substring of `str` from position\n`start` to the end.\n- If `start` is less than or equal to zero, the entire string is returned.\n- If `start` is greater than or equal to the length of `str`, the empty string\n is returned.\n See [`String.substring`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring) on MDN.\n\n## Examples\n\n```rescript\nString.substringToEnd(\"playground\", ~start=4) == \"ground\"\nString.substringToEnd(\"playground\", ~start=-3) == \"playground\"\nString.substringToEnd(\"playground\", ~start=12) == \"\"\n```\n" + }, "insertText": "->String.substringToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 93, "character": 17}, "end": {"line": 93, "character": 18}}, - "newText": "" - }] - }, { - "label": "->String.startsWith", "kind": 12, - "tags": [], + "label": "->String.substringToEnd", + "sortText": "substringToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 93 }, + "start": { "character": 17, "line": 93 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(string, string) => bool", - "documentation": {"kind": "markdown", "value": "\n`startsWith(str, substr)` returns `true` if the `str` starts with `substr`,\n`false` otherwise.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWith(\"BuckleScript\", \"Buckle\") == true\nString.startsWith(\"BuckleScript\", \"\") == true\nString.startsWith(\"JavaScript\", \"Buckle\") == false\n```\n"}, - "sortText": "startsWith", + "documentation": { + "kind": "markdown", + "value": "\n`startsWith(str, substr)` returns `true` if the `str` starts with `substr`,\n`false` otherwise.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWith(\"BuckleScript\", \"Buckle\") == true\nString.startsWith(\"BuckleScript\", \"\") == true\nString.startsWith(\"JavaScript\", \"Buckle\") == false\n```\n" + }, "insertText": "->String.startsWith", - "additionalTextEdits": [{ - "range": {"start": {"line": 93, "character": 17}, "end": {"line": 93, "character": 18}}, - "newText": "" - }] - }, { - "label": "->String.splitAtMost", "kind": 12, - "tags": [], + "label": "->String.startsWith", + "sortText": "startsWith", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 93 }, + "start": { "character": 17, "line": 93 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(string, string, ~limit: int) => array", - "documentation": {"kind": "markdown", "value": "\n`splitAtMost(str, delimiter, ~limit)` splits the given `str` at every\noccurrence of `delimiter` and returns an array of the first `limit` resulting\nsubstrings. If `limit` is negative or greater than the number of substrings,\nthe array will contain all the substrings.\n\n## Examples\n\n```rescript\nString.splitAtMost(\"ant/bee/cat/dog/elk\", \"/\", ~limit=3) == [\"ant\", \"bee\", \"cat\"]\nString.splitAtMost(\"ant/bee/cat/dog/elk\", \"/\", ~limit=0) == []\nString.splitAtMost(\"ant/bee/cat/dog/elk\", \"/\", ~limit=9) == [\"ant\", \"bee\", \"cat\", \"dog\", \"elk\"]\n```\n"}, - "sortText": "splitAtMost", + "documentation": { + "kind": "markdown", + "value": "\n`splitAtMost(str, delimiter, ~limit)` splits the given `str` at every\noccurrence of `delimiter` and returns an array of the first `limit` resulting\nsubstrings. If `limit` is negative or greater than the number of substrings,\nthe array will contain all the substrings.\n\n## Examples\n\n```rescript\nString.splitAtMost(\"ant/bee/cat/dog/elk\", \"/\", ~limit=3) == [\"ant\", \"bee\", \"cat\"]\nString.splitAtMost(\"ant/bee/cat/dog/elk\", \"/\", ~limit=0) == []\nString.splitAtMost(\"ant/bee/cat/dog/elk\", \"/\", ~limit=9) == [\"ant\", \"bee\", \"cat\", \"dog\", \"elk\"]\n```\n" + }, "insertText": "->String.splitAtMost", - "additionalTextEdits": [{ - "range": {"start": {"line": 93, "character": 17}, "end": {"line": 93, "character": 18}}, - "newText": "" - }] - }, { - "label": "->String.sliceToEnd", "kind": 12, - "tags": [1], + "label": "->String.splitAtMost", + "sortText": "splitAtMost", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 93 }, + "start": { "character": 17, "line": 93 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(string, ~start: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(str, ~start)` returns the substring of `str` starting at character\n`start` to the end of the string.\n- If `start` is negative, then it is evaluated as `length(str - start)`.\n- If `start` is greater than the length of `str`, then sliceToEnd returns the empty string.\n See [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n## Examples\n\n```rescript\nString.sliceToEnd(\"abcdefg\", ~start=4) == \"efg\"\nString.sliceToEnd(\"abcdefg\", ~start=-2) == \"fg\"\nString.sliceToEnd(\"abcdefg\", ~start=7) == \"\"\n```\n"}, - "sortText": "sliceToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(str, ~start)` returns the substring of `str` starting at character\n`start` to the end of the string.\n- If `start` is negative, then it is evaluated as `length(str - start)`.\n- If `start` is greater than the length of `str`, then sliceToEnd returns the empty string.\n See [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n## Examples\n\n```rescript\nString.sliceToEnd(\"abcdefg\", ~start=4) == \"efg\"\nString.sliceToEnd(\"abcdefg\", ~start=-2) == \"fg\"\nString.sliceToEnd(\"abcdefg\", ~start=7) == \"\"\n```\n" + }, "insertText": "->String.sliceToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 93, "character": 17}, "end": {"line": 93, "character": 18}}, - "newText": "" - }] - }, { - "label": "->String.splitByRegExp", "kind": 12, - "tags": [], + "label": "->String.sliceToEnd", + "sortText": "sliceToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 93 }, + "start": { "character": 17, "line": 93 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(string, RegExp.t) => array>", - "documentation": {"kind": "markdown", "value": "\n`splitByRegExp(str, regexp)` splits the given `str` at every occurrence of\n`regexp` and returns an array of the resulting substrings.\nSee [`String.split`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split) on MDN.\n\n## Examples\n\n```rescript\nString.splitByRegExp(\"Jan,Feb,Mar\", /,/) == [Some(\"Jan\"), Some(\"Feb\"), Some(\"Mar\")]\n```\n"}, - "sortText": "splitByRegExp", + "documentation": { + "kind": "markdown", + "value": "\n`splitByRegExp(str, regexp)` splits the given `str` at every occurrence of\n`regexp` and returns an array of the resulting substrings.\nSee [`String.split`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split) on MDN.\n\n## Examples\n\n```rescript\nString.splitByRegExp(\"Jan,Feb,Mar\", /,/) == [Some(\"Jan\"), Some(\"Feb\"), Some(\"Mar\")]\n```\n" + }, "insertText": "->String.splitByRegExp", - "additionalTextEdits": [{ - "range": {"start": {"line": 93, "character": 17}, "end": {"line": 93, "character": 18}}, - "newText": "" - }] - }, { - "label": "->String.startsWithFrom", "kind": 12, - "tags": [], + "label": "->String.splitByRegExp", + "sortText": "splitByRegExp", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 93 }, + "start": { "character": 17, "line": 93 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(string, string, int) => bool", - "documentation": {"kind": "markdown", "value": "\n`startsWithFrom(str, substr, n)` returns `true` if the `str` starts\nwith `substr` starting at position `n`, `false` otherwise. If `n` is negative,\nthe search starts at the beginning of `str`.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWithFrom(\"BuckleScript\", \"kle\", 3) == true\nString.startsWithFrom(\"BuckleScript\", \"\", 3) == true\nString.startsWithFrom(\"JavaScript\", \"Buckle\", 2) == false\n```\n"}, - "sortText": "startsWithFrom", + "documentation": { + "kind": "markdown", + "value": "\n`startsWithFrom(str, substr, n)` returns `true` if the `str` starts\nwith `substr` starting at position `n`, `false` otherwise. If `n` is negative,\nthe search starts at the beginning of `str`.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWithFrom(\"BuckleScript\", \"kle\", 3) == true\nString.startsWithFrom(\"BuckleScript\", \"\", 3) == true\nString.startsWithFrom(\"JavaScript\", \"Buckle\", 2) == false\n```\n" + }, "insertText": "->String.startsWithFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 93, "character": 17}, "end": {"line": 93, "character": 18}}, - "newText": "" - }] - }, { - "label": "->String.split", "kind": 12, - "tags": [], + "label": "->String.startsWithFrom", + "sortText": "startsWithFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 93 }, + "start": { "character": 17, "line": 93 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(string, string) => array", - "documentation": {"kind": "markdown", "value": "\n`split(str, delimiter)` splits the given `str` at every occurrence of\n`delimiter` and returns an array of the resulting substrings.\nSee [`String.split`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split) on MDN.\n\n## Examples\n\n```rescript\nString.split(\"2018-01-02\", \"-\") == [\"2018\", \"01\", \"02\"]\nString.split(\"a,b,,c\", \",\") == [\"a\", \"b\", \"\", \"c\"]\nString.split(\"good::bad as great::awful\", \"::\") == [\"good\", \"bad as great\", \"awful\"]\nString.split(\"has-no-delimiter\", \";\") == [\"has-no-delimiter\"]\n```\n"}, - "sortText": "split", + "documentation": { + "kind": "markdown", + "value": "\n`split(str, delimiter)` splits the given `str` at every occurrence of\n`delimiter` and returns an array of the resulting substrings.\nSee [`String.split`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split) on MDN.\n\n## Examples\n\n```rescript\nString.split(\"2018-01-02\", \"-\") == [\"2018\", \"01\", \"02\"]\nString.split(\"a,b,,c\", \",\") == [\"a\", \"b\", \"\", \"c\"]\nString.split(\"good::bad as great::awful\", \"::\") == [\"good\", \"bad as great\", \"awful\"]\nString.split(\"has-no-delimiter\", \";\") == [\"has-no-delimiter\"]\n```\n" + }, "insertText": "->String.split", - "additionalTextEdits": [{ - "range": {"start": {"line": 93, "character": 17}, "end": {"line": 93, "character": 18}}, - "newText": "" - }] - }, { - "label": "->String.substring", "kind": 12, - "tags": [], + "label": "->String.split", + "sortText": "split", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 93 }, + "start": { "character": 17, "line": 93 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(string, ~start: int, ~end: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`substring(str, ~start, ~end)` returns characters `start` up to but not\nincluding end from `str`.\n- If `start` is less than zero, it is treated as zero.\n- If `end` is zero or negative, the empty string is returned.\n- If `start` is greater than `end`, the `start` and `end` points are swapped.\n See [`String.substring`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring) on MDN.\n\n## Examples\n\n```rescript\nString.substring(\"playground\", ~start=3, ~end=6) == \"ygr\"\nString.substring(\"playground\", ~start=6, ~end=3) == \"ygr\"\nString.substring(\"playground\", ~start=4, ~end=12) == \"ground\"\nString.substring(\"playground\", ~start=4) == \"ground\"\nString.substring(\"Hello World\", ~start=6) == \"World\"\n```\n"}, - "sortText": "substring", + "documentation": { + "kind": "markdown", + "value": "\n`substring(str, ~start, ~end)` returns characters `start` up to but not\nincluding end from `str`.\n- If `start` is less than zero, it is treated as zero.\n- If `end` is zero or negative, the empty string is returned.\n- If `start` is greater than `end`, the `start` and `end` points are swapped.\n See [`String.substring`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring) on MDN.\n\n## Examples\n\n```rescript\nString.substring(\"playground\", ~start=3, ~end=6) == \"ygr\"\nString.substring(\"playground\", ~start=6, ~end=3) == \"ygr\"\nString.substring(\"playground\", ~start=4, ~end=12) == \"ground\"\nString.substring(\"playground\", ~start=4) == \"ground\"\nString.substring(\"Hello World\", ~start=6) == \"World\"\n```\n" + }, "insertText": "->String.substring", - "additionalTextEdits": [{ - "range": {"start": {"line": 93, "character": 17}, "end": {"line": 93, "character": 18}}, - "newText": "" - }] - }, { - "label": "->String.search", "kind": 12, - "tags": [], + "label": "->String.substring", + "sortText": "substring", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 93 }, + "start": { "character": 17, "line": 93 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(string, RegExp.t) => int", - "documentation": {"kind": "markdown", "value": "\n`search(str, regexp)` returns the starting position of the first match of\n`regexp` in the given `str`, or -1 if there is no match.\nSee [`String.search`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/search) on MDN.\n\n## Examples\n\n```rescript\nString.search(\"testing 1 2 3\", /\\d+/) == 8\nString.search(\"no numbers\", /\\d+/) == -1\n```\n"}, - "sortText": "search", + "documentation": { + "kind": "markdown", + "value": "\n`search(str, regexp)` returns the starting position of the first match of\n`regexp` in the given `str`, or -1 if there is no match.\nSee [`String.search`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/search) on MDN.\n\n## Examples\n\n```rescript\nString.search(\"testing 1 2 3\", /\\d+/) == 8\nString.search(\"no numbers\", /\\d+/) == -1\n```\n" + }, "insertText": "->String.search", - "additionalTextEdits": [{ - "range": {"start": {"line": 93, "character": 17}, "end": {"line": 93, "character": 18}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->String.search", + "sortText": "search", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/CompletionJsxProps.res.txt b/tests/analysis_tests/tests/src/expected/CompletionJsxProps.res.txt index af410bf97a7..56d2321419f 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionJsxProps.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionJsxProps.res.txt @@ -1,3 +1,4 @@ +null Complete src/CompletionJsxProps.res 0:47 posCursor:[0:47] posNoWhite:[0:46] Found expr:[0:11->0:47] JSX 0:43] on[0:44->0:46]=...__ghost__[0:-1->0:-1]> _children:None @@ -6,19 +7,26 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath CJsxPropValue [CompletionSupport, TestComponent] on Path CompletionSupport.TestComponent.make -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "false", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] Complete src/CompletionJsxProps.res 3:48 posCursor:[3:48] posNoWhite:[3:47] Found expr:[3:11->3:48] @@ -28,20 +36,30 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath CJsxPropValue [CompletionSupport, TestComponent] on Path CompletionSupport.TestComponent.make -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null, - "sortText": "A true" - }, { - "label": "typeof", - "kind": 12, - "tags": [], + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "true", + "sortText": "A true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "'a => Type.t", - "documentation": {"kind": "markdown", "value": "\n`typeof(value)` exposes JavaScript's `typeof` operator and returns a `Type.t` enum.\nIt helps you inspect values that come from JavaScript APIs.\n\n## Examples\n\n```rescript\ntypeof(1) == #number\ntypeof(\"a\") == #string\n```\n"} - }] + "documentation": { + "kind": "markdown", + "value": "\n`typeof(value)` exposes JavaScript's `typeof` operator and returns a `Type.t` enum.\nIt helps you inspect values that come from JavaScript APIs.\n\n## Examples\n\n```rescript\ntypeof(1) == #number\ntypeof(\"a\") == #string\n```\n" + }, + "kind": 12, + "label": "typeof", + "tags": [] + } +] Complete src/CompletionJsxProps.res 6:50 posCursor:[6:50] posNoWhite:[6:49] Found expr:[6:11->6:50] @@ -51,93 +69,125 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath CJsxPropValue [CompletionSupport, TestComponent] test Path CompletionSupport.TestComponent.make -[{ - "label": "Two", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "Two", - "documentation": {"kind": "markdown", "value": "```rescript\nTwo\n```\n\n```rescript\ntype testVariant = One | Two | Three(int)\n```"}, - "sortText": "A Two", + "documentation": { + "kind": "markdown", + "value": "```rescript\nTwo\n```\n\n```rescript\ntype testVariant = One | Two | Three(int)\n```" + }, "insertText": "{Two}", - "insertTextFormat": 2 - }, { - "label": "Three(_)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "Two", + "sortText": "A Two", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Three(int)", - "documentation": {"kind": "markdown", "value": "```rescript\nThree(int)\n```\n\n```rescript\ntype testVariant = One | Two | Three(int)\n```"}, - "sortText": "A Three(_)", + "documentation": { + "kind": "markdown", + "value": "```rescript\nThree(int)\n```\n\n```rescript\ntype testVariant = One | Two | Three(int)\n```" + }, "insertText": "{Three($0)}", - "insertTextFormat": 2 - }, { - "label": "TypedArray", - "kind": 9, - "tags": [], + "insertTextFormat": 2, + "kind": 4, + "label": "Three(_)", + "sortText": "A Three(_)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "module TypedArray", - "documentation": null - }, { - "label": "TimeoutId", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], + "label": "TypedArray", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "module TimeoutId", - "documentation": null - }, { - "label": "Type", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], + "label": "TimeoutId", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "module Type", - "documentation": null - }, { - "label": "TableclothMap", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module TableclothMap", - "documentation": null, + "label": "Type", + "tags": [] + }, + { "data": { "modulePath": "TableclothMap", "filePath": "src/CompletionJsxProps.res" - } - }, { - "label": "TypeArgCtx", + }, + "deprecated": false, + "detail": "module TableclothMap", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module TypeArgCtx", - "documentation": null, + "label": "TableclothMap", + "tags": [] + }, + { "data": { "modulePath": "TypeArgCtx", "filePath": "src/CompletionJsxProps.res" - } - }, { - "label": "TypeAtPosCompletion", + }, + "deprecated": false, + "detail": "module TypeArgCtx", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module TypeAtPosCompletion", - "documentation": null, + "label": "TypeArgCtx", + "tags": [] + }, + { "data": { "modulePath": "TypeAtPosCompletion", "filePath": "src/CompletionJsxProps.res" - } - }, { - "label": "TypeConstraint", + }, + "deprecated": false, + "detail": "module TypeAtPosCompletion", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module TypeConstraint", - "documentation": null, + "label": "TypeAtPosCompletion", + "tags": [] + }, + { "data": { "modulePath": "TypeConstraint", "filePath": "src/CompletionJsxProps.res" - } - }, { - "label": "TypeDefinition", + }, + "deprecated": false, + "detail": "module TypeConstraint", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module TypeDefinition", - "documentation": null, + "label": "TypeConstraint", + "tags": [] + }, + { "data": { "modulePath": "TypeDefinition", "filePath": "src/CompletionJsxProps.res" - } - }] + }, + "deprecated": false, + "detail": "module TypeDefinition", + "documentation": { "kind": "markdown", "value": "" }, + "kind": 9, + "label": "TypeDefinition", + "tags": [] + } +] Complete src/CompletionJsxProps.res 9:52 posCursor:[9:52] posNoWhite:[9:51] Found expr:[9:11->9:52] @@ -147,39 +197,64 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath CJsxPropValue [CompletionSupport, TestComponent] polyArg Path CompletionSupport.TestComponent.make -[{ - "label": "#one", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "#one", - "documentation": {"kind": "markdown", "value": "```rescript\n#one\n```\n\n```rescript\n[#one | #three(int, bool) | #two | #two2]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#one\n```\n\n```rescript\n[#one | #three(int, bool) | #two | #two2]\n```" + }, "insertText": "{#one}", - "insertTextFormat": 2 - }, { - "label": "#three(_, _)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "#one", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "#three(int, bool)", - "documentation": {"kind": "markdown", "value": "```rescript\n#three(int, bool)\n```\n\n```rescript\n[#one | #three(int, bool) | #two | #two2]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#three(int, bool)\n```\n\n```rescript\n[#one | #three(int, bool) | #two | #two2]\n```" + }, "insertText": "{#three(${1:_}, ${2:_})}", - "insertTextFormat": 2 - }, { - "label": "#two", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "#three(_, _)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "#two", - "documentation": {"kind": "markdown", "value": "```rescript\n#two\n```\n\n```rescript\n[#one | #three(int, bool) | #two | #two2]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#two\n```\n\n```rescript\n[#one | #three(int, bool) | #two | #two2]\n```" + }, "insertText": "{#two}", - "insertTextFormat": 2 - }, { - "label": "#two2", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "#two", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "#two2", - "documentation": {"kind": "markdown", "value": "```rescript\n#two2\n```\n\n```rescript\n[#one | #three(int, bool) | #two | #two2]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#two2\n```\n\n```rescript\n[#one | #three(int, bool) | #two | #two2]\n```" + }, "insertText": "{#two2}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "#two2", + "tags": [] + } +] Complete src/CompletionJsxProps.res 12:54 posCursor:[12:54] posNoWhite:[12:53] Found expr:[12:11->12:54] @@ -189,31 +264,50 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath CJsxPropValue [CompletionSupport, TestComponent] polyArg Path CompletionSupport.TestComponent.make -[{ - "label": "#three(_, _)", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "#three(int, bool)", - "documentation": {"kind": "markdown", "value": "```rescript\n#three(int, bool)\n```\n\n```rescript\n[#one | #three(int, bool) | #two | #two2]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#three(int, bool)\n```\n\n```rescript\n[#one | #three(int, bool) | #two | #two2]\n```" + }, "insertText": "{three(${1:_}, ${2:_})}", - "insertTextFormat": 2 - }, { - "label": "#two", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "#three(_, _)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "#two", - "documentation": {"kind": "markdown", "value": "```rescript\n#two\n```\n\n```rescript\n[#one | #three(int, bool) | #two | #two2]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#two\n```\n\n```rescript\n[#one | #three(int, bool) | #two | #two2]\n```" + }, "insertText": "{two}", - "insertTextFormat": 2 - }, { - "label": "#two2", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "#two", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "#two2", - "documentation": {"kind": "markdown", "value": "```rescript\n#two2\n```\n\n```rescript\n[#one | #three(int, bool) | #two | #two2]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#two2\n```\n\n```rescript\n[#one | #three(int, bool) | #two | #two2]\n```" + }, "insertText": "{two2}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "#two2", + "tags": [] + } +] Complete src/CompletionJsxProps.res 15:22 posCursor:[15:22] posNoWhite:[15:21] Found expr:[15:11->15:25] @@ -224,19 +318,26 @@ Resolved opens 1 Stdlib ContextPath CJsxPropValue [div] muted Path ReactDOM.domProps Path JsxDOM.domProps -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "false", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] Complete src/CompletionJsxProps.res 18:29 posCursor:[18:29] posNoWhite:[18:28] Found expr:[18:11->18:32] @@ -247,16 +348,20 @@ Resolved opens 1 Stdlib ContextPath CJsxPropValue [div] onMouseEnter Path ReactDOM.domProps Path JsxDOM.domProps -[{ - "label": "event => event", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "JsxEvent.Mouse.t => unit", - "documentation": null, - "sortText": "A", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "{${1:event} => ${0:event}}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "event => event", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionJsxProps.res 22:52 posCursor:[22:52] posNoWhite:[22:51] Found expr:[22:11->22:52] @@ -266,16 +371,23 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath CJsxPropValue [CompletionSupport, TestComponent] testArr Path CompletionSupport.TestComponent.make -[{ - "label": "[]", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "testVariant", - "documentation": {"kind": "markdown", "value": "```rescript\ntype testVariant = One | Two | Three(int)\n```"}, - "sortText": "A", + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype testVariant = One | Two | Three(int)\n```" + }, "insertText": "{[$0]}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "[]", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionJsxProps.res 26:54 posCursor:[26:54] posNoWhite:[26:53] Found expr:[26:11->26:56] @@ -285,31 +397,50 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath CJsxPropValue [CompletionSupport, TestComponent] testArr Path CompletionSupport.TestComponent.make -[{ - "label": "One", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "One", - "documentation": {"kind": "markdown", "value": "```rescript\nOne\n```\n\n```rescript\ntype testVariant = One | Two | Three(int)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nOne\n```\n\n```rescript\ntype testVariant = One | Two | Three(int)\n```" + }, "insertText": "One", - "insertTextFormat": 2 - }, { - "label": "Two", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "One", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Two", - "documentation": {"kind": "markdown", "value": "```rescript\nTwo\n```\n\n```rescript\ntype testVariant = One | Two | Three(int)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nTwo\n```\n\n```rescript\ntype testVariant = One | Two | Three(int)\n```" + }, "insertText": "Two", - "insertTextFormat": 2 - }, { - "label": "Three(_)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "Two", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Three(int)", - "documentation": {"kind": "markdown", "value": "```rescript\nThree(int)\n```\n\n```rescript\ntype testVariant = One | Two | Three(int)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nThree(int)\n```\n\n```rescript\ntype testVariant = One | Two | Three(int)\n```" + }, "insertText": "Three($0)", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "Three(_)", + "tags": [] + } +] Complete src/CompletionJsxProps.res 31:53 posCursor:[31:53] posNoWhite:[31:52] Found expr:[31:11->31:54] @@ -319,39 +450,64 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath CJsxPropValue [CompletionSupport, TestComponent] polyArg Path CompletionSupport.TestComponent.make -[{ - "label": "#one", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "#one", - "documentation": {"kind": "markdown", "value": "```rescript\n#one\n```\n\n```rescript\n[#one | #three(int, bool) | #two | #two2]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#one\n```\n\n```rescript\n[#one | #three(int, bool) | #two | #two2]\n```" + }, "insertText": "#one", - "insertTextFormat": 2 - }, { - "label": "#three(_, _)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "#one", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "#three(int, bool)", - "documentation": {"kind": "markdown", "value": "```rescript\n#three(int, bool)\n```\n\n```rescript\n[#one | #three(int, bool) | #two | #two2]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#three(int, bool)\n```\n\n```rescript\n[#one | #three(int, bool) | #two | #two2]\n```" + }, "insertText": "#three(${1:_}, ${2:_})", - "insertTextFormat": 2 - }, { - "label": "#two", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "#three(_, _)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "#two", - "documentation": {"kind": "markdown", "value": "```rescript\n#two\n```\n\n```rescript\n[#one | #three(int, bool) | #two | #two2]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#two\n```\n\n```rescript\n[#one | #three(int, bool) | #two | #two2]\n```" + }, "insertText": "#two", - "insertTextFormat": 2 - }, { - "label": "#two2", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "#two", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "#two2", - "documentation": {"kind": "markdown", "value": "```rescript\n#two2\n```\n\n```rescript\n[#one | #three(int, bool) | #two | #two2]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#two2\n```\n\n```rescript\n[#one | #three(int, bool) | #two | #two2]\n```" + }, "insertText": "#two2", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "#two2", + "tags": [] + } +] Complete src/CompletionJsxProps.res 34:49 posCursor:[34:49] posNoWhite:[34:48] Found expr:[34:11->34:50] @@ -361,25 +517,38 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath CJsxPropValue [CompletionSupport, TestComponent] on Path CompletionSupport.TestComponent.make -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "tsomeVar", - "kind": 12, - "tags": [], + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "[> #two]", - "documentation": null - }, { - "label": "typeof", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "tsomeVar", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "'a => Type.t", - "documentation": {"kind": "markdown", "value": "\n`typeof(value)` exposes JavaScript's `typeof` operator and returns a `Type.t` enum.\nIt helps you inspect values that come from JavaScript APIs.\n\n## Examples\n\n```rescript\ntypeof(1) == #number\ntypeof(\"a\") == #string\n```\n"} - }] + "documentation": { + "kind": "markdown", + "value": "\n`typeof(value)` exposes JavaScript's `typeof` operator and returns a `Type.t` enum.\nIt helps you inspect values that come from JavaScript APIs.\n\n## Examples\n\n```rescript\ntypeof(1) == #number\ntypeof(\"a\") == #string\n```\n" + }, + "kind": 12, + "label": "typeof", + "tags": [] + } +] Complete src/CompletionJsxProps.res 44:44 posCursor:[44:44] posNoWhite:[44:43] Found expr:[44:11->44:44] @@ -389,21 +558,34 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath CJsxPropValue [CompletableComponentLazy] status Path CompletableComponentLazy.make -[{ - "label": "On", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "On", - "documentation": {"kind": "markdown", "value": "```rescript\nOn\n```\n\n```rescript\ntype status = On | Off\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nOn\n```\n\n```rescript\ntype status = On | Off\n```" + }, "insertText": "{On}", - "insertTextFormat": 2 - }, { - "label": "Off", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "On", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Off", - "documentation": {"kind": "markdown", "value": "```rescript\nOff\n```\n\n```rescript\ntype status = On | Off\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nOff\n```\n\n```rescript\ntype status = On | Off\n```" + }, "insertText": "{Off}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "Off", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/CompletionMultipleEditorCompleteFrom.res.txt b/tests/analysis_tests/tests/src/expected/CompletionMultipleEditorCompleteFrom.res.txt index cc9888647e1..74cab634f8d 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionMultipleEditorCompleteFrom.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionMultipleEditorCompleteFrom.res.txt @@ -1,3 +1,4 @@ +null Complete src/CompletionMultipleEditorCompleteFrom.res 19:5 posCursor:[19:5] posNoWhite:[19:4] Found expr:[19:3->19:5] Pexp_field [19:3->19:4] _:[22:0->19:5] @@ -15,29 +16,46 @@ Path A. Path B. Path C. Path -[{ - "label": "->B.b", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 19 }, + "start": { "character": 4, "line": 19 } + } + } + ], + "data": null, + "deprecated": false, "detail": "A.a => int", - "documentation": null, - "sortText": "b", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->B.b", - "additionalTextEdits": [{ - "range": {"start": {"line": 19, "character": 4}, "end": {"line": 19, "character": 5}}, - "newText": "" - }] - }, { - "label": "->C.c", "kind": 12, - "tags": [], + "label": "->B.b", + "sortText": "b", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 19 }, + "start": { "character": 4, "line": 19 } + } + } + ], + "data": null, + "deprecated": false, "detail": "A.a => char", - "documentation": null, - "sortText": "c", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->C.c", - "additionalTextEdits": [{ - "range": {"start": {"line": 19, "character": 4}, "end": {"line": 19, "character": 5}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->C.c", + "sortText": "c", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/CompletionNullNullable.res.txt b/tests/analysis_tests/tests/src/expected/CompletionNullNullable.res.txt index 8903a5ef5a3..772cab8df74 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionNullNullable.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionNullNullable.res.txt @@ -1,3 +1,4 @@ +null Complete src/CompletionNullNullable.res 2:5 posCursor:[2:5] posNoWhite:[2:4] Found expr:[2:3->2:5] Pexp_field [2:3->2:4] _:[5:0->2:5] @@ -12,187 +13,353 @@ ContextPath Value[x] Path x Path Stdlib.Null. Path -[{ - "label": "->Null.equal", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 2 }, + "start": { "character": 4, "line": 2 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, t<'b>, ('a, 'b) => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`equal(a, b, eq)` checks if `a` and `b` are equal.\nIf both are `Null.Value`, it will use function `eq` to check if the values are equal.\n\n## Examples\n```rescript\nlet a = Null.Value(1)\nlet b = Null.null\nlet c = Null.Value(2)\n\nNull.equal(a, b, Int.equal) == false\nNull.equal(a, c, Int.equal) == false\nNull.equal(Null.null, Null.null, Int.equal) == true\n```\n "}, - "sortText": "equal", + "documentation": { + "kind": "markdown", + "value": "\n`equal(a, b, eq)` checks if `a` and `b` are equal.\nIf both are `Null.Value`, it will use function `eq` to check if the values are equal.\n\n## Examples\n```rescript\nlet a = Null.Value(1)\nlet b = Null.null\nlet c = Null.Value(2)\n\nNull.equal(a, b, Int.equal) == false\nNull.equal(a, c, Int.equal) == false\nNull.equal(Null.null, Null.null, Int.equal) == true\n```\n " + }, "insertText": "->Null.equal", - "additionalTextEdits": [{ - "range": {"start": {"line": 2, "character": 4}, "end": {"line": 2, "character": 5}}, - "newText": "" - }] - }, { - "label": "->Null.getUnsafe", "kind": 12, - "tags": [], + "label": "->Null.equal", + "sortText": "equal", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 2 }, + "start": { "character": 4, "line": 2 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => 'a", - "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"}, - "sortText": "getUnsafe", + "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" + }, "insertText": "->Null.getUnsafe", - "additionalTextEdits": [{ - "range": {"start": {"line": 2, "character": 4}, "end": {"line": 2, "character": 5}}, - "newText": "" - }] - }, { - "label": "->Null.map", "kind": 12, - "tags": [], + "label": "->Null.getUnsafe", + "sortText": "getUnsafe", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 2 }, + "start": { "character": 4, "line": 2 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => 'b) => t<'b>", - "documentation": {"kind": "markdown", "value": "\n`map(value, f)` returns `f(value)` if `value` is not `null`, otherwise returns\n`value` unchanged.\n\n## Examples\n\n```rescript\nNull.map(Null.make(3), x => x * x) // Null.make(9)\nNull.map(Null.null, x => x * x) // null\n```\n"}, - "sortText": "map", + "documentation": { + "kind": "markdown", + "value": "\n`map(value, f)` returns `f(value)` if `value` is not `null`, otherwise returns\n`value` unchanged.\n\n## Examples\n\n```rescript\nNull.map(Null.make(3), x => x * x) // Null.make(9)\nNull.map(Null.null, x => x * x) // null\n```\n" + }, "insertText": "->Null.map", - "additionalTextEdits": [{ - "range": {"start": {"line": 2, "character": 4}, "end": {"line": 2, "character": 5}}, - "newText": "" - }] - }, { - "label": "->Null.getExn", "kind": 12, - "tags": [1], + "label": "->Null.map", + "sortText": "map", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 2 }, + "start": { "character": 4, "line": 2 } + } + } + ], + "data": null, + "deprecated": true, "detail": "t<'a> => 'a", - "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"}, - "sortText": "getExn", + "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" + }, "insertText": "->Null.getExn", - "additionalTextEdits": [{ - "range": {"start": {"line": 2, "character": 4}, "end": {"line": 2, "character": 5}}, - "newText": "" - }] - }, { - "label": "->Null.compare", "kind": 12, - "tags": [], + "label": "->Null.getExn", + "sortText": "getExn", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 2 }, + "start": { "character": 4, "line": 2 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, t<'b>, ('a, 'b) => Ordering.t) => Ordering.t", - "documentation": {"kind": "markdown", "value": "\n`compare(a, b, cmp)` compares `a` and `b`.\nIf both are `Null.Value`, it will use function `cmp` to compare the values.\n\n## Examples\n```rescript\nlet a = Null.Value(1)\nlet b = Null.null\nlet c = Null.Value(2)\n\n// A value is greater than null\nNull.compare(a, b, Int.compare) == Stdlib_Ordering.greater\n// A value is less than null\nNull.compare(b, a, Int.compare) == Stdlib_Ordering.less\n// A null is equal to null\nNull.compare(Null.null, Null.null, Int.compare) == Stdlib_Ordering.equal\n// The compare function is used if both are `Null.Value`\nNull.compare(a, c, Int.compare) == Stdlib_Ordering.less\n```\n"}, - "sortText": "compare", + "documentation": { + "kind": "markdown", + "value": "\n`compare(a, b, cmp)` compares `a` and `b`.\nIf both are `Null.Value`, it will use function `cmp` to compare the values.\n\n## Examples\n```rescript\nlet a = Null.Value(1)\nlet b = Null.null\nlet c = Null.Value(2)\n\n// A value is greater than null\nNull.compare(a, b, Int.compare) == Stdlib_Ordering.greater\n// A value is less than null\nNull.compare(b, a, Int.compare) == Stdlib_Ordering.less\n// A null is equal to null\nNull.compare(Null.null, Null.null, Int.compare) == Stdlib_Ordering.equal\n// The compare function is used if both are `Null.Value`\nNull.compare(a, c, Int.compare) == Stdlib_Ordering.less\n```\n" + }, "insertText": "->Null.compare", - "additionalTextEdits": [{ - "range": {"start": {"line": 2, "character": 4}, "end": {"line": 2, "character": 5}}, - "newText": "" - }] - }, { - "label": "->Null.ignore", "kind": 12, - "tags": [], + "label": "->Null.compare", + "sortText": "compare", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 2 }, + "start": { "character": 4, "line": 2 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => unit", - "documentation": {"kind": "markdown", "value": "\n `ignore(null)` ignores the provided null 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"}, - "sortText": "ignore", + "documentation": { + "kind": "markdown", + "value": "\n `ignore(null)` ignores the provided null 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" + }, "insertText": "->Null.ignore", - "additionalTextEdits": [{ - "range": {"start": {"line": 2, "character": 4}, "end": {"line": 2, "character": 5}}, - "newText": "" - }] - }, { - "label": "->Null.getOrThrow", "kind": 12, - "tags": [], + "label": "->Null.ignore", + "sortText": "ignore", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 2 }, + "start": { "character": 4, "line": 2 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => 'a", - "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"}, - "sortText": "getOrThrow", + "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" + }, "insertText": "->Null.getOrThrow", - "additionalTextEdits": [{ - "range": {"start": {"line": 2, "character": 4}, "end": {"line": 2, "character": 5}}, - "newText": "" - }] - }, { - "label": "->Null.toOption", "kind": 12, - "tags": [], + "label": "->Null.getOrThrow", + "sortText": "getOrThrow", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 2 }, + "start": { "character": 4, "line": 2 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => option<'a>", - "documentation": {"kind": "markdown", "value": "\nConverts a nullable value into an option, so it can be pattern matched on.\nWill convert `null` to `None`, and a present value to `Some(value)`.\n\n## Examples\n```rescript\nlet nullStr = Null.make(\"Hello\")\n\nswitch nullStr->Null.toOption {\n| Some(str) => Console.log2(\"Got string:\", str)\n| None => Console.log(\"Didn't have a value.\")\n}\n```\n"}, - "sortText": "toOption", + "documentation": { + "kind": "markdown", + "value": "\nConverts a nullable value into an option, so it can be pattern matched on.\nWill convert `null` to `None`, and a present value to `Some(value)`.\n\n## Examples\n```rescript\nlet nullStr = Null.make(\"Hello\")\n\nswitch nullStr->Null.toOption {\n| Some(str) => Console.log2(\"Got string:\", str)\n| None => Console.log(\"Didn't have a value.\")\n}\n```\n" + }, "insertText": "->Null.toOption", - "additionalTextEdits": [{ - "range": {"start": {"line": 2, "character": 4}, "end": {"line": 2, "character": 5}}, - "newText": "" - }] - }, { - "label": "->Null.getOr", "kind": 12, - "tags": [], + "label": "->Null.toOption", + "sortText": "toOption", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 2 }, + "start": { "character": 4, "line": 2 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => 'a", - "documentation": {"kind": "markdown", "value": "\n`getOr(value, default)` returns `value` if not `null`, otherwise return\n`default`.\n\n## Examples\n\n```rescript\nNull.getOr(Null.null, \"Banana\") // Banana\nNull.getOr(Null.make(\"Apple\"), \"Banana\") // Apple\n\nlet greet = (firstName: option) => \"Greetings \" ++ firstName->Option.getOr(\"Anonymous\")\n\nNull.make(\"Jane\")->Null.toOption->greet // \"Greetings Jane\"\nNull.null->Null.toOption->greet // \"Greetings Anonymous\"\n```\n"}, - "sortText": "getOr", + "documentation": { + "kind": "markdown", + "value": "\n`getOr(value, default)` returns `value` if not `null`, otherwise return\n`default`.\n\n## Examples\n\n```rescript\nNull.getOr(Null.null, \"Banana\") // Banana\nNull.getOr(Null.make(\"Apple\"), \"Banana\") // Apple\n\nlet greet = (firstName: option) => \"Greetings \" ++ firstName->Option.getOr(\"Anonymous\")\n\nNull.make(\"Jane\")->Null.toOption->greet // \"Greetings Jane\"\nNull.null->Null.toOption->greet // \"Greetings Anonymous\"\n```\n" + }, "insertText": "->Null.getOr", - "additionalTextEdits": [{ - "range": {"start": {"line": 2, "character": 4}, "end": {"line": 2, "character": 5}}, - "newText": "" - }] - }, { - "label": "->Null.mapOr", "kind": 12, - "tags": [], + "label": "->Null.getOr", + "sortText": "getOr", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 2 }, + "start": { "character": 4, "line": 2 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'b, 'a => 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`mapOr(value, default, f)` returns `f(value)` if `value` is not `null`,\notherwise returns `default`.\n\n## Examples\n\n```rescript\nlet someValue = Null.make(3)\nsomeValue->Null.mapOr(0, x => x + 5) // 8\n\nlet noneValue = Null.null\nnoneValue->Null.mapOr(0, x => x + 5) // 0\n```\n"}, - "sortText": "mapOr", + "documentation": { + "kind": "markdown", + "value": "\n`mapOr(value, default, f)` returns `f(value)` if `value` is not `null`,\notherwise returns `default`.\n\n## Examples\n\n```rescript\nlet someValue = Null.make(3)\nsomeValue->Null.mapOr(0, x => x + 5) // 8\n\nlet noneValue = Null.null\nnoneValue->Null.mapOr(0, x => x + 5) // 0\n```\n" + }, "insertText": "->Null.mapOr", - "additionalTextEdits": [{ - "range": {"start": {"line": 2, "character": 4}, "end": {"line": 2, "character": 5}}, - "newText": "" - }] - }, { - "label": "->Null.mapWithDefault", "kind": 12, - "tags": [1], + "label": "->Null.mapOr", + "sortText": "mapOr", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 2 }, + "start": { "character": 4, "line": 2 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, 'b, 'a => 'b) => 'b", - "documentation": {"kind": "markdown", "value": "Deprecated: Use mapOr instead\n\n"}, - "sortText": "mapWithDefault", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use mapOr instead\n\n" + }, "insertText": "->Null.mapWithDefault", - "additionalTextEdits": [{ - "range": {"start": {"line": 2, "character": 4}, "end": {"line": 2, "character": 5}}, - "newText": "" - }] - }, { - "label": "->Null.getWithDefault", "kind": 12, - "tags": [1], + "label": "->Null.mapWithDefault", + "sortText": "mapWithDefault", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 2 }, + "start": { "character": 4, "line": 2 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, 'a) => 'a", - "documentation": {"kind": "markdown", "value": "Deprecated: Use getOr instead\n\n"}, - "sortText": "getWithDefault", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use getOr instead\n\n" + }, "insertText": "->Null.getWithDefault", - "additionalTextEdits": [{ - "range": {"start": {"line": 2, "character": 4}, "end": {"line": 2, "character": 5}}, - "newText": "" - }] - }, { - "label": "->Null.asNullable", "kind": 12, - "tags": [], + "label": "->Null.getWithDefault", + "sortText": "getWithDefault", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 2 }, + "start": { "character": 4, "line": 2 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => Nullable.t<'a>", - "documentation": {"kind": "markdown", "value": "\nConverts a `Null.t` into a `Nullable.t`.\n\n## Examples\n```rescript\nlet nullValue = Null.make(\"Hello\")\nlet asNullable = nullValue->Null.asNullable // Nullable.t\n```\n"}, - "sortText": "asNullable", + "documentation": { + "kind": "markdown", + "value": "\nConverts a `Null.t` into a `Nullable.t`.\n\n## Examples\n```rescript\nlet nullValue = Null.make(\"Hello\")\nlet asNullable = nullValue->Null.asNullable // Nullable.t\n```\n" + }, "insertText": "->Null.asNullable", - "additionalTextEdits": [{ - "range": {"start": {"line": 2, "character": 4}, "end": {"line": 2, "character": 5}}, - "newText": "" - }] - }, { - "label": "->Null.forEach", "kind": 12, - "tags": [], + "label": "->Null.asNullable", + "sortText": "asNullable", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 2 }, + "start": { "character": 4, "line": 2 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => unit) => unit", - "documentation": {"kind": "markdown", "value": "\n`forEach(value, f)` call `f` on `value`. if `value` is not `null`, then if calls\n`f`, otherwise returns `unit`.\n\n## Examples\n\n```rescript\nNull.forEach(Null.make(\"thing\"), x => Console.log(x)) // logs \"thing\"\nNull.forEach(Null.null, x => Console.log(x)) // logs nothing\n```\n"}, - "sortText": "forEach", + "documentation": { + "kind": "markdown", + "value": "\n`forEach(value, f)` call `f` on `value`. if `value` is not `null`, then if calls\n`f`, otherwise returns `unit`.\n\n## Examples\n\n```rescript\nNull.forEach(Null.make(\"thing\"), x => Console.log(x)) // logs \"thing\"\nNull.forEach(Null.null, x => Console.log(x)) // logs nothing\n```\n" + }, "insertText": "->Null.forEach", - "additionalTextEdits": [{ - "range": {"start": {"line": 2, "character": 4}, "end": {"line": 2, "character": 5}}, - "newText": "" - }] - }, { - "label": "->Null.flatMap", "kind": 12, - "tags": [], + "label": "->Null.forEach", + "sortText": "forEach", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 2 }, + "start": { "character": 4, "line": 2 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => t<'b>) => t<'b>", - "documentation": {"kind": "markdown", "value": "\n`flatMap(value, f)` returns `f(value)` if `value` is not `null`, otherwise\nreturns `value` unchanged.\n\n## Examples\n\n```rescript\nlet addIfAboveOne = value =>\n if value > 1 {\n Null.make(value + 1)\n } else {\n Null.null\n }\n\nNull.flatMap(Null.make(2), addIfAboveOne) // Null.make(3)\nNull.flatMap(Null.make(-4), addIfAboveOne) // null\nNull.flatMap(Null.null, addIfAboveOne) // null\n```\n"}, - "sortText": "flatMap", + "documentation": { + "kind": "markdown", + "value": "\n`flatMap(value, f)` returns `f(value)` if `value` is not `null`, otherwise\nreturns `value` unchanged.\n\n## Examples\n\n```rescript\nlet addIfAboveOne = value =>\n if value > 1 {\n Null.make(value + 1)\n } else {\n Null.null\n }\n\nNull.flatMap(Null.make(2), addIfAboveOne) // Null.make(3)\nNull.flatMap(Null.make(-4), addIfAboveOne) // null\nNull.flatMap(Null.null, addIfAboveOne) // null\n```\n" + }, "insertText": "->Null.flatMap", - "additionalTextEdits": [{ - "range": {"start": {"line": 2, "character": 4}, "end": {"line": 2, "character": 5}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->Null.flatMap", + "sortText": "flatMap", + "tags": [] + } +] Complete src/CompletionNullNullable.res 7:5 posCursor:[7:5] posNoWhite:[7:4] Found expr:[7:3->7:5] @@ -208,185 +375,345 @@ ContextPath Value[y] Path y Path Stdlib.Nullable. Path -[{ - "label": "->Nullable.equal", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 7 }, + "start": { "character": 4, "line": 7 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, t<'b>, ('a, 'b) => bool) => bool", - "documentation": null, - "sortText": "equal", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->Nullable.equal", - "additionalTextEdits": [{ - "range": {"start": {"line": 7, "character": 4}, "end": {"line": 7, "character": 5}}, - "newText": "" - }] - }, { - "label": "->Nullable.getUnsafe", "kind": 12, - "tags": [], + "label": "->Nullable.equal", + "sortText": "equal", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 7 }, + "start": { "character": 4, "line": 7 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => 'a", - "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"}, - "sortText": "getUnsafe", + "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" + }, "insertText": "->Nullable.getUnsafe", - "additionalTextEdits": [{ - "range": {"start": {"line": 7, "character": 4}, "end": {"line": 7, "character": 5}}, - "newText": "" - }] - }, { - "label": "->Nullable.map", "kind": 12, - "tags": [], + "label": "->Nullable.getUnsafe", + "sortText": "getUnsafe", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 7 }, + "start": { "character": 4, "line": 7 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => 'b) => t<'b>", - "documentation": {"kind": "markdown", "value": "\n`map(value, f)` returns `f(value)` if `value` is not `null` or `undefined`,\notherwise returns `value` unchanged.\n\n## Examples\n\n```rescript\nNullable.map(Nullable.make(3), x => x * x) // Nullable.make(9)\nNullable.map(undefined, x => x * x) // undefined\n```\n"}, - "sortText": "map", + "documentation": { + "kind": "markdown", + "value": "\n`map(value, f)` returns `f(value)` if `value` is not `null` or `undefined`,\notherwise returns `value` unchanged.\n\n## Examples\n\n```rescript\nNullable.map(Nullable.make(3), x => x * x) // Nullable.make(9)\nNullable.map(undefined, x => x * x) // undefined\n```\n" + }, "insertText": "->Nullable.map", - "additionalTextEdits": [{ - "range": {"start": {"line": 7, "character": 4}, "end": {"line": 7, "character": 5}}, - "newText": "" - }] - }, { - "label": "->Nullable.getExn", "kind": 12, - "tags": [1], + "label": "->Nullable.map", + "sortText": "map", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 7 }, + "start": { "character": 4, "line": 7 } + } + } + ], + "data": null, + "deprecated": true, "detail": "t<'a> => 'a", - "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"}, - "sortText": "getExn", + "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" + }, "insertText": "->Nullable.getExn", - "additionalTextEdits": [{ - "range": {"start": {"line": 7, "character": 4}, "end": {"line": 7, "character": 5}}, - "newText": "" - }] - }, { - "label": "->Nullable.compare", "kind": 12, - "tags": [], + "label": "->Nullable.getExn", + "sortText": "getExn", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 7 }, + "start": { "character": 4, "line": 7 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, t<'b>, ('a, 'b) => Ordering.t) => Ordering.t", - "documentation": null, - "sortText": "compare", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->Nullable.compare", - "additionalTextEdits": [{ - "range": {"start": {"line": 7, "character": 4}, "end": {"line": 7, "character": 5}}, - "newText": "" - }] - }, { - "label": "->Nullable.ignore", "kind": 12, - "tags": [], + "label": "->Nullable.compare", + "sortText": "compare", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 7 }, + "start": { "character": 4, "line": 7 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => unit", - "documentation": {"kind": "markdown", "value": "\n `ignore(nullable)` ignores the provided nullable 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"}, - "sortText": "ignore", + "documentation": { + "kind": "markdown", + "value": "\n `ignore(nullable)` ignores the provided nullable 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" + }, "insertText": "->Nullable.ignore", - "additionalTextEdits": [{ - "range": {"start": {"line": 7, "character": 4}, "end": {"line": 7, "character": 5}}, - "newText": "" - }] - }, { - "label": "->Nullable.getOrThrow", "kind": 12, - "tags": [], + "label": "->Nullable.ignore", + "sortText": "ignore", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 7 }, + "start": { "character": 4, "line": 7 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => 'a", - "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"}, - "sortText": "getOrThrow", + "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" + }, "insertText": "->Nullable.getOrThrow", - "additionalTextEdits": [{ - "range": {"start": {"line": 7, "character": 4}, "end": {"line": 7, "character": 5}}, - "newText": "" - }] - }, { - "label": "->Nullable.toOption", "kind": 12, - "tags": [], + "label": "->Nullable.getOrThrow", + "sortText": "getOrThrow", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 7 }, + "start": { "character": 4, "line": 7 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => option<'a>", - "documentation": {"kind": "markdown", "value": "\nConverts a nullable value into an option, so it can be pattern matched on.\nWill convert both `null` and `undefined` to `None`, and a present value to `Some(value)`.\n\n## Examples\n```rescript\nlet nullableString = Nullable.make(\"Hello\")\n\nswitch nullableString->Nullable.toOption {\n| Some(str) => Console.log2(\"Got string:\", str)\n| None => Console.log(\"Didn't have a value.\")\n}\n```\n"}, - "sortText": "toOption", + "documentation": { + "kind": "markdown", + "value": "\nConverts a nullable value into an option, so it can be pattern matched on.\nWill convert both `null` and `undefined` to `None`, and a present value to `Some(value)`.\n\n## Examples\n```rescript\nlet nullableString = Nullable.make(\"Hello\")\n\nswitch nullableString->Nullable.toOption {\n| Some(str) => Console.log2(\"Got string:\", str)\n| None => Console.log(\"Didn't have a value.\")\n}\n```\n" + }, "insertText": "->Nullable.toOption", - "additionalTextEdits": [{ - "range": {"start": {"line": 7, "character": 4}, "end": {"line": 7, "character": 5}}, - "newText": "" - }] - }, { - "label": "->Nullable.getOr", "kind": 12, - "tags": [], + "label": "->Nullable.toOption", + "sortText": "toOption", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 7 }, + "start": { "character": 4, "line": 7 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => 'a", - "documentation": {"kind": "markdown", "value": "\n`getOr(value, default)` returns `value` if not `null` or `undefined`,\notherwise return `default`.\n\n## Examples\n\n```rescript\nNullable.getOr(Nullable.null, \"Banana\") // Banana\nNullable.getOr(Nullable.make(\"Apple\"), \"Banana\") // Apple\n\nlet greet = (firstName: option) => \"Greetings \" ++ firstName->Option.getOr(\"Anonymous\")\n\nNullable.make(\"Jane\")->Nullable.toOption->greet // \"Greetings Jane\"\nNullable.null->Nullable.toOption->greet // \"Greetings Anonymous\"\n```\n"}, - "sortText": "getOr", + "documentation": { + "kind": "markdown", + "value": "\n`getOr(value, default)` returns `value` if not `null` or `undefined`,\notherwise return `default`.\n\n## Examples\n\n```rescript\nNullable.getOr(Nullable.null, \"Banana\") // Banana\nNullable.getOr(Nullable.make(\"Apple\"), \"Banana\") // Apple\n\nlet greet = (firstName: option) => \"Greetings \" ++ firstName->Option.getOr(\"Anonymous\")\n\nNullable.make(\"Jane\")->Nullable.toOption->greet // \"Greetings Jane\"\nNullable.null->Nullable.toOption->greet // \"Greetings Anonymous\"\n```\n" + }, "insertText": "->Nullable.getOr", - "additionalTextEdits": [{ - "range": {"start": {"line": 7, "character": 4}, "end": {"line": 7, "character": 5}}, - "newText": "" - }] - }, { - "label": "->Nullable.mapOr", "kind": 12, - "tags": [], + "label": "->Nullable.getOr", + "sortText": "getOr", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 7 }, + "start": { "character": 4, "line": 7 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'b, 'a => 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`mapOr(value, default, f)` returns `f(value)` if `value` is not `null`\nor `undefined`, otherwise returns `default`.\n\n## Examples\n\n```rescript\nlet someValue = Nullable.make(3)\nsomeValue->Nullable.mapOr(0, x => x + 5) // 8\n\nlet noneValue = Nullable.null\nnoneValue->Nullable.mapOr(0, x => x + 5) // 0\n```\n"}, - "sortText": "mapOr", + "documentation": { + "kind": "markdown", + "value": "\n`mapOr(value, default, f)` returns `f(value)` if `value` is not `null`\nor `undefined`, otherwise returns `default`.\n\n## Examples\n\n```rescript\nlet someValue = Nullable.make(3)\nsomeValue->Nullable.mapOr(0, x => x + 5) // 8\n\nlet noneValue = Nullable.null\nnoneValue->Nullable.mapOr(0, x => x + 5) // 0\n```\n" + }, "insertText": "->Nullable.mapOr", - "additionalTextEdits": [{ - "range": {"start": {"line": 7, "character": 4}, "end": {"line": 7, "character": 5}}, - "newText": "" - }] - }, { - "label": "->Nullable.mapWithDefault", "kind": 12, - "tags": [1], + "label": "->Nullable.mapOr", + "sortText": "mapOr", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 7 }, + "start": { "character": 4, "line": 7 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, 'b, 'a => 'b) => 'b", - "documentation": {"kind": "markdown", "value": "Deprecated: Use mapOr instead\n\n"}, - "sortText": "mapWithDefault", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use mapOr instead\n\n" + }, "insertText": "->Nullable.mapWithDefault", - "additionalTextEdits": [{ - "range": {"start": {"line": 7, "character": 4}, "end": {"line": 7, "character": 5}}, - "newText": "" - }] - }, { - "label": "->Nullable.getWithDefault", "kind": 12, - "tags": [1], + "label": "->Nullable.mapWithDefault", + "sortText": "mapWithDefault", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 7 }, + "start": { "character": 4, "line": 7 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, 'a) => 'a", - "documentation": {"kind": "markdown", "value": "Deprecated: Use getOr instead\n\n"}, - "sortText": "getWithDefault", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use getOr instead\n\n" + }, "insertText": "->Nullable.getWithDefault", - "additionalTextEdits": [{ - "range": {"start": {"line": 7, "character": 4}, "end": {"line": 7, "character": 5}}, - "newText": "" - }] - }, { - "label": "->Nullable.isNullable", "kind": 12, - "tags": [], + "label": "->Nullable.getWithDefault", + "sortText": "getWithDefault", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 7 }, + "start": { "character": 4, "line": 7 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => bool", - "documentation": {"kind": "markdown", "value": "\n`isNullable(a)` returns `true` if `a` is null or undefined, `false` otherwise.\n\n## Examples\n\n```rescript\nlet myStr = \"Hello\"\nlet asNullable = myStr->Nullable.make\n\n// Can't do the below because we're now forced to check for nullability\n// myStr == asNullable\n\n// Check if asNullable is not null or undefined\nswitch asNullable->Nullable.isNullable {\n| true => assert(false)\n| false => assert(true)\n}\n```\n"}, - "sortText": "isNullable", + "documentation": { + "kind": "markdown", + "value": "\n`isNullable(a)` returns `true` if `a` is null or undefined, `false` otherwise.\n\n## Examples\n\n```rescript\nlet myStr = \"Hello\"\nlet asNullable = myStr->Nullable.make\n\n// Can't do the below because we're now forced to check for nullability\n// myStr == asNullable\n\n// Check if asNullable is not null or undefined\nswitch asNullable->Nullable.isNullable {\n| true => assert(false)\n| false => assert(true)\n}\n```\n" + }, "insertText": "->Nullable.isNullable", - "additionalTextEdits": [{ - "range": {"start": {"line": 7, "character": 4}, "end": {"line": 7, "character": 5}}, - "newText": "" - }] - }, { - "label": "->Nullable.forEach", "kind": 12, - "tags": [], + "label": "->Nullable.isNullable", + "sortText": "isNullable", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 7 }, + "start": { "character": 4, "line": 7 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => unit) => unit", - "documentation": {"kind": "markdown", "value": "\n`forEach(value, f)` call `f` on `value`. if `value` is not `null` or `undefined`,\nthen if calls `f`, otherwise returns `unit`.\n\n## Examples\n\n```rescript\nNullable.forEach(Nullable.make(\"thing\"), x => Console.log(x)) // logs \"thing\"\nNullable.forEach(Nullable.null, x => Console.log(x)) // returns ()\nNullable.forEach(undefined, x => Console.log(x)) // returns ()\n```\n"}, - "sortText": "forEach", + "documentation": { + "kind": "markdown", + "value": "\n`forEach(value, f)` call `f` on `value`. if `value` is not `null` or `undefined`,\nthen if calls `f`, otherwise returns `unit`.\n\n## Examples\n\n```rescript\nNullable.forEach(Nullable.make(\"thing\"), x => Console.log(x)) // logs \"thing\"\nNullable.forEach(Nullable.null, x => Console.log(x)) // returns ()\nNullable.forEach(undefined, x => Console.log(x)) // returns ()\n```\n" + }, "insertText": "->Nullable.forEach", - "additionalTextEdits": [{ - "range": {"start": {"line": 7, "character": 4}, "end": {"line": 7, "character": 5}}, - "newText": "" - }] - }, { - "label": "->Nullable.flatMap", "kind": 12, - "tags": [], + "label": "->Nullable.forEach", + "sortText": "forEach", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 7 }, + "start": { "character": 4, "line": 7 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => t<'b>) => t<'b>", - "documentation": {"kind": "markdown", "value": "\n`flatMap(value, f)` returns `f(value)` if `value` is not `null` or `undefined`,\notherwise returns `value` unchanged.\n\n## Examples\n\n```rescript\nlet addIfAboveOne = value =>\n if value > 1 {\n Nullable.make(value + 1)\n } else {\n Nullable.null\n }\n\nNullable.flatMap(Nullable.make(2), addIfAboveOne) // Nullable.make(3)\nNullable.flatMap(Nullable.make(-4), addIfAboveOne) // undefined\nNullable.flatMap(Nullable.null, addIfAboveOne) // undefined\n```\n"}, - "sortText": "flatMap", + "documentation": { + "kind": "markdown", + "value": "\n`flatMap(value, f)` returns `f(value)` if `value` is not `null` or `undefined`,\notherwise returns `value` unchanged.\n\n## Examples\n\n```rescript\nlet addIfAboveOne = value =>\n if value > 1 {\n Nullable.make(value + 1)\n } else {\n Nullable.null\n }\n\nNullable.flatMap(Nullable.make(2), addIfAboveOne) // Nullable.make(3)\nNullable.flatMap(Nullable.make(-4), addIfAboveOne) // undefined\nNullable.flatMap(Nullable.null, addIfAboveOne) // undefined\n```\n" + }, "insertText": "->Nullable.flatMap", - "additionalTextEdits": [{ - "range": {"start": {"line": 7, "character": 4}, "end": {"line": 7, "character": 5}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->Nullable.flatMap", + "sortText": "flatMap", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/CompletionObjects.res.txt b/tests/analysis_tests/tests/src/expected/CompletionObjects.res.txt index aeee22461dc..eca482b6845 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionObjects.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionObjects.res.txt @@ -1,3 +1,4 @@ +null Complete src/CompletionObjects.res 5:7 posCursor:[5:7] posNoWhite:[5:5] Found expr:[2:10->9:1] posCursor:[5:7] posNoWhite:[5:5] Found expr:[2:10->9:1] @@ -8,31 +9,44 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[x] Path x -[{ - "label": "None", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "Some(_)", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "None", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "Some(${1:_})", - "insertTextFormat": 2 - }, { - "label": "Some(true)", - "kind": 4, - "tags": [], + "insertTextFormat": 2, + "kind": 12, + "label": "Some(_)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "Some(false)", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "Some(true)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "Some(false)", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/CompletionPattern.res.txt b/tests/analysis_tests/tests/src/expected/CompletionPattern.res.txt index 3ee897359ec..ca301641746 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionPattern.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionPattern.res.txt @@ -1,3 +1,4 @@ +null Complete src/CompletionPattern.res 7:13 posCursor:[7:13] posNoWhite:[7:12] Found expr:[7:3->7:13] [] @@ -9,15 +10,19 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[v] Path v -[{ - "label": "(_, _, _)", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(bool, option, (bool, bool))", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "(${1:_}, ${2:_}, ${3:_})", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "(_, _, _)", + "tags": [] + } +] Complete src/CompletionPattern.res 13:18 posCursor:[13:18] posNoWhite:[13:17] Found pattern:[13:16->13:22] @@ -27,13 +32,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[v] Path v -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "true", + "tags": [] + } +] Complete src/CompletionPattern.res 16:25 posCursor:[16:25] posNoWhite:[16:24] Found pattern:[16:16->16:30] @@ -44,13 +53,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[v] Path v -[{ - "label": "false", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] Complete src/CompletionPattern.res 21:15 XXX Not found! @@ -59,19 +72,26 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[x] Path x -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "false", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] Complete src/CompletionPattern.res 24:17 posCursor:[24:17] posNoWhite:[24:16] Found pattern:[24:16->24:17] @@ -80,13 +100,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[x] Path x -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "true", + "tags": [] + } +] Complete src/CompletionPattern.res 46:15 XXX Not found! @@ -95,16 +119,23 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[f] Path f -[{ - "label": "{}", - "kind": 22, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "someRecord", - "documentation": {"kind": "markdown", "value": "```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```"}, - "sortText": "A", + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```" + }, "insertText": "{$0}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 22, + "label": "{}", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionPattern.res 49:17 posCursor:[49:17] posNoWhite:[49:16] Found pattern:[49:16->49:18] @@ -113,31 +144,56 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[f] Path f -[{ - "label": "first", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nfirst: int\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```"} - }, { - "label": "second", + "documentation": { + "kind": "markdown", + "value": "```rescript\nfirst: int\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```" + }, "kind": 5, - "tags": [], + "label": "first", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(bool, option)", - "documentation": {"kind": "markdown", "value": "```rescript\nsecond: (bool, option)\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```"} - }, { - "label": "optThird", + "documentation": { + "kind": "markdown", + "value": "```rescript\nsecond: (bool, option)\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```" + }, "kind": 5, - "tags": [], + "label": "second", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "option<[#first | #second(someRecord)]>", - "documentation": {"kind": "markdown", "value": "```rescript\noptThird: option<[#first | #second(someRecord)]>\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```"} - }, { - "label": "nest", + "documentation": { + "kind": "markdown", + "value": "```rescript\noptThird: option<[#first | #second(someRecord)]>\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```" + }, "kind": 5, - "tags": [], + "label": "optThird", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "nestedRecord", - "documentation": {"kind": "markdown", "value": "```rescript\nnest: nestedRecord\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nnest: nestedRecord\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```" + }, + "kind": 5, + "label": "nest", + "tags": [] + } +] Complete src/CompletionPattern.res 52:24 posCursor:[52:24] posNoWhite:[52:22] Found pattern:[52:16->52:35] @@ -146,19 +202,32 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[f] Path f -[{ - "label": "optThird", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "option<[#first | #second(someRecord)]>", - "documentation": {"kind": "markdown", "value": "```rescript\noptThird: option<[#first | #second(someRecord)]>\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```"} - }, { - "label": "nest", + "documentation": { + "kind": "markdown", + "value": "```rescript\noptThird: option<[#first | #second(someRecord)]>\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```" + }, "kind": 5, - "tags": [], + "label": "optThird", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "nestedRecord", - "documentation": {"kind": "markdown", "value": "```rescript\nnest: nestedRecord\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nnest: nestedRecord\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```" + }, + "kind": 5, + "label": "nest", + "tags": [] + } +] Complete src/CompletionPattern.res 55:19 posCursor:[55:19] posNoWhite:[55:18] Found pattern:[55:16->55:20] @@ -168,13 +237,20 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[f] Path f -[{ - "label": "first", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nfirst: int\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nfirst: int\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```" + }, + "kind": 5, + "label": "first", + "tags": [] + } +] Complete src/CompletionPattern.res 58:19 posCursor:[58:19] posNoWhite:[58:18] Found pattern:[58:16->58:24] @@ -185,13 +261,20 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[z] Path z -[{ - "label": "optThird", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "option<[#first | #second(someRecord)]>", - "documentation": {"kind": "markdown", "value": "```rescript\noptThird: option<[#first | #second(someRecord)]>\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\noptThird: option<[#first | #second(someRecord)]>\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```" + }, + "kind": 5, + "label": "optThird", + "tags": [] + } +] Complete src/CompletionPattern.res 61:22 posCursor:[61:22] posNoWhite:[61:21] Found pattern:[61:16->61:25] @@ -200,16 +283,23 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[f] Path f -[{ - "label": "{}", - "kind": 22, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "nestedRecord", - "documentation": {"kind": "markdown", "value": "```rescript\ntype nestedRecord = {nested: bool}\n```"}, - "sortText": "A", + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype nestedRecord = {nested: bool}\n```" + }, "insertText": "{$0}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 22, + "label": "{}", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionPattern.res 64:24 posCursor:[64:24] posNoWhite:[64:23] Found pattern:[64:16->64:26] @@ -219,13 +309,20 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[f] Path f -[{ - "label": "nested", +[ + { + "data": null, + "deprecated": false, + "detail": "bool", + "documentation": { + "kind": "markdown", + "value": "```rescript\nnested: bool\n```\n\n```rescript\ntype nestedRecord = {nested: bool}\n```" + }, "kind": 5, - "tags": [], - "detail": "bool", - "documentation": {"kind": "markdown", "value": "```rescript\nnested: bool\n```\n\n```rescript\ntype nestedRecord = {nested: bool}\n```"} - }] + "label": "nested", + "tags": [] + } +] Complete src/CompletionPattern.res 70:22 posCursor:[70:22] posNoWhite:[70:21] Found expr:[69:2->72:13] @@ -236,13 +333,20 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[nest] Path nest -[{ - "label": "nested", +[ + { + "data": null, + "deprecated": false, + "detail": "bool", + "documentation": { + "kind": "markdown", + "value": "```rescript\nnested: bool\n```\n\n```rescript\ntype nestedRecord = {nested: bool}\n```" + }, "kind": 5, - "tags": [], - "detail": "bool", - "documentation": {"kind": "markdown", "value": "```rescript\nnested: bool\n```\n\n```rescript\ntype nestedRecord = {nested: bool}\n```"} - }] + "label": "nested", + "tags": [] + } +] Complete src/CompletionPattern.res 76:8 posCursor:[76:8] posNoWhite:[76:7] Found pattern:[76:7->76:9] @@ -251,31 +355,56 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[f] Path f -[{ - "label": "first", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nfirst: int\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```"} - }, { - "label": "second", + "documentation": { + "kind": "markdown", + "value": "```rescript\nfirst: int\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```" + }, "kind": 5, - "tags": [], + "label": "first", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(bool, option)", - "documentation": {"kind": "markdown", "value": "```rescript\nsecond: (bool, option)\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```"} - }, { - "label": "optThird", + "documentation": { + "kind": "markdown", + "value": "```rescript\nsecond: (bool, option)\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```" + }, "kind": 5, - "tags": [], + "label": "second", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "option<[#first | #second(someRecord)]>", - "documentation": {"kind": "markdown", "value": "```rescript\noptThird: option<[#first | #second(someRecord)]>\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```"} - }, { - "label": "nest", + "documentation": { + "kind": "markdown", + "value": "```rescript\noptThird: option<[#first | #second(someRecord)]>\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```" + }, "kind": 5, - "tags": [], + "label": "optThird", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "nestedRecord", - "documentation": {"kind": "markdown", "value": "```rescript\nnest: nestedRecord\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nnest: nestedRecord\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```" + }, + "kind": 5, + "label": "nest", + "tags": [] + } +] Complete src/CompletionPattern.res 79:16 posCursor:[79:16] posNoWhite:[79:15] Found pattern:[79:7->79:18] @@ -286,13 +415,20 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[f] Path f -[{ - "label": "nested", +[ + { + "data": null, + "deprecated": false, + "detail": "bool", + "documentation": { + "kind": "markdown", + "value": "```rescript\nnested: bool\n```\n\n```rescript\ntype nestedRecord = {nested: bool}\n```" + }, "kind": 5, - "tags": [], - "detail": "bool", - "documentation": {"kind": "markdown", "value": "```rescript\nnested: bool\n```\n\n```rescript\ntype nestedRecord = {nested: bool}\n```"} - }] + "label": "nested", + "tags": [] + } +] Complete src/CompletionPattern.res 87:20 posCursor:[87:20] posNoWhite:[87:19] Found pattern:[87:16->87:21] @@ -304,19 +440,26 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[z] Path z -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "false", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] Complete src/CompletionPattern.res 90:21 posCursor:[90:21] posNoWhite:[90:20] Found pattern:[90:16->90:22] @@ -327,13 +470,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[z] Path z -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "true", + "tags": [] + } +] Complete src/CompletionPattern.res 93:23 posCursor:[93:23] posNoWhite:[93:22] Found pattern:[93:16->93:25] @@ -344,31 +491,56 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[z] Path z -[{ - "label": "first", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nfirst: int\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```"} - }, { - "label": "second", + "documentation": { + "kind": "markdown", + "value": "```rescript\nfirst: int\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```" + }, "kind": 5, - "tags": [], + "label": "first", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(bool, option)", - "documentation": {"kind": "markdown", "value": "```rescript\nsecond: (bool, option)\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```"} - }, { - "label": "optThird", + "documentation": { + "kind": "markdown", + "value": "```rescript\nsecond: (bool, option)\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```" + }, "kind": 5, - "tags": [], + "label": "second", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "option<[#first | #second(someRecord)]>", - "documentation": {"kind": "markdown", "value": "```rescript\noptThird: option<[#first | #second(someRecord)]>\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```"} - }, { - "label": "nest", + "documentation": { + "kind": "markdown", + "value": "```rescript\noptThird: option<[#first | #second(someRecord)]>\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```" + }, "kind": 5, - "tags": [], + "label": "optThird", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "nestedRecord", - "documentation": {"kind": "markdown", "value": "```rescript\nnest: nestedRecord\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nnest: nestedRecord\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```" + }, + "kind": 5, + "label": "nest", + "tags": [] + } +] Complete src/CompletionPattern.res 96:27 posCursor:[96:27] posNoWhite:[96:26] Found pattern:[96:16->96:28] @@ -380,13 +552,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[z] Path z -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "true", + "tags": [] + } +] Complete src/CompletionPattern.res 103:21 posCursor:[103:21] posNoWhite:[103:20] Found pattern:[103:16->103:22] @@ -397,19 +573,26 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[b] Path b -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "false", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] Complete src/CompletionPattern.res 106:22 posCursor:[106:22] posNoWhite:[106:21] Found pattern:[106:16->106:23] @@ -419,13 +602,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[b] Path b -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "true", + "tags": [] + } +] Complete src/CompletionPattern.res 109:24 posCursor:[109:24] posNoWhite:[109:23] Found pattern:[109:16->109:26] @@ -435,31 +622,56 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[b] Path b -[{ - "label": "first", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nfirst: int\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```"} - }, { - "label": "second", + "documentation": { + "kind": "markdown", + "value": "```rescript\nfirst: int\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```" + }, "kind": 5, - "tags": [], + "label": "first", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(bool, option)", - "documentation": {"kind": "markdown", "value": "```rescript\nsecond: (bool, option)\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```"} - }, { - "label": "optThird", + "documentation": { + "kind": "markdown", + "value": "```rescript\nsecond: (bool, option)\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```" + }, "kind": 5, - "tags": [], + "label": "second", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "option<[#first | #second(someRecord)]>", - "documentation": {"kind": "markdown", "value": "```rescript\noptThird: option<[#first | #second(someRecord)]>\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```"} - }, { - "label": "nest", + "documentation": { + "kind": "markdown", + "value": "```rescript\noptThird: option<[#first | #second(someRecord)]>\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```" + }, "kind": 5, - "tags": [], + "label": "optThird", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "nestedRecord", - "documentation": {"kind": "markdown", "value": "```rescript\nnest: nestedRecord\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nnest: nestedRecord\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```" + }, + "kind": 5, + "label": "nest", + "tags": [] + } +] Complete src/CompletionPattern.res 112:28 posCursor:[112:28] posNoWhite:[112:27] Found pattern:[112:16->112:29] @@ -470,13 +682,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[b] Path b -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "true", + "tags": [] + } +] Complete src/CompletionPattern.res 118:15 XXX Not found! @@ -485,16 +701,20 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[c] Path c -[{ - "label": "[]", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null, - "sortText": "A", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "[$0]", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "[]", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionPattern.res 121:17 posCursor:[121:17] posNoWhite:[121:16] Found pattern:[121:16->121:18] @@ -503,19 +723,26 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[c] Path c -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "false", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] Complete src/CompletionPattern.res 127:21 posCursor:[127:21] posNoWhite:[127:20] Found pattern:[127:16->127:22] @@ -527,19 +754,26 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[o] Path o -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "false", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] Complete src/CompletionPattern.res 134:23 posCursor:[134:23] posNoWhite:[134:22] Found pattern:[134:16->134:25] @@ -549,19 +783,26 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[p] Path p -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "false", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] Complete src/CompletionPattern.res 137:29 posCursor:[137:29] posNoWhite:[137:28] Found pattern:[137:16->137:31] @@ -572,33 +813,46 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[p] Path p -[{ - "label": "None", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "Some(_)", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "None", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "Some(${1:_})", - "insertTextFormat": 2 - }, { - "label": "Some(true)", - "kind": 4, - "tags": [], + "insertTextFormat": 2, + "kind": 12, + "label": "Some(_)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "Some(false)", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "Some(true)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "Some(false)", + "tags": [] + } +] Complete src/CompletionPattern.res 140:23 posCursor:[140:23] posNoWhite:[140:22] Found pattern:[140:16->140:31] @@ -609,19 +863,26 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[p] Path p -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "false", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] Complete src/CompletionPattern.res 143:35 posCursor:[143:35] posNoWhite:[143:34] Found pattern:[143:16->143:37] @@ -632,16 +893,20 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[p] Path p -[{ - "label": "[]", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null, - "sortText": "A", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "[$0]", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "[]", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionPattern.res 150:24 posCursor:[150:24] posNoWhite:[150:23] Found pattern:[150:16->150:26] @@ -650,19 +915,26 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[v] Path v -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "false", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] Complete src/CompletionPattern.res 153:30 posCursor:[153:30] posNoWhite:[153:29] Found pattern:[153:16->153:32] @@ -672,33 +944,46 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[v] Path v -[{ - "label": "None", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "Some(_)", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "None", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "Some(${1:_})", - "insertTextFormat": 2 - }, { - "label": "Some(true)", - "kind": 4, - "tags": [], + "insertTextFormat": 2, + "kind": 12, + "label": "Some(_)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "Some(false)", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "Some(true)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "Some(false)", + "tags": [] + } +] Complete src/CompletionPattern.res 156:24 posCursor:[156:24] posNoWhite:[156:23] Found pattern:[156:16->156:32] @@ -708,19 +993,26 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[v] Path v -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "false", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] Complete src/CompletionPattern.res 159:36 posCursor:[159:36] posNoWhite:[159:35] Found pattern:[159:16->159:38] @@ -730,16 +1022,20 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[v] Path v -[{ - "label": "[]", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null, - "sortText": "A", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "[$0]", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "[]", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionPattern.res 164:17 posCursor:[164:17] posNoWhite:[164:16] Found pattern:[164:16->164:18] @@ -749,19 +1045,26 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[s] Path s -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "false", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] Complete src/CompletionPattern.res 167:23 posCursor:[167:23] posNoWhite:[167:21] Found pattern:[167:16->167:24] @@ -770,33 +1073,46 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[s] Path s -[{ - "label": "None", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "Some(_)", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "None", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "Some(${1:_})", - "insertTextFormat": 2 - }, { - "label": "Some(true)", - "kind": 4, - "tags": [], + "insertTextFormat": 2, + "kind": 12, + "label": "Some(_)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "Some(false)", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "Some(true)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "Some(false)", + "tags": [] + } +] Complete src/CompletionPattern.res 170:22 posCursor:[170:22] posNoWhite:[170:21] Found pattern:[170:16->170:28] @@ -805,33 +1121,46 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[s] Path s -[{ - "label": "None", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "Some(_)", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "None", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "Some(${1:_})", - "insertTextFormat": 2 - }, { - "label": "Some(true)", - "kind": 4, - "tags": [], + "insertTextFormat": 2, + "kind": 12, + "label": "Some(_)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "Some(false)", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "Some(true)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "Some(false)", + "tags": [] + } +] Complete src/CompletionPattern.res 173:35 XXX Not found! @@ -840,15 +1169,19 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[s] Path s -[{ - "label": "(_, _, _)", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(bool, option, array)", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "(${1:_}, ${2:_}, ${3:_})", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "(_, _, _)", + "tags": [] + } +] Complete src/CompletionPattern.res 176:41 posCursor:[176:41] posNoWhite:[176:40] Found pattern:[176:35->176:47] @@ -857,33 +1190,46 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[s] Path s -[{ - "label": "None", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "Some(_)", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "None", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "Some(${1:_})", - "insertTextFormat": 2 - }, { - "label": "Some(true)", - "kind": 4, - "tags": [], + "insertTextFormat": 2, + "kind": 12, + "label": "Some(_)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "Some(false)", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "Some(true)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "Some(false)", + "tags": [] + } +] Complete src/CompletionPattern.res 179:21 XXX Not found! @@ -892,31 +1238,50 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[z] Path z -[{ - "label": "One", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "One", - "documentation": {"kind": "markdown", "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```" + }, "insertText": "One", - "insertTextFormat": 2 - }, { - "label": "Two(_)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "One", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Two(bool)", - "documentation": {"kind": "markdown", "value": "```rescript\nTwo(bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nTwo(bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```" + }, "insertText": "Two(${1:_})", - "insertTextFormat": 2 - }, { - "label": "Three(_, _)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "Two(_)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Three(someRecord, bool)", - "documentation": {"kind": "markdown", "value": "```rescript\nThree(someRecord, bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nThree(someRecord, bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```" + }, "insertText": "Three(${1:_}, ${2:_})", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "Three(_, _)", + "tags": [] + } +] Complete src/CompletionPattern.res 182:32 posCursor:[182:32] posNoWhite:[182:31] Found pattern:[182:16->182:34] @@ -927,19 +1292,26 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[z] Path z -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "false", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] Complete src/CompletionPattern.res 185:48 posCursor:[185:48] posNoWhite:[185:47] Found pattern:[185:16->185:50] @@ -951,19 +1323,26 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[z] Path z -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "false", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] Complete src/CompletionPattern.res 188:34 posCursor:[188:34] posNoWhite:[188:33] Found pattern:[188:16->188:36] @@ -973,19 +1352,26 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[b] Path b -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "false", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] Complete src/CompletionPattern.res 191:50 posCursor:[191:50] posNoWhite:[191:49] Found pattern:[191:16->191:52] @@ -996,19 +1382,26 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[b] Path b -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "false", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] Complete src/CompletionPattern.res 194:24 posCursor:[194:24] posNoWhite:[194:23] Found pattern:[194:16->194:29] @@ -1018,33 +1411,46 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[s] Path s -[{ - "label": "None", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "Some(_)", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "None", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "Some(${1:_})", - "insertTextFormat": 2 - }, { - "label": "Some(true)", - "kind": 4, - "tags": [], + "insertTextFormat": 2, + "kind": 12, + "label": "Some(_)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "Some(false)", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "Some(true)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "Some(false)", + "tags": [] + } +] Complete src/CompletionPattern.res 201:25 posCursor:[201:25] posNoWhite:[201:24] Found pattern:[201:17->201:28] @@ -1062,13 +1468,20 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[xn] Path xn -[{ - "label": "Exn.Error(error)", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "Catches errors from JavaScript errors.", - "documentation": {"kind": "markdown", "value": "Matches on a JavaScript error. Read more in the [documentation on catching JS exceptions](https://rescript-lang.org/docs/manual/latest/exception#catching-js-exceptions)."} - }] + "documentation": { + "kind": "markdown", + "value": "Matches on a JavaScript error. Read more in the [documentation on catching JS exceptions](https://rescript-lang.org/docs/manual/latest/exception#catching-js-exceptions)." + }, + "kind": 4, + "label": "Exn.Error(error)", + "tags": [] + } +] Complete src/CompletionPattern.res 211:30 XXX Not found! @@ -1079,31 +1492,50 @@ ContextPath await Value[getThing](Nolabel) ContextPath Value[getThing](Nolabel) ContextPath Value[getThing] Path getThing -[{ - "label": "One", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "One", - "documentation": {"kind": "markdown", "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```" + }, "insertText": "One", - "insertTextFormat": 2 - }, { - "label": "Two(_)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "One", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Two(bool)", - "documentation": {"kind": "markdown", "value": "```rescript\nTwo(bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nTwo(bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```" + }, "insertText": "Two(${1:_})", - "insertTextFormat": 2 - }, { - "label": "Three(_, _)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "Two(_)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Three(someRecord, bool)", - "documentation": {"kind": "markdown", "value": "```rescript\nThree(someRecord, bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nThree(someRecord, bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```" + }, "insertText": "Three(${1:_}, ${2:_})", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "Three(_, _)", + "tags": [] + } +] Complete src/CompletionPattern.res 216:21 posCursor:[216:21] posNoWhite:[216:20] Found pattern:[216:18->216:22] @@ -1115,31 +1547,50 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[res] Path res -[{ - "label": "One", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "One", - "documentation": {"kind": "markdown", "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```" + }, "insertText": "One", - "insertTextFormat": 2 - }, { - "label": "Two(_)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "One", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Two(bool)", - "documentation": {"kind": "markdown", "value": "```rescript\nTwo(bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nTwo(bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```" + }, "insertText": "Two(${1:_})", - "insertTextFormat": 2 - }, { - "label": "Three(_, _)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "Two(_)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Three(someRecord, bool)", - "documentation": {"kind": "markdown", "value": "```rescript\nThree(someRecord, bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nThree(someRecord, bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```" + }, "insertText": "Three(${1:_}, ${2:_})", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "Three(_, _)", + "tags": [] + } +] Complete src/CompletionPattern.res 219:24 posCursor:[219:24] posNoWhite:[219:23] Found pattern:[219:18->219:25] @@ -1151,31 +1602,50 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[res] Path res -[{ - "label": "#one", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "#one", - "documentation": {"kind": "markdown", "value": "```rescript\n#one\n```\n\n```rescript\n[#one | #three(someRecord, bool) | #two(bool)]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#one\n```\n\n```rescript\n[#one | #three(someRecord, bool) | #two(bool)]\n```" + }, "insertText": "#one", - "insertTextFormat": 2 - }, { - "label": "#three(_, _)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "#one", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "#three(someRecord, bool)", - "documentation": {"kind": "markdown", "value": "```rescript\n#three(someRecord, bool)\n```\n\n```rescript\n[#one | #three(someRecord, bool) | #two(bool)]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#three(someRecord, bool)\n```\n\n```rescript\n[#one | #three(someRecord, bool) | #two(bool)]\n```" + }, "insertText": "#three(${1:_}, ${2:_})", - "insertTextFormat": 2 - }, { - "label": "#two(_)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "#three(_, _)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "#two(bool)", - "documentation": {"kind": "markdown", "value": "```rescript\n#two(bool)\n```\n\n```rescript\n[#one | #three(someRecord, bool) | #two(bool)]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#two(bool)\n```\n\n```rescript\n[#one | #three(someRecord, bool) | #two(bool)]\n```" + }, "insertText": "#two(${1:_})", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "#two(_)", + "tags": [] + } +] Complete src/CompletionPattern.res 227:25 posCursor:[227:25] posNoWhite:[227:24] Found expr:[223:11->232:1] @@ -1187,25 +1657,44 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[r] Path r -[{ - "label": "second", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(bool, option)", - "documentation": {"kind": "markdown", "value": "```rescript\nsecond: (bool, option)\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```"} - }, { - "label": "optThird", + "documentation": { + "kind": "markdown", + "value": "```rescript\nsecond: (bool, option)\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```" + }, "kind": 5, - "tags": [], + "label": "second", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "option<[#first | #second(someRecord)]>", - "documentation": {"kind": "markdown", "value": "```rescript\noptThird: option<[#first | #second(someRecord)]>\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```"} - }, { - "label": "nest", + "documentation": { + "kind": "markdown", + "value": "```rescript\noptThird: option<[#first | #second(someRecord)]>\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```" + }, "kind": 5, - "tags": [], + "label": "optThird", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "nestedRecord", - "documentation": {"kind": "markdown", "value": "```rescript\nnest: nestedRecord\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nnest: nestedRecord\n```\n\n```rescript\ntype someRecord = {first: int, second: (bool, option), optThird: option<[#first | #second(someRecord)]>, nest: nestedRecord}\n```" + }, + "kind": 5, + "label": "nest", + "tags": [] + } +] Complete src/CompletionPattern.res 243:33 posCursor:[243:33] posNoWhite:[243:32] Found pattern:[243:7->243:35] @@ -1215,11 +1704,18 @@ Resolved opens 1 Stdlib ContextPath Value[hitsUse](Nolabel) ContextPath Value[hitsUse] Path hitsUse -[{ - "label": "hits", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "array", - "documentation": {"kind": "markdown", "value": "```rescript\nhits: array\n```\n\n```rescript\ntype hitsUse = {results: results, hits: array}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nhits: array\n```\n\n```rescript\ntype hitsUse = {results: results, hits: array}\n```" + }, + "kind": 5, + "label": "hits", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/CompletionPipeChain.res.txt b/tests/analysis_tests/tests/src/expected/CompletionPipeChain.res.txt index 1519636e45b..f4388646a62 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionPipeChain.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionPipeChain.res.txt @@ -1,3 +1,4 @@ +null Complete src/CompletionPipeChain.res 27:16 posCursor:[27:16] posNoWhite:[27:15] Found expr:[27:11->0:-1] Completable: Cpath Value[int]-> @@ -9,31 +10,44 @@ Path int CPPipe pathFromEnv:Integer found:true Path Integer. Path -[{ - "label": "Integer.toInt", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => int", - "documentation": null - }, { - "label": "Integer.increment", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "Integer.toInt", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(t, int) => t", - "documentation": null - }, { - "label": "Integer.decrement", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "Integer.increment", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(t, int => int) => t", - "documentation": null - }, { - "label": "toFlt", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "Integer.decrement", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Integer.t => SuperFloat.t", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "toFlt", + "tags": [] + } +] Complete src/CompletionPipeChain.res 30:23 posCursor:[30:23] posNoWhite:[30:22] Found expr:[30:11->0:-1] @@ -47,13 +61,17 @@ Path toFlt CPPipe pathFromEnv:SuperFloat found:true Path SuperFloat. Path -[{ - "label": "SuperFloat.toInteger", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => Integer.t", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "SuperFloat.toInteger", + "tags": [] + } +] Complete src/CompletionPipeChain.res 33:38 posCursor:[33:38] posNoWhite:[33:37] Found expr:[33:11->0:-1] @@ -67,31 +85,44 @@ Path Integer.increment CPPipe pathFromEnv:Integer found:true Path Integer. Path -[{ - "label": "Integer.toInt", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => int", - "documentation": null - }, { - "label": "Integer.increment", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "Integer.toInt", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(t, int) => t", - "documentation": null - }, { - "label": "Integer.decrement", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "Integer.increment", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(t, int => int) => t", - "documentation": null - }, { - "label": "toFlt", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "Integer.decrement", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Integer.t => SuperFloat.t", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "toFlt", + "tags": [] + } +] Complete src/CompletionPipeChain.res 36:38 posCursor:[36:38] posNoWhite:[36:37] Found expr:[36:11->0:-1] @@ -105,31 +136,44 @@ Path Integer.increment CPPipe pathFromEnv:Integer found:true Path Integer. Path -[{ - "label": "Integer.toInt", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => int", - "documentation": null - }, { - "label": "Integer.increment", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "Integer.toInt", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(t, int) => t", - "documentation": null - }, { - "label": "Integer.decrement", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "Integer.increment", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(t, int => int) => t", - "documentation": null - }, { - "label": "toFlt", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "Integer.decrement", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Integer.t => SuperFloat.t", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "toFlt", + "tags": [] + } +] Complete src/CompletionPipeChain.res 39:47 posCursor:[39:47] posNoWhite:[39:46] Found expr:[39:11->0:-1] @@ -143,31 +187,44 @@ Path Integer.decrement CPPipe pathFromEnv:Integer found:true Path Integer. Path -[{ - "label": "Integer.toInt", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => int", - "documentation": null - }, { - "label": "Integer.increment", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "Integer.toInt", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(t, int) => t", - "documentation": null - }, { - "label": "Integer.decrement", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "Integer.increment", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(t, int => int) => t", - "documentation": null - }, { - "label": "toFlt", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "Integer.decrement", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Integer.t => SuperFloat.t", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "toFlt", + "tags": [] + } +] Complete src/CompletionPipeChain.res 42:69 posCursor:[42:69] posNoWhite:[42:68] Found expr:[42:11->0:-1] @@ -181,31 +238,44 @@ Path Integer.decrement CPPipe pathFromEnv:Integer found:true Path Integer. Path -[{ - "label": "Integer.toInt", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => int", - "documentation": null - }, { - "label": "Integer.increment", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "Integer.toInt", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(t, int) => t", - "documentation": null - }, { - "label": "Integer.decrement", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "Integer.increment", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(t, int => int) => t", - "documentation": null - }, { - "label": "toFlt", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "Integer.decrement", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Integer.t => SuperFloat.t", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "toFlt", + "tags": [] + } +] Complete src/CompletionPipeChain.res 45:62 posCursor:[45:62] posNoWhite:[45:61] Found expr:[45:11->0:-1] @@ -219,13 +289,17 @@ Path SuperFloat.fromInteger CPPipe pathFromEnv:SuperFloat found:true Path SuperFloat. Path -[{ - "label": "SuperFloat.toInteger", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => Integer.t", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "SuperFloat.toInteger", + "tags": [] + } +] Complete src/CompletionPipeChain.res 48:63 posCursor:[48:63] posNoWhite:[48:62] Found expr:[48:11->48:63] @@ -239,13 +313,17 @@ Path SuperFloat.fromInteger CPPipe pathFromEnv:SuperFloat found:true Path SuperFloat.t Path t -[{ - "label": "SuperFloat.toInteger", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => Integer.t", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "SuperFloat.toInteger", + "tags": [] + } +] Complete src/CompletionPipeChain.res 51:82 posCursor:[51:82] posNoWhite:[51:81] Found expr:[51:11->0:-1] @@ -259,19 +337,26 @@ Path CompletionSupport.Test.make CPPipe pathFromEnv:Test found:true Path CompletionSupport.Test. Path -[{ - "label": "CompletionSupport.Test.add", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => int", - "documentation": null - }, { - "label": "CompletionSupport.Test.addSelf", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "CompletionSupport.Test.add", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "t => t", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "CompletionSupport.Test.addSelf", + "tags": [] + } +] Complete src/CompletionPipeChain.res 54:78 posCursor:[54:78] posNoWhite:[54:77] Found expr:[54:11->0:-1] @@ -285,19 +370,26 @@ Path CompletionSupport.Test.addSelf CPPipe pathFromEnv:Test found:true Path CompletionSupport.Test. Path -[{ - "label": "CompletionSupport.Test.add", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => int", - "documentation": null - }, { - "label": "CompletionSupport.Test.addSelf", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "CompletionSupport.Test.add", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "t => t", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "CompletionSupport.Test.addSelf", + "tags": [] + } +] Complete src/CompletionPipeChain.res 58:5 posCursor:[58:5] posNoWhite:[58:4] Found expr:[57:8->0:-1] @@ -324,67 +416,128 @@ ContextPath Value[Belt, Array, reduce] Path Belt.Array.reduce Path Stdlib.Int.t Path t -[{ - "label": "Int.toStringWithRadix", - "kind": 12, - "tags": [1], +[ + { + "data": null, + "deprecated": true, "detail": "(int, ~radix: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toString` instead\n\n\n`toStringWithRadix(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toStringWithRadix(6, ~radix=2) // \"110\"\nInt.toStringWithRadix(373592855, ~radix=16) // \"16449317\"\nInt.toStringWithRadix(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n"} - }, { - "label": "Int.toExponentialWithPrecision", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toString` instead\n\n\n`toStringWithRadix(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toStringWithRadix(6, ~radix=2) // \"110\"\nInt.toStringWithRadix(373592855, ~radix=16) // \"16449317\"\nInt.toStringWithRadix(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n" + }, "kind": 12, - "tags": [1], + "label": "Int.toStringWithRadix", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": true, "detail": "(int, ~digits: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toExponential` instead\n\n\n`toExponential(n, ~digits)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point. See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\non MDN.\n\n## Examples\n\n```rescript\nInt.toExponentialWithPrecision(77, ~digits=2) // \"7.70e+1\"\nInt.toExponentialWithPrecision(5678, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10.\n"} - }, { - "label": "Int.toFixedWithPrecision", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toExponential` instead\n\n\n`toExponential(n, ~digits)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point. See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\non MDN.\n\n## Examples\n\n```rescript\nInt.toExponentialWithPrecision(77, ~digits=2) // \"7.70e+1\"\nInt.toExponentialWithPrecision(5678, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10.\n" + }, "kind": 12, - "tags": [1], + "label": "Int.toExponentialWithPrecision", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": true, "detail": "(int, ~digits: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toFixed` instead\n\n\n`toFixedWithPrecision(n, ~digits)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point. See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)\non MDN.\n\n## Examples\n\n```rescript\nInt.toFixedWithPrecision(300, ~digits=4) // \"300.0000\"\nInt.toFixedWithPrecision(300, ~digits=1) // \"300.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is less than 0 or larger than 100.\n"} - }, { - "label": "Int.toPrecisionWithPrecision", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toFixed` instead\n\n\n`toFixedWithPrecision(n, ~digits)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point. See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)\non MDN.\n\n## Examples\n\n```rescript\nInt.toFixedWithPrecision(300, ~digits=4) // \"300.0000\"\nInt.toFixedWithPrecision(300, ~digits=1) // \"300.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is less than 0 or larger than 100.\n" + }, "kind": 12, - "tags": [1], + "label": "Int.toFixedWithPrecision", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": true, "detail": "(int, ~digits: int) => string", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `toPrecision` instead\n\n\n`toPrecisionWithPrecision(n, ~digits)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits. See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nInt.toPrecisionWithPrecision(100, ~digits=2) // \"1.0e+2\"\nInt.toPrecisionWithPrecision(1, ~digits=2) // \"1.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\n Implementations are allowed to support larger and smaller values as well.\n ECMA-262 only requires a precision of up to 21 significant digits.\n"} - }, { - "label": "Int.toPrecision", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `toPrecision` instead\n\n\n`toPrecisionWithPrecision(n, ~digits)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits. See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nInt.toPrecisionWithPrecision(100, ~digits=2) // \"1.0e+2\"\nInt.toPrecisionWithPrecision(1, ~digits=2) // \"1.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\n Implementations are allowed to support larger and smaller values as well.\n ECMA-262 only requires a precision of up to 21 significant digits.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toPrecisionWithPrecision", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~digits: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toPrecision(n, ~digits=?)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits. See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nInt.toPrecision(100) // \"100\"\nInt.toPrecision(1) // \"1\"\nInt.toPrecision(100, ~digits=2) // \"1.0e+2\"\nInt.toPrecision(1, ~digits=2) // \"1.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\n Implementations are allowed to support larger and smaller values as well.\n ECMA-262 only requires a precision of up to 21 significant digits.\n"} - }, { - "label": "Int.toString", + "documentation": { + "kind": "markdown", + "value": "\n`toPrecision(n, ~digits=?)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits. See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nInt.toPrecision(100) // \"100\"\nInt.toPrecision(1) // \"1\"\nInt.toPrecision(100, ~digits=2) // \"1.0e+2\"\nInt.toPrecision(1, ~digits=2) // \"1.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\n Implementations are allowed to support larger and smaller values as well.\n ECMA-262 only requires a precision of up to 21 significant digits.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toPrecision", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~radix: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toString(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toString(1000) // \"1000\"\nInt.toString(-1000) // \"-1000\"\nInt.toString(6, ~radix=2) // \"110\"\nInt.toString(373592855, ~radix=16) // \"16449317\"\nInt.toString(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n"} - }, { - "label": "Int.toFloat", + "documentation": { + "kind": "markdown", + "value": "\n`toString(n, ~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)\non MDN.\n\n## Examples\n\n```rescript\nInt.toString(1000) // \"1000\"\nInt.toString(-1000) // \"-1000\"\nInt.toString(6, ~radix=2) // \"110\"\nInt.toString(373592855, ~radix=16) // \"16449317\"\nInt.toString(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toString", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int => float", - "documentation": {"kind": "markdown", "value": "\n`toFloat(n)` return a `float` representing the given value.\n\n## Examples\n\n```rescript\nInt.toFloat(100) == 100.0\nInt.toFloat(2) == 2.0\n```\n"} - }, { - "label": "Int.toLocaleString", + "documentation": { + "kind": "markdown", + "value": "\n`toFloat(n)` return a `float` representing the given value.\n\n## Examples\n\n```rescript\nInt.toFloat(100) == 100.0\nInt.toFloat(2) == 2.0\n```\n" + }, "kind": 12, - "tags": [], + "label": "Int.toFloat", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int => string", - "documentation": {"kind": "markdown", "value": "\n`toLocaleString(n)` return a `string` with language-sensitive representing the\ngiven value. See [`Number.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString) on MDN.\n\n## Examples\n\n```rescript\n// If the application uses English as the default language\nInt.toLocaleString(1000) // \"1,000\"\n\n// If the application uses Portuguese Brazil as the default language\nInt.toLocaleString(1000) // \"1.000\"\n```\n"} - }, { - "label": "Int.toExponential", + "documentation": { + "kind": "markdown", + "value": "\n`toLocaleString(n)` return a `string` with language-sensitive representing the\ngiven value. See [`Number.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString) on MDN.\n\n## Examples\n\n```rescript\n// If the application uses English as the default language\nInt.toLocaleString(1000) // \"1,000\"\n\n// If the application uses Portuguese Brazil as the default language\nInt.toLocaleString(1000) // \"1.000\"\n```\n" + }, "kind": 12, - "tags": [], + "label": "Int.toLocaleString", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~digits: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toExponential(n, ~digits=?)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point. See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\n\n## Examples\n\n```rescript\nInt.toExponential(1000) // \"1e+3\"\nInt.toExponential(-1000) // \"-1e+3\"\nInt.toExponential(77, ~digits=2) // \"7.70e+1\"\nInt.toExponential(5678, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10.\n"} - }, { - "label": "Int.toFixed", + "documentation": { + "kind": "markdown", + "value": "\n`toExponential(n, ~digits=?)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point. See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\n\n## Examples\n\n```rescript\nInt.toExponential(1000) // \"1e+3\"\nInt.toExponential(-1000) // \"-1e+3\"\nInt.toExponential(77, ~digits=2) // \"7.70e+1\"\nInt.toExponential(5678, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10.\n" + }, "kind": 12, - "tags": [], + "label": "Int.toExponential", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(int, ~digits: int=?) => string", - "documentation": {"kind": "markdown", "value": "\n`toFixed(n, ~digits=?)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point. See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)\non MDN.\n\n## Examples\n\n```rescript\nInt.toFixed(123456) // \"123456.00\"\nInt.toFixed(10) // \"10.00\"\nInt.toFixed(300, ~digits=4) // \"300.0000\"\nInt.toFixed(300, ~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(n, ~digits=?)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point. See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)\non MDN.\n\n## Examples\n\n```rescript\nInt.toFixed(123456) // \"123456.00\"\nInt.toFixed(10) // \"10.00\"\nInt.toFixed(300, ~digits=4) // \"300.0000\"\nInt.toFixed(300, ~digits=1) // \"300.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is less than 0 or larger than 100.\n" + }, + "kind": 12, + "label": "Int.toFixed", + "tags": [] + } +] Complete src/CompletionPipeChain.res 70:12 posCursor:[70:12] posNoWhite:[70:11] Found expr:[70:3->0:-1] @@ -397,19 +550,26 @@ Path aliased CPPipe pathFromEnv:CompletionSupport.Test found:false Path CompletionSupport.Test. Path -[{ - "label": "CompletionSupport.Test.add", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => int", - "documentation": null - }, { - "label": "CompletionSupport.Test.addSelf", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "CompletionSupport.Test.add", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "t => t", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "CompletionSupport.Test.addSelf", + "tags": [] + } +] Complete src/CompletionPipeChain.res 73:15 posCursor:[73:15] posNoWhite:[73:14] Found expr:[73:3->0:-1] @@ -422,19 +582,26 @@ Path notAliased CPPipe pathFromEnv:CompletionSupport.Test found:false Path CompletionSupport.Test. Path -[{ - "label": "CompletionSupport.Test.add", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => int", - "documentation": null - }, { - "label": "CompletionSupport.Test.addSelf", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "CompletionSupport.Test.add", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "t => t", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "CompletionSupport.Test.addSelf", + "tags": [] + } +] Complete src/CompletionPipeChain.res 82:30 posCursor:[82:30] posNoWhite:[82:29] Found expr:[76:15->93:1] @@ -473,13 +640,17 @@ Path root CPPipe pathFromEnv:ReactDOM.Client.Root found:false Path ReactDOM.Client.Root.ren Path ren -[{ - "label": "ReactDOM.Client.Root.render", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(t, React.element) => unit", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "ReactDOM.Client.Root.render", + "tags": [] + } +] Complete src/CompletionPipeChain.res 88:16 posCursor:[88:16] posNoWhite:[88:15] Found expr:[76:15->93:1] @@ -499,13 +670,17 @@ Path root CPPipe pathFromEnv:ReactDOM.Client.Root found:false Path ReactDOM.Client.Root.ren Path ren -[{ - "label": "ReactDOM.Client.Root.render", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(t, React.element) => unit", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "ReactDOM.Client.Root.render", + "tags": [] + } +] Complete src/CompletionPipeChain.res 95:20 posCursor:[95:20] posNoWhite:[95:19] Found expr:[95:3->95:21] @@ -521,31 +696,44 @@ Path int CPPipe pathFromEnv:Integer found:true Path Integer. Path -[{ - "label": "Integer.toInt", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => int", - "documentation": null - }, { - "label": "Integer.increment", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "Integer.toInt", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(t, int) => t", - "documentation": null - }, { - "label": "Integer.decrement", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "Integer.increment", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(t, int => int) => t", - "documentation": null - }, { - "label": "toFlt", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "Integer.decrement", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Integer.t => SuperFloat.t", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "toFlt", + "tags": [] + } +] Complete src/CompletionPipeChain.res 98:21 posCursor:[98:21] posNoWhite:[98:20] Found expr:[98:3->98:22] @@ -560,19 +748,26 @@ Path int CPPipe pathFromEnv:Integer found:true Path Integer.t Path t -[{ - "label": "Integer.toInt", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => int", - "documentation": null - }, { - "label": "toFlt", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "Integer.toInt", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Integer.t => SuperFloat.t", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "toFlt", + "tags": [] + } +] Complete src/CompletionPipeChain.res 103:8 posCursor:[103:8] posNoWhite:[103:7] Found expr:[103:3->103:8] @@ -584,13 +779,20 @@ ContextPath Value[r] Path r Path Stdlib.RegExp.la Path la -[{ - "label": "RegExp.lastIndex", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => int", - "documentation": {"kind": "markdown", "value": "\n`lastIndex(regexp)` returns the index the next match will start from.\n\nSee [`RegExp.lastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\nlet someStr = \"Many words here.\"\n\nConsole.log(regexp->RegExp.lastIndex) // Logs `0` to the console\n\nregexp->RegExp.exec(someStr)->ignore\n\nConsole.log(regexp->RegExp.lastIndex) // Logs `4` to the console\n```\n"} - }] + "documentation": { + "kind": "markdown", + "value": "\n`lastIndex(regexp)` returns the index the next match will start from.\n\nSee [`RegExp.lastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\nlet someStr = \"Many words here.\"\n\nConsole.log(regexp->RegExp.lastIndex) // Logs `0` to the console\n\nregexp->RegExp.exec(someStr)->ignore\n\nConsole.log(regexp->RegExp.lastIndex) // Logs `4` to the console\n```\n" + }, + "kind": 12, + "label": "RegExp.lastIndex", + "tags": [] + } +] Complete src/CompletionPipeChain.res 112:7 posCursor:[112:7] posNoWhite:[112:6] Found expr:[112:3->0:-1] @@ -603,11 +805,15 @@ Path xx CPPipe pathFromEnv:Xyz found:true Path Xyz. Path -[{ - "label": "Xyz.do", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "xx => string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "Xyz.do", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/CompletionPipeProperty.res.txt b/tests/analysis_tests/tests/src/expected/CompletionPipeProperty.res.txt index 29d9652878d..6f20f9d38f3 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionPipeProperty.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionPipeProperty.res.txt @@ -1,3 +1,4 @@ +null Complete src/CompletionPipeProperty.res 21:17 posCursor:[21:17] posNoWhite:[21:16] Found expr:[21:3->21:17] Pexp_field [21:3->21:16] _:[23:0->21:17] @@ -27,41 +28,70 @@ Path anchor CPPipe pathFromEnv:ObservablePoint found:true Path ObservablePoint. Path -[{ - "label": "x", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nx: int\n```\n\n```rescript\ntype op = {mutable x: int, mutable y: int}\n```"} - }, { - "label": "y", + "documentation": { + "kind": "markdown", + "value": "```rescript\nx: int\n```\n\n```rescript\ntype op = {mutable x: int, mutable y: int}\n```" + }, "kind": 5, - "tags": [], + "label": "x", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\ny: int\n```\n\n```rescript\ntype op = {mutable x: int, mutable y: int}\n```"} - }, { - "label": "->ObservablePoint.setBoth", - "kind": 12, - "tags": [], + "documentation": { + "kind": "markdown", + "value": "```rescript\ny: int\n```\n\n```rescript\ntype op = {mutable x: int, mutable y: int}\n```" + }, + "kind": 5, + "label": "y", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 21 }, + "start": { "character": 16, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(op, float) => unit", - "documentation": null, - "sortText": "setBoth", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->ObservablePoint.setBoth", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 16}, "end": {"line": 21, "character": 17}}, - "newText": "" - }] - }, { - "label": "->ObservablePoint.set", "kind": 12, - "tags": [], + "label": "->ObservablePoint.setBoth", + "sortText": "setBoth", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 21 }, + "start": { "character": 16, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(op, float, float) => unit", - "documentation": null, - "sortText": "set", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->ObservablePoint.set", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 16}, "end": {"line": 21, "character": 17}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->ObservablePoint.set", + "sortText": "set", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/CompletionPipeSubmodules.res.txt b/tests/analysis_tests/tests/src/expected/CompletionPipeSubmodules.res.txt index 8c6ad205056..9dd64f30e1d 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionPipeSubmodules.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionPipeSubmodules.res.txt @@ -1,3 +1,4 @@ +null Complete src/CompletionPipeSubmodules.res 13:20 posCursor:[13:20] posNoWhite:[13:19] Found expr:[13:11->23:23] Pexp_apply ...[21:9->21:10] (...[13:11->21:8], ...[23:2->23:23]) @@ -11,13 +12,17 @@ Path A.B1.xx CPPipe pathFromEnv:A.B1 found:true Path A.B1. Path -[{ - "label": "A.B1.d", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "b1 => string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "A.B1.d", + "tags": [] + } +] Complete src/CompletionPipeSubmodules.res 17:18 posCursor:[17:18] posNoWhite:[17:17] Found expr:[17:11->23:23] @@ -39,13 +44,17 @@ Path v CPPipe pathFromEnv:A.B1 found:true Path A.B1. Path -[{ - "label": "A.B1.d", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "b1 => string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "A.B1.d", + "tags": [] + } +] Complete src/CompletionPipeSubmodules.res 41:20 posCursor:[41:20] posNoWhite:[41:19] Found expr:[41:11->0:-1] @@ -79,13 +88,17 @@ Path v CPPipe pathFromEnv:C found:false Path C. Path -[{ - "label": "C.do", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "C.do", + "tags": [] + } +] Complete src/CompletionPipeSubmodules.res 45:21 posCursor:[45:21] posNoWhite:[45:20] Found expr:[45:11->0:-1] @@ -119,11 +132,15 @@ Path v2 CPPipe pathFromEnv:D.C2 found:true Path D.C2. Path -[{ - "label": "D.C2.do", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t2 => string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "D.C2.do", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/CompletionRegexp.res.txt b/tests/analysis_tests/tests/src/expected/CompletionRegexp.res.txt index 053f84b1d04..5a2363e2f2b 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionRegexp.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionRegexp.res.txt @@ -1,3 +1,4 @@ +null Complete src/CompletionRegexp.res 1:17 posCursor:[1:17] posNoWhite:[1:16] Found expr:[1:3->0:-1] Completable: Cpath Value[emailPattern]-> @@ -8,77 +9,150 @@ ContextPath Value[emailPattern] Path emailPattern Path Stdlib.RegExp. Path -[{ - "label": "RegExp.lastIndex", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => int", - "documentation": {"kind": "markdown", "value": "\n`lastIndex(regexp)` returns the index the next match will start from.\n\nSee [`RegExp.lastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\nlet someStr = \"Many words here.\"\n\nConsole.log(regexp->RegExp.lastIndex) // Logs `0` to the console\n\nregexp->RegExp.exec(someStr)->ignore\n\nConsole.log(regexp->RegExp.lastIndex) // Logs `4` to the console\n```\n"} - }, { - "label": "RegExp.setLastIndex", + "documentation": { + "kind": "markdown", + "value": "\n`lastIndex(regexp)` returns the index the next match will start from.\n\nSee [`RegExp.lastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\nlet someStr = \"Many words here.\"\n\nConsole.log(regexp->RegExp.lastIndex) // Logs `0` to the console\n\nregexp->RegExp.exec(someStr)->ignore\n\nConsole.log(regexp->RegExp.lastIndex) // Logs `4` to the console\n```\n" + }, "kind": 12, - "tags": [], + "label": "RegExp.lastIndex", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(t, int) => unit", - "documentation": {"kind": "markdown", "value": "\n`setLastIndex(regexp, index)` set the index the next match will start from.\n\nSee [`RegExp.lastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\nlet someStr = \"Many words here.\"\n\nregexp->RegExp.setLastIndex(4)\nregexp->RegExp.exec(someStr)->ignore\n\nConsole.log(regexp->RegExp.lastIndex) // Logs `10` to the console\n```\n"} - }, { - "label": "RegExp.sticky", + "documentation": { + "kind": "markdown", + "value": "\n`setLastIndex(regexp, index)` set the index the next match will start from.\n\nSee [`RegExp.lastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\nlet someStr = \"Many words here.\"\n\nregexp->RegExp.setLastIndex(4)\nregexp->RegExp.exec(someStr)->ignore\n\nConsole.log(regexp->RegExp.lastIndex) // Logs `10` to the console\n```\n" + }, "kind": 12, - "tags": [], + "label": "RegExp.setLastIndex", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "t => bool", - "documentation": {"kind": "markdown", "value": "\n`sticky(regexp)` returns whether the sticky (`y`) flag is set on this `RegExp`.\n\nSee [`RegExp.sticky`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.unicode) // Logs `false`, since `y` is not set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"my\")\nConsole.log(regexp2->RegExp.unicode) // Logs `true`, since `y` is set\n```\n"} - }, { - "label": "RegExp.ignore", + "documentation": { + "kind": "markdown", + "value": "\n`sticky(regexp)` returns whether the sticky (`y`) flag is set on this `RegExp`.\n\nSee [`RegExp.sticky`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.unicode) // Logs `false`, since `y` is not set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"my\")\nConsole.log(regexp2->RegExp.unicode) // Logs `true`, since `y` is set\n```\n" + }, "kind": 12, - "tags": [], + "label": "RegExp.sticky", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "t => unit", - "documentation": {"kind": "markdown", "value": "\n `ignore(regExp)` ignores the provided regExp 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": "RegExp.exec", + "documentation": { + "kind": "markdown", + "value": "\n `ignore(regExp)` ignores the provided regExp 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" + }, "kind": 12, - "tags": [], + "label": "RegExp.ignore", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(t, string) => option", - "documentation": {"kind": "markdown", "value": "\n`exec(regexp, string)` executes the provided regexp on the provided string, optionally returning a `RegExp.Result.t` if the regexp matches on the string.\n\nSee [`RegExp.exec`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\n\nswitch regexp->RegExp.exec(\"ReScript is pretty cool, right?\") {\n| None => Console.log(\"Nope, no match...\")\n| Some(result) => Console.log(result->RegExp.Result.fullMatch) // Prints \"ReScript\"\n}\n```\n"} - }, { - "label": "RegExp.ignoreCase", + "documentation": { + "kind": "markdown", + "value": "\n`exec(regexp, string)` executes the provided regexp on the provided string, optionally returning a `RegExp.Result.t` if the regexp matches on the string.\n\nSee [`RegExp.exec`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\n\nswitch regexp->RegExp.exec(\"ReScript is pretty cool, right?\") {\n| None => Console.log(\"Nope, no match...\")\n| Some(result) => Console.log(result->RegExp.Result.fullMatch) // Prints \"ReScript\"\n}\n```\n" + }, "kind": 12, - "tags": [], + "label": "RegExp.exec", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "t => bool", - "documentation": {"kind": "markdown", "value": "\n`ignoreCase(regexp)` returns whether the ignore case (`i`) flag is set on this `RegExp`.\n\nSee [`RegExp.ignoreCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/ignoreCase) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.ignoreCase) // Logs `false`, since `i` is not set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"i\")\nConsole.log(regexp2->RegExp.ignoreCase) // Logs `true`, since `i` is set\n```\n"} - }, { - "label": "RegExp.global", + "documentation": { + "kind": "markdown", + "value": "\n`ignoreCase(regexp)` returns whether the ignore case (`i`) flag is set on this `RegExp`.\n\nSee [`RegExp.ignoreCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/ignoreCase) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.ignoreCase) // Logs `false`, since `i` is not set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"i\")\nConsole.log(regexp2->RegExp.ignoreCase) // Logs `true`, since `i` is set\n```\n" + }, "kind": 12, - "tags": [], + "label": "RegExp.ignoreCase", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "t => bool", - "documentation": {"kind": "markdown", "value": "\n`global(regexp)` returns whether the global (`g`) flag is set on this `RegExp`.\n\nSee [`RegExp.global`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/global) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.global) // Logs `true`, since `g` is set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"i\")\nConsole.log(regexp2->RegExp.global) // Logs `false`, since `g` is not set\n```\n"} - }, { - "label": "RegExp.multiline", + "documentation": { + "kind": "markdown", + "value": "\n`global(regexp)` returns whether the global (`g`) flag is set on this `RegExp`.\n\nSee [`RegExp.global`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/global) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.global) // Logs `true`, since `g` is set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"i\")\nConsole.log(regexp2->RegExp.global) // Logs `false`, since `g` is not set\n```\n" + }, "kind": 12, - "tags": [], + "label": "RegExp.global", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "t => bool", - "documentation": {"kind": "markdown", "value": "\n`multiline(regexp)` returns whether the multiline (`m`) flag is set on this `RegExp`.\n\nSee [`RegExp.multiline`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/multiline) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.multiline) // Logs `false`, since `m` is not set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"mi\")\nConsole.log(regexp2->RegExp.multiline) // Logs `true`, since `m` is set\n```\n"} - }, { - "label": "RegExp.test", + "documentation": { + "kind": "markdown", + "value": "\n`multiline(regexp)` returns whether the multiline (`m`) flag is set on this `RegExp`.\n\nSee [`RegExp.multiline`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/multiline) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.multiline) // Logs `false`, since `m` is not set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"mi\")\nConsole.log(regexp2->RegExp.multiline) // Logs `true`, since `m` is set\n```\n" + }, "kind": 12, - "tags": [], + "label": "RegExp.multiline", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(t, string) => bool", - "documentation": {"kind": "markdown", "value": "\n`test(regexp, string)` tests whether the provided `regexp` matches on the provided string.\n\nSee [`RegExp.test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\n\nif regexp->RegExp.test(\"ReScript is cool!\") {\n Console.log(\"Yay, there's a word in there.\")\n}\n```\n"} - }, { - "label": "RegExp.unicode", + "documentation": { + "kind": "markdown", + "value": "\n`test(regexp, string)` tests whether the provided `regexp` matches on the provided string.\n\nSee [`RegExp.test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\n\nif regexp->RegExp.test(\"ReScript is cool!\") {\n Console.log(\"Yay, there's a word in there.\")\n}\n```\n" + }, "kind": 12, - "tags": [], + "label": "RegExp.test", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "t => bool", - "documentation": {"kind": "markdown", "value": "\n`unicode(regexp)` returns whether the unicode (`y`) flag is set on this `RegExp`.\n\nSee [`RegExp.unicode`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicode) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.unicode) // Logs `false`, since `u` is not set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"mu\")\nConsole.log(regexp2->RegExp.unicode) // Logs `true`, since `u` is set\n```\n"} - }, { - "label": "RegExp.source", + "documentation": { + "kind": "markdown", + "value": "\n`unicode(regexp)` returns whether the unicode (`y`) flag is set on this `RegExp`.\n\nSee [`RegExp.unicode`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicode) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.unicode) // Logs `false`, since `u` is not set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"mu\")\nConsole.log(regexp2->RegExp.unicode) // Logs `true`, since `u` is set\n```\n" + }, "kind": 12, - "tags": [], + "label": "RegExp.unicode", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "t => string", - "documentation": {"kind": "markdown", "value": "\n`source(regexp)` returns the source text for this `RegExp`, without the two forward slashes (if present), and without any set flags.\n\nSee [`RegExp.source`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/source) on MDN.\n\n## Examples\n```rescript\nlet regexp = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp->RegExp.source) // Logs `\\w+`, the source text of the `RegExp`\n```\n"} - }, { - "label": "RegExp.flags", + "documentation": { + "kind": "markdown", + "value": "\n`source(regexp)` returns the source text for this `RegExp`, without the two forward slashes (if present), and without any set flags.\n\nSee [`RegExp.source`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/source) on MDN.\n\n## Examples\n```rescript\nlet regexp = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp->RegExp.source) // Logs `\\w+`, the source text of the `RegExp`\n```\n" + }, "kind": 12, - "tags": [], + "label": "RegExp.source", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "t => string", - "documentation": {"kind": "markdown", "value": "\n`flags(regexp)` returns a string consisting of all the flags set on this `RegExp`.\n\nSee [`RegExp.flags`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags) on MDN.\n\n## Examples\n```rescript\nlet regexp = RegExp.fromString(\"\\\\w+\", ~flags=\"gi\")\nConsole.log(regexp->RegExp.flags) // Logs \"gi\", all the flags set on the RegExp\n```\n"} - }] + "documentation": { + "kind": "markdown", + "value": "\n`flags(regexp)` returns a string consisting of all the flags set on this `RegExp`.\n\nSee [`RegExp.flags`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags) on MDN.\n\n## Examples\n```rescript\nlet regexp = RegExp.fromString(\"\\\\w+\", ~flags=\"gi\")\nConsole.log(regexp->RegExp.flags) // Logs \"gi\", all the flags set on the RegExp\n```\n" + }, + "kind": 12, + "label": "RegExp.flags", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/CompletionResolve.res.txt b/tests/analysis_tests/tests/src/expected/CompletionResolve.res.txt index 266a68ee4b9..e52cb7bd7a9 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionResolve.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionResolve.res.txt @@ -1,3 +1,4 @@ +null Completion resolve: Belt_Array "\nUtilities for `Array` functions.\n" diff --git a/tests/analysis_tests/tests/src/expected/CompletionSupport.res.txt b/tests/analysis_tests/tests/src/expected/CompletionSupport.res.txt index e69de29bb2d..19765bd501b 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionSupport.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionSupport.res.txt @@ -0,0 +1 @@ +null diff --git a/tests/analysis_tests/tests/src/expected/CompletionSupport2.res.txt b/tests/analysis_tests/tests/src/expected/CompletionSupport2.res.txt index e69de29bb2d..19765bd501b 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionSupport2.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionSupport2.res.txt @@ -0,0 +1 @@ +null diff --git a/tests/analysis_tests/tests/src/expected/CompletionTaggedTemplate.res.txt b/tests/analysis_tests/tests/src/expected/CompletionTaggedTemplate.res.txt index 2cfc84238d7..938eeacad66 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionTaggedTemplate.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionTaggedTemplate.res.txt @@ -1,3 +1,4 @@ +null Complete src/CompletionTaggedTemplate.res 13:13 posCursor:[13:13] posNoWhite:[13:12] Found expr:[13:11->13:13] Pexp_field [13:11->13:12] _:[19:0->13:13] @@ -13,43 +14,68 @@ Path w CPPipe pathFromEnv:M found:true Path M. Path -[{ - "label": "->M.xyz", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 13 }, + "start": { "character": 12, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t, int) => int", - "documentation": null, - "sortText": "xyz", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->M.xyz", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 12}, "end": {"line": 13, "character": 13}}, - "newText": "" - }] - }, { - "label": "->M.b", "kind": 12, - "tags": [], + "label": "->M.xyz", + "sortText": "xyz", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 13 }, + "start": { "character": 12, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t => string", - "documentation": null, - "sortText": "b", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->M.b", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 12}, "end": {"line": 13, "character": 13}}, - "newText": "" - }] - }, { - "label": "->M.a", "kind": 12, - "tags": [], + "label": "->M.b", + "sortText": "b", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 13 }, + "start": { "character": 12, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t => int", - "documentation": null, - "sortText": "a", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->M.a", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 12}, "end": {"line": 13, "character": 13}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->M.a", + "sortText": "a", + "tags": [] + } +] Complete src/CompletionTaggedTemplate.res 16:20 posCursor:[16:20] posNoWhite:[16:19] Found expr:[16:11->0:-1] @@ -67,41 +93,66 @@ Path meh CPPipe pathFromEnv:M found:true Path M. Path -[{ - "label": "->M.xyz", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 20, "line": 16 }, + "start": { "character": 19, "line": 16 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t, int) => int", - "documentation": null, - "sortText": "xyz", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->M.xyz", - "additionalTextEdits": [{ - "range": {"start": {"line": 16, "character": 19}, "end": {"line": 16, "character": 20}}, - "newText": "" - }] - }, { - "label": "->M.b", "kind": 12, - "tags": [], + "label": "->M.xyz", + "sortText": "xyz", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 20, "line": 16 }, + "start": { "character": 19, "line": 16 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t => string", - "documentation": null, - "sortText": "b", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->M.b", - "additionalTextEdits": [{ - "range": {"start": {"line": 16, "character": 19}, "end": {"line": 16, "character": 20}}, - "newText": "" - }] - }, { - "label": "->M.a", "kind": 12, - "tags": [], + "label": "->M.b", + "sortText": "b", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 20, "line": 16 }, + "start": { "character": 19, "line": 16 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t => int", - "documentation": null, - "sortText": "a", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->M.a", - "additionalTextEdits": [{ - "range": {"start": {"line": 16, "character": 19}, "end": {"line": 16, "character": 20}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->M.a", + "sortText": "a", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/CompletionTypeAnnotation.res.txt b/tests/analysis_tests/tests/src/expected/CompletionTypeAnnotation.res.txt index 8a30600d10b..b3a667812b2 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionTypeAnnotation.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionTypeAnnotation.res.txt @@ -1,3 +1,4 @@ +null Complete src/CompletionTypeAnnotation.res 9:22 XXX Not found! Completable: Cexpression Type[someRecord] @@ -5,16 +6,23 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Type[someRecord] Path someRecord -[{ - "label": "{}", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "someRecord", - "documentation": {"kind": "markdown", "value": "```rescript\ntype someRecord = {age: int, name: string}\n```"}, - "sortText": "A", + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype someRecord = {age: int, name: string}\n```" + }, "insertText": "{$0}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "{}", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionTypeAnnotation.res 12:24 XXX Not found! @@ -23,19 +31,32 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Type[someRecord] Path someRecord -[{ - "label": "age", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nage: int\n```\n\n```rescript\ntype someRecord = {age: int, name: string}\n```"} - }, { - "label": "name", + "documentation": { + "kind": "markdown", + "value": "```rescript\nage: int\n```\n\n```rescript\ntype someRecord = {age: int, name: string}\n```" + }, "kind": 5, - "tags": [], + "label": "age", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nname: string\n```\n\n```rescript\ntype someRecord = {age: int, name: string}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nname: string\n```\n\n```rescript\ntype someRecord = {age: int, name: string}\n```" + }, + "kind": 5, + "label": "name", + "tags": [] + } +] Complete src/CompletionTypeAnnotation.res 15:23 XXX Not found! @@ -44,23 +65,36 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Type[someVariant] Path someVariant -[{ - "label": "One", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "One", - "documentation": {"kind": "markdown", "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two(bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two(bool)\n```" + }, "insertText": "One", - "insertTextFormat": 2 - }, { - "label": "Two(_)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "One", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Two(bool)", - "documentation": {"kind": "markdown", "value": "```rescript\nTwo(bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nTwo(bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool)\n```" + }, "insertText": "Two($0)", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "Two(_)", + "tags": [] + } +] Complete src/CompletionTypeAnnotation.res 18:25 XXX Not found! @@ -69,54 +103,74 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Type[someVariant] Path someVariant -[{ - "label": "One", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "One", - "documentation": {"kind": "markdown", "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two(bool)\n```"}, - "sortText": "A One", + "documentation": { + "kind": "markdown", + "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two(bool)\n```" + }, "insertText": "One", - "insertTextFormat": 2 - }, { - "label": "Option", - "kind": 9, - "tags": [], + "insertTextFormat": 2, + "kind": 4, + "label": "One", + "sortText": "A One", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "module Option", - "documentation": null - }, { - "label": "Ordering", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], + "label": "Option", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "module Ordering", - "documentation": null - }, { - "label": "Object", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], + "label": "Ordering", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "module Object", - "documentation": null - }, { - "label": "Obj", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module Obj", - "documentation": null, + "label": "Object", + "tags": [] + }, + { "data": { "modulePath": "Obj", "filePath": "src/CompletionTypeAnnotation.res" - } - }, { - "label": "Objects", + }, + "deprecated": false, + "detail": "module Obj", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module Objects", - "documentation": null, + "label": "Obj", + "tags": [] + }, + { "data": { "modulePath": "Objects", "filePath": "src/CompletionTypeAnnotation.res" - } - }] + }, + "deprecated": false, + "detail": "module Objects", + "documentation": { "kind": "markdown", "value": "" }, + "kind": 9, + "label": "Objects", + "tags": [] + } +] Complete src/CompletionTypeAnnotation.res 21:27 XXX Not found! @@ -125,23 +179,36 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Type[somePolyVariant] Path somePolyVariant -[{ - "label": "#one", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "#one", - "documentation": {"kind": "markdown", "value": "```rescript\n#one\n```\n\n```rescript\n[#one | #two(bool)]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#one\n```\n\n```rescript\n[#one | #two(bool)]\n```" + }, "insertText": "#one", - "insertTextFormat": 2 - }, { - "label": "#two(_)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "#one", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "#two(bool)", - "documentation": {"kind": "markdown", "value": "```rescript\n#two(bool)\n```\n\n```rescript\n[#one | #two(bool)]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#two(bool)\n```\n\n```rescript\n[#one | #two(bool)]\n```" + }, "insertText": "#two($0)", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "#two(_)", + "tags": [] + } +] Complete src/CompletionTypeAnnotation.res 24:30 XXX Not found! @@ -150,15 +217,22 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Type[somePolyVariant] Path somePolyVariant -[{ - "label": "#one", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "#one", - "documentation": {"kind": "markdown", "value": "```rescript\n#one\n```\n\n```rescript\n[#one | #two(bool)]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#one\n```\n\n```rescript\n[#one | #two(bool)]\n```" + }, "insertText": "one", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "#one", + "tags": [] + } +] Complete src/CompletionTypeAnnotation.res 29:20 XXX Not found! @@ -167,16 +241,20 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Type[someFunc] Path someFunc -[{ - "label": "(v1, v2) => {}", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(int, string) => bool", - "documentation": null, - "sortText": "A", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "(${1:v1}, ${2:v2}) => {${0:()}}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "(v1, v2) => {}", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionTypeAnnotation.res 34:21 XXX Not found! @@ -185,15 +263,19 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Type[someTuple] Path someTuple -[{ - "label": "(_, _)", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(bool, option)", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "(${1:_}, ${2:_})", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "(_, _)", + "tags": [] + } +] Complete src/CompletionTypeAnnotation.res 37:28 XXX Not found! @@ -202,33 +284,46 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Type[someTuple] Path someTuple -[{ - "label": "None", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "Some(_)", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "None", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "Some($0)", - "insertTextFormat": 2 - }, { - "label": "Some(true)", - "kind": 4, - "tags": [], + "insertTextFormat": 2, + "kind": 12, + "label": "Some(_)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "Some(false)", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "Some(true)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "Some(false)", + "tags": [] + } +] Complete src/CompletionTypeAnnotation.res 40:31 XXX Not found! @@ -238,37 +333,62 @@ Resolved opens 1 Stdlib ContextPath option ContextPath Type[someVariant] Path someVariant -[{ - "label": "None", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "someVariant", - "documentation": {"kind": "markdown", "value": "```rescript\ntype someVariant = One | Two(bool)\n```"} - }, { - "label": "Some(_)", + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype someVariant = One | Two(bool)\n```" + }, "kind": 12, - "tags": [], + "label": "None", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "someVariant", - "documentation": {"kind": "markdown", "value": "```rescript\ntype someVariant = One | Two(bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype someVariant = One | Two(bool)\n```" + }, "insertText": "Some($0)", - "insertTextFormat": 2 - }, { - "label": "Some(One)", - "kind": 4, - "tags": [], + "insertTextFormat": 2, + "kind": 12, + "label": "Some(_)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "One", - "documentation": {"kind": "markdown", "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two(bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two(bool)\n```" + }, "insertText": "Some(One)", - "insertTextFormat": 2 - }, { - "label": "Some(Two(_))", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "Some(One)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Two(bool)", - "documentation": {"kind": "markdown", "value": "```rescript\nTwo(bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nTwo(bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool)\n```" + }, "insertText": "Some(Two($0))", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "Some(Two(_))", + "tags": [] + } +] Complete src/CompletionTypeAnnotation.res 43:37 XXX Not found! @@ -278,23 +398,36 @@ Resolved opens 1 Stdlib ContextPath option ContextPath Type[someVariant] Path someVariant -[{ - "label": "One", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "One", - "documentation": {"kind": "markdown", "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two(bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two(bool)\n```" + }, "insertText": "One", - "insertTextFormat": 2 - }, { - "label": "Two(_)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "One", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Two(bool)", - "documentation": {"kind": "markdown", "value": "```rescript\nTwo(bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nTwo(bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool)\n```" + }, "insertText": "Two($0)", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "Two(_)", + "tags": [] + } +] Complete src/CompletionTypeAnnotation.res 46:30 XXX Not found! @@ -304,16 +437,23 @@ Resolved opens 1 Stdlib ContextPath array ContextPath Type[someVariant] Path someVariant -[{ - "label": "[]", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "someVariant", - "documentation": {"kind": "markdown", "value": "```rescript\ntype someVariant = One | Two(bool)\n```"}, - "sortText": "A", + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype someVariant = One | Two(bool)\n```" + }, "insertText": "[$0]", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "[]", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionTypeAnnotation.res 49:32 XXX Not found! @@ -323,23 +463,36 @@ Resolved opens 1 Stdlib ContextPath array ContextPath Type[someVariant] Path someVariant -[{ - "label": "One", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "One", - "documentation": {"kind": "markdown", "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two(bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two(bool)\n```" + }, "insertText": "One", - "insertTextFormat": 2 - }, { - "label": "Two(_)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "One", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Two(bool)", - "documentation": {"kind": "markdown", "value": "```rescript\nTwo(bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nTwo(bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool)\n```" + }, "insertText": "Two($0)", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "Two(_)", + "tags": [] + } +] Complete src/CompletionTypeAnnotation.res 52:38 XXX Not found! @@ -350,16 +503,23 @@ ContextPath array> ContextPath option ContextPath Type[someVariant] Path someVariant -[{ - "label": "[]", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "option", - "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}, - "sortText": "A", + "documentation": { + "kind": "markdown", + "value": "```rescript\noption\n```" + }, "insertText": "[$0]", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "[]", + "sortText": "A", + "tags": [] + } +] Complete src/CompletionTypeAnnotation.res 55:45 XXX Not found! @@ -370,21 +530,34 @@ ContextPath option> ContextPath array ContextPath Type[someVariant] Path someVariant -[{ - "label": "One", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "One", - "documentation": {"kind": "markdown", "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two(bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two(bool)\n```" + }, "insertText": "One", - "insertTextFormat": 2 - }, { - "label": "Two(_)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "One", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Two(bool)", - "documentation": {"kind": "markdown", "value": "```rescript\nTwo(bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nTwo(bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool)\n```" + }, "insertText": "Two($0)", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "Two(_)", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/CompletionTypeT.res.txt b/tests/analysis_tests/tests/src/expected/CompletionTypeT.res.txt index 9adbcead38a..85299e59ef1 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionTypeT.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionTypeT.res.txt @@ -1,3 +1,4 @@ +null Complete src/CompletionTypeT.res 4:26 XXX Not found! Completable: Cpattern Value[date] @@ -5,29 +6,45 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[date] Path date -[{ - "label": "None", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "Date.t", - "documentation": {"kind": "markdown", "value": "\nA type representing a JavaScript date.\n"} - }, { - "label": "Some(_)", + "documentation": { + "kind": "markdown", + "value": "\nA type representing a JavaScript date.\n" + }, "kind": 12, - "tags": [], + "label": "None", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Date.t", - "documentation": {"kind": "markdown", "value": "\nA type representing a JavaScript date.\n"}, + "documentation": { + "kind": "markdown", + "value": "\nA type representing a JavaScript date.\n" + }, "insertText": "Some(${1:_})", - "insertTextFormat": 2 - }, { - "label": "Some(date)", - "kind": 4, - "tags": [], + "insertTextFormat": 2, + "kind": 12, + "label": "Some(_)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "date", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "Some(${0:date})", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "Some(date)", + "tags": [] + } +] Complete src/CompletionTypeT.res 7:27 XXX Not found! @@ -36,77 +53,105 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Type[withDate] Path withDate -[{ - "label": "Date.makeWithYMD()", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(~year: int, ~month: int, ~day: int) => t", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "Date.makeWithYMD($0)", - "insertTextFormat": 2 - }, { - "label": "Date.makeWithYMDHM()", + "insertTextFormat": 2, "kind": 12, - "tags": [], + "label": "Date.makeWithYMD()", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(\n ~year: int,\n ~month: int,\n ~day: int,\n ~hours: int,\n ~minutes: int,\n) => t", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "Date.makeWithYMDHM($0)", - "insertTextFormat": 2 - }, { - "label": "Date.make()", + "insertTextFormat": 2, "kind": 12, - "tags": [], + "label": "Date.makeWithYMDHM()", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "unit => t", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "Date.make($0)", - "insertTextFormat": 2 - }, { - "label": "Date.fromTime()", + "insertTextFormat": 2, "kind": 12, - "tags": [], + "label": "Date.make()", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "msSinceEpoch => t", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "Date.fromTime($0)", - "insertTextFormat": 2 - }, { - "label": "Date.fromString()", + "insertTextFormat": 2, "kind": 12, - "tags": [], + "label": "Date.fromTime()", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string => t", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "Date.fromString($0)", - "insertTextFormat": 2 - }, { - "label": "Date.makeWithYMDHMSM()", + "insertTextFormat": 2, "kind": 12, - "tags": [], + "label": "Date.fromString()", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(\n ~year: int,\n ~month: int,\n ~day: int,\n ~hours: int,\n ~minutes: int,\n ~seconds: int,\n ~milliseconds: int,\n) => t", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "Date.makeWithYMDHMSM($0)", - "insertTextFormat": 2 - }, { - "label": "Date.makeWithYM()", + "insertTextFormat": 2, "kind": 12, - "tags": [], + "label": "Date.makeWithYMDHMSM()", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(~year: int, ~month: int) => t", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "Date.makeWithYM($0)", - "insertTextFormat": 2 - }, { - "label": "Date.makeWithYMDHMS()", + "insertTextFormat": 2, "kind": 12, - "tags": [], + "label": "Date.makeWithYM()", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(\n ~year: int,\n ~month: int,\n ~day: int,\n ~hours: int,\n ~minutes: int,\n ~seconds: int,\n) => t", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "Date.makeWithYMDHMS($0)", - "insertTextFormat": 2 - }, { - "label": "Date.makeWithYMDH()", + "insertTextFormat": 2, "kind": 12, - "tags": [], + "label": "Date.makeWithYMDHMS()", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(~year: int, ~month: int, ~day: int, ~hours: int) => t", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "Date.makeWithYMDH($0)", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "Date.makeWithYMDH()", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/CompletionTypedArrays.res.txt b/tests/analysis_tests/tests/src/expected/CompletionTypedArrays.res.txt index ee9e5f9972d..2c112e6a63d 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionTypedArrays.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionTypedArrays.res.txt @@ -1,3 +1,4 @@ +null Complete src/CompletionTypedArrays.res 1:17 posCursor:[1:17] posNoWhite:[1:16] Found expr:[1:3->1:17] Pexp_field [1:3->1:16] _:[4:0->1:17] @@ -14,679 +15,1296 @@ CPPipe pathFromEnv:Stdlib.BigInt64Array found:false Path Stdlib.BigInt64Array. Path Stdlib.TypedArray. Path -[{ - "label": "->BigInt64Array.ignore", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t => unit", - "documentation": {"kind": "markdown", "value": "\n `ignore(bigIntArray)` ignores the provided bigIntArray 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"}, - "sortText": "ignore", + "documentation": { + "kind": "markdown", + "value": "\n `ignore(bigIntArray)` ignores the provided bigIntArray 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" + }, "insertText": "->BigInt64Array.ignore", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastIndexWithIndex", "kind": 12, - "tags": [], + "label": "->BigInt64Array.ignore", + "sortText": "ignore", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n"}, - "sortText": "findLastIndexWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n" + }, "insertText": "->TypedArray.findLastIndexWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.lastIndexOf", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastIndexWithIndex", + "sortText": "findLastIndexWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => int", - "documentation": {"kind": "markdown", "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n"}, - "sortText": "lastIndexOf", + "documentation": { + "kind": "markdown", + "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n" + }, "insertText": "->TypedArray.lastIndexOf", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.lastIndexOf", + "sortText": "lastIndexOf", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n"}, - "sortText": "findLastWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n" + }, "insertText": "->TypedArray.findLastWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLast", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastWithIndex", + "sortText": "findLastWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n"}, - "sortText": "findLast", + "documentation": { + "kind": "markdown", + "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n" + }, "insertText": "->TypedArray.findLast", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.filter", "kind": 12, - "tags": [], + "label": "->TypedArray.findLast", + "sortText": "findLast", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n"}, - "sortText": "filter", + "documentation": { + "kind": "markdown", + "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n" + }, "insertText": "->TypedArray.filter", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.byteLength", "kind": 12, - "tags": [], + "label": "->TypedArray.filter", + "sortText": "filter", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n"}, - "sortText": "byteLength", + "documentation": { + "kind": "markdown", + "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n" + }, "insertText": "->TypedArray.byteLength", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.ignore", "kind": 12, - "tags": [], + "label": "->TypedArray.byteLength", + "sortText": "byteLength", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => unit", - "documentation": {"kind": "markdown", "value": "\n `ignore(typedArray)` ignores the provided typedArray 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"}, - "sortText": "ignore", + "documentation": { + "kind": "markdown", + "value": "\n `ignore(typedArray)` ignores the provided typedArray 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" + }, "insertText": "->TypedArray.ignore", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceRightWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.ignore", + "sortText": "ignore", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n"}, - "sortText": "reduceRightWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n" + }, "insertText": "->TypedArray.reduceRightWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceRight", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceRightWithIndex", + "sortText": "reduceRightWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n"}, - "sortText": "reduceRight", + "documentation": { + "kind": "markdown", + "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n" + }, "insertText": "->TypedArray.reduceRight", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.joinWith", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceRight", + "sortText": "reduceRight", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, string) => string", - "documentation": {"kind": "markdown", "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n"}, - "sortText": "joinWith", + "documentation": { + "kind": "markdown", + "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n" + }, "insertText": "->TypedArray.joinWith", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.buffer", "kind": 12, - "tags": [], + "label": "->TypedArray.joinWith", + "sortText": "joinWith", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => ArrayBuffer.t", - "documentation": {"kind": "markdown", "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n"}, - "sortText": "buffer", + "documentation": { + "kind": "markdown", + "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n" + }, "insertText": "->TypedArray.buffer", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduce", "kind": 12, - "tags": [], + "label": "->TypedArray.buffer", + "sortText": "buffer", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n"}, - "sortText": "reduce", + "documentation": { + "kind": "markdown", + "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n" + }, "insertText": "->TypedArray.reduce", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.forEachWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.reduce", + "sortText": "reduce", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => unit) => unit", - "documentation": {"kind": "markdown", "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n"}, - "sortText": "forEachWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n" + }, "insertText": "->TypedArray.forEachWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copy", "kind": 12, - "tags": [], + "label": "->TypedArray.forEachWithIndex", + "sortText": "forEachWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n"}, - "sortText": "copy", + "documentation": { + "kind": "markdown", + "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n" + }, "insertText": "->TypedArray.copy", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.someWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.copy", + "sortText": "copy", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n"}, - "sortText": "someWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n" + }, "insertText": "->TypedArray.someWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findIndexWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.someWithIndex", + "sortText": "someWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n"}, - "sortText": "findIndexWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n" + }, "insertText": "->TypedArray.findIndexWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.sliceToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.findIndexWithIndex", + "sortText": "findIndexWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n"}, - "sortText": "sliceToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n" + }, "insertText": "->TypedArray.sliceToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.slice", "kind": 12, - "tags": [], + "label": "->TypedArray.sliceToEnd", + "sortText": "sliceToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n"}, - "sortText": "slice", + "documentation": { + "kind": "markdown", + "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n" + }, "insertText": "->TypedArray.slice", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.slice", + "sortText": "slice", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n"}, - "sortText": "findLastIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n" + }, "insertText": "->TypedArray.findLastIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.includes", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastIndex", + "sortText": "findLastIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => bool", - "documentation": {"kind": "markdown", "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n"}, - "sortText": "includes", + "documentation": { + "kind": "markdown", + "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n" + }, "insertText": "->TypedArray.includes", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fillToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.includes", + "sortText": "includes", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, 'a, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n"}, - "sortText": "fillToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n" + }, "insertText": "->TypedArray.fillToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fillAll", "kind": 12, - "tags": [], + "label": "->TypedArray.fillToEnd", + "sortText": "fillToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n"}, - "sortText": "fillAll", + "documentation": { + "kind": "markdown", + "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n" + }, "insertText": "->TypedArray.fillAll", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.find", "kind": 12, - "tags": [], + "label": "->TypedArray.fillAll", + "sortText": "fillAll", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n"}, - "sortText": "find", + "documentation": { + "kind": "markdown", + "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n" + }, "insertText": "->TypedArray.find", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.subarrayToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.find", + "sortText": "find", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n"}, - "sortText": "subarrayToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n" + }, "insertText": "->TypedArray.subarrayToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.set", "kind": 12, - "tags": [], + "label": "->TypedArray.subarrayToEnd", + "sortText": "subarrayToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int, 'a) => unit", - "documentation": {"kind": "markdown", "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n"}, - "sortText": "set", + "documentation": { + "kind": "markdown", + "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n" + }, "insertText": "->TypedArray.set", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toLocaleString", "kind": 12, - "tags": [], + "label": "->TypedArray.set", + "sortText": "set", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => string", - "documentation": {"kind": "markdown", "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n"}, - "sortText": "toLocaleString", + "documentation": { + "kind": "markdown", + "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n" + }, "insertText": "->TypedArray.toLocaleString", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.lastIndexOfFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.toLocaleString", + "sortText": "toLocaleString", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, int) => int", - "documentation": {"kind": "markdown", "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n"}, - "sortText": "lastIndexOfFrom", + "documentation": { + "kind": "markdown", + "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n" + }, "insertText": "->TypedArray.lastIndexOfFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.lastIndexOfFrom", + "sortText": "lastIndexOfFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n"}, - "sortText": "findIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n" + }, "insertText": "->TypedArray.findIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.filterWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.findIndex", + "sortText": "findIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n"}, - "sortText": "filterWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n" + }, "insertText": "->TypedArray.filterWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.sort", "kind": 12, - "tags": [], + "label": "->TypedArray.filterWithIndex", + "sortText": "filterWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", - "documentation": {"kind": "markdown", "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n"}, - "sortText": "sort", + "documentation": { + "kind": "markdown", + "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n" + }, "insertText": "->TypedArray.sort", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.mapWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.sort", + "sortText": "sort", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", - "documentation": {"kind": "markdown", "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n"}, - "sortText": "mapWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n" + }, "insertText": "->TypedArray.mapWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.every", "kind": 12, - "tags": [], + "label": "->TypedArray.mapWithIndex", + "sortText": "mapWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n"}, - "sortText": "every", + "documentation": { + "kind": "markdown", + "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n" + }, "insertText": "->TypedArray.every", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.length", "kind": 12, - "tags": [], + "label": "->TypedArray.every", + "sortText": "every", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n"}, - "sortText": "length", + "documentation": { + "kind": "markdown", + "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n" + }, "insertText": "->TypedArray.length", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.indexOf", "kind": 12, - "tags": [], + "label": "->TypedArray.length", + "sortText": "length", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => int", - "documentation": {"kind": "markdown", "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n"}, - "sortText": "indexOf", + "documentation": { + "kind": "markdown", + "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n" + }, "insertText": "->TypedArray.indexOf", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyWithinToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.indexOf", + "sortText": "indexOf", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n"}, - "sortText": "copyWithinToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n" + }, "insertText": "->TypedArray.copyWithinToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.some", "kind": 12, - "tags": [], + "label": "->TypedArray.copyWithinToEnd", + "sortText": "copyWithinToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n"}, - "sortText": "some", + "documentation": { + "kind": "markdown", + "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n" + }, "insertText": "->TypedArray.some", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.some", + "sortText": "some", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n"}, - "sortText": "reduceWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n" + }, "insertText": "->TypedArray.reduceWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.map", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceWithIndex", + "sortText": "reduceWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => 'b) => t<'b>", - "documentation": {"kind": "markdown", "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n"}, - "sortText": "map", + "documentation": { + "kind": "markdown", + "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n" + }, "insertText": "->TypedArray.map", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toSorted", "kind": 12, - "tags": [], + "label": "->TypedArray.map", + "sortText": "map", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n"}, - "sortText": "toSorted", + "documentation": { + "kind": "markdown", + "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n" + }, "insertText": "->TypedArray.toSorted", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyAllWithin", "kind": 12, - "tags": [], + "label": "->TypedArray.toSorted", + "sortText": "toSorted", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~target: int) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n"}, - "sortText": "copyAllWithin", + "documentation": { + "kind": "markdown", + "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n" + }, "insertText": "->TypedArray.copyAllWithin", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.subarray", "kind": 12, - "tags": [], + "label": "->TypedArray.copyAllWithin", + "sortText": "copyAllWithin", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n"}, - "sortText": "subarray", + "documentation": { + "kind": "markdown", + "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n" + }, "insertText": "->TypedArray.subarray", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.setArray", "kind": 12, - "tags": [], + "label": "->TypedArray.subarray", + "sortText": "subarray", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, array<'a>) => unit", - "documentation": {"kind": "markdown", "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n"}, - "sortText": "setArray", + "documentation": { + "kind": "markdown", + "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n" + }, "insertText": "->TypedArray.setArray", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.get", "kind": 12, - "tags": [], + "label": "->TypedArray.setArray", + "sortText": "setArray", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n"}, - "sortText": "get", + "documentation": { + "kind": "markdown", + "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n" + }, "insertText": "->TypedArray.get", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.with", "kind": 12, - "tags": [], + "label": "->TypedArray.get", + "sortText": "get", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int, 'a) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n"}, - "sortText": "with", + "documentation": { + "kind": "markdown", + "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + }, "insertText": "->TypedArray.with", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toReversed", "kind": 12, - "tags": [], + "label": "->TypedArray.with", + "sortText": "with", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n"}, - "sortText": "toReversed", + "documentation": { + "kind": "markdown", + "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + }, "insertText": "->TypedArray.toReversed", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyWithin", "kind": 12, - "tags": [], + "label": "->TypedArray.toReversed", + "sortText": "toReversed", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n"}, - "sortText": "copyWithin", + "documentation": { + "kind": "markdown", + "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n" + }, "insertText": "->TypedArray.copyWithin", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.everyWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.copyWithin", + "sortText": "copyWithin", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n"}, - "sortText": "everyWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n" + }, "insertText": "->TypedArray.everyWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toString", "kind": 12, - "tags": [], + "label": "->TypedArray.everyWithIndex", + "sortText": "everyWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => string", - "documentation": {"kind": "markdown", "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n"}, - "sortText": "toString", + "documentation": { + "kind": "markdown", + "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n" + }, "insertText": "->TypedArray.toString", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.setArrayFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.toString", + "sortText": "toString", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, array<'a>, int) => unit", - "documentation": {"kind": "markdown", "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n"}, - "sortText": "setArrayFrom", + "documentation": { + "kind": "markdown", + "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n" + }, "insertText": "->TypedArray.setArrayFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.forEach", "kind": 12, - "tags": [], + "label": "->TypedArray.setArrayFrom", + "sortText": "setArrayFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => unit) => unit", - "documentation": {"kind": "markdown", "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n"}, - "sortText": "forEach", + "documentation": { + "kind": "markdown", + "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n" + }, "insertText": "->TypedArray.forEach", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.forEach", + "sortText": "forEach", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n"}, - "sortText": "findWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n" + }, "insertText": "->TypedArray.findWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fill", "kind": 12, - "tags": [], + "label": "->TypedArray.findWithIndex", + "sortText": "findWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n"}, - "sortText": "fill", + "documentation": { + "kind": "markdown", + "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n" + }, "insertText": "->TypedArray.fill", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.indexOfFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.fill", + "sortText": "fill", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, int) => int", - "documentation": {"kind": "markdown", "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n"}, - "sortText": "indexOfFrom", + "documentation": { + "kind": "markdown", + "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n" + }, "insertText": "->TypedArray.indexOfFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reverse", "kind": 12, - "tags": [], + "label": "->TypedArray.indexOfFrom", + "sortText": "indexOfFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => unit", - "documentation": {"kind": "markdown", "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n"}, - "sortText": "reverse", + "documentation": { + "kind": "markdown", + "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n" + }, "insertText": "->TypedArray.reverse", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }, { - "label": "->TypedArray.byteOffset", "kind": 12, - "tags": [], + "label": "->TypedArray.reverse", + "sortText": "reverse", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 17, "line": 1 }, + "start": { "character": 16, "line": 1 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n"}, - "sortText": "byteOffset", + "documentation": { + "kind": "markdown", + "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n" + }, "insertText": "->TypedArray.byteOffset", - "additionalTextEdits": [{ - "range": {"start": {"line": 1, "character": 16}, "end": {"line": 1, "character": 17}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->TypedArray.byteOffset", + "sortText": "byteOffset", + "tags": [] + } +] Complete src/CompletionTypedArrays.res 5:18 posCursor:[5:18] posNoWhite:[5:17] Found expr:[5:3->5:18] @@ -704,679 +1322,1296 @@ CPPipe pathFromEnv:Stdlib.BigUint64Array found:false Path Stdlib.BigUint64Array. Path Stdlib.TypedArray. Path -[{ - "label": "->BigUint64Array.ignore", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t => unit", - "documentation": {"kind": "markdown", "value": "\n `ignore(bigUintArray)` ignores the provided bigUintArray 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"}, - "sortText": "ignore", + "documentation": { + "kind": "markdown", + "value": "\n `ignore(bigUintArray)` ignores the provided bigUintArray 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" + }, "insertText": "->BigUint64Array.ignore", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastIndexWithIndex", "kind": 12, - "tags": [], + "label": "->BigUint64Array.ignore", + "sortText": "ignore", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n"}, - "sortText": "findLastIndexWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n" + }, "insertText": "->TypedArray.findLastIndexWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.lastIndexOf", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastIndexWithIndex", + "sortText": "findLastIndexWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => int", - "documentation": {"kind": "markdown", "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n"}, - "sortText": "lastIndexOf", + "documentation": { + "kind": "markdown", + "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n" + }, "insertText": "->TypedArray.lastIndexOf", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.lastIndexOf", + "sortText": "lastIndexOf", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n"}, - "sortText": "findLastWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n" + }, "insertText": "->TypedArray.findLastWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLast", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastWithIndex", + "sortText": "findLastWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n"}, - "sortText": "findLast", + "documentation": { + "kind": "markdown", + "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n" + }, "insertText": "->TypedArray.findLast", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.filter", "kind": 12, - "tags": [], + "label": "->TypedArray.findLast", + "sortText": "findLast", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n"}, - "sortText": "filter", + "documentation": { + "kind": "markdown", + "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n" + }, "insertText": "->TypedArray.filter", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.byteLength", "kind": 12, - "tags": [], + "label": "->TypedArray.filter", + "sortText": "filter", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n"}, - "sortText": "byteLength", + "documentation": { + "kind": "markdown", + "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n" + }, "insertText": "->TypedArray.byteLength", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.ignore", "kind": 12, - "tags": [], + "label": "->TypedArray.byteLength", + "sortText": "byteLength", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => unit", - "documentation": {"kind": "markdown", "value": "\n `ignore(typedArray)` ignores the provided typedArray 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"}, - "sortText": "ignore", + "documentation": { + "kind": "markdown", + "value": "\n `ignore(typedArray)` ignores the provided typedArray 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" + }, "insertText": "->TypedArray.ignore", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceRightWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.ignore", + "sortText": "ignore", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n"}, - "sortText": "reduceRightWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n" + }, "insertText": "->TypedArray.reduceRightWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceRight", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceRightWithIndex", + "sortText": "reduceRightWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n"}, - "sortText": "reduceRight", + "documentation": { + "kind": "markdown", + "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n" + }, "insertText": "->TypedArray.reduceRight", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.joinWith", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceRight", + "sortText": "reduceRight", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, string) => string", - "documentation": {"kind": "markdown", "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n"}, - "sortText": "joinWith", + "documentation": { + "kind": "markdown", + "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n" + }, "insertText": "->TypedArray.joinWith", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.buffer", "kind": 12, - "tags": [], + "label": "->TypedArray.joinWith", + "sortText": "joinWith", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => ArrayBuffer.t", - "documentation": {"kind": "markdown", "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n"}, - "sortText": "buffer", + "documentation": { + "kind": "markdown", + "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n" + }, "insertText": "->TypedArray.buffer", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduce", "kind": 12, - "tags": [], + "label": "->TypedArray.buffer", + "sortText": "buffer", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n"}, - "sortText": "reduce", + "documentation": { + "kind": "markdown", + "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n" + }, "insertText": "->TypedArray.reduce", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.forEachWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.reduce", + "sortText": "reduce", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => unit) => unit", - "documentation": {"kind": "markdown", "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n"}, - "sortText": "forEachWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n" + }, "insertText": "->TypedArray.forEachWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copy", "kind": 12, - "tags": [], + "label": "->TypedArray.forEachWithIndex", + "sortText": "forEachWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n"}, - "sortText": "copy", + "documentation": { + "kind": "markdown", + "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n" + }, "insertText": "->TypedArray.copy", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.someWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.copy", + "sortText": "copy", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n"}, - "sortText": "someWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n" + }, "insertText": "->TypedArray.someWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findIndexWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.someWithIndex", + "sortText": "someWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n"}, - "sortText": "findIndexWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n" + }, "insertText": "->TypedArray.findIndexWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.sliceToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.findIndexWithIndex", + "sortText": "findIndexWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n"}, - "sortText": "sliceToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n" + }, "insertText": "->TypedArray.sliceToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.slice", "kind": 12, - "tags": [], + "label": "->TypedArray.sliceToEnd", + "sortText": "sliceToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n"}, - "sortText": "slice", + "documentation": { + "kind": "markdown", + "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n" + }, "insertText": "->TypedArray.slice", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.slice", + "sortText": "slice", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n"}, - "sortText": "findLastIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n" + }, "insertText": "->TypedArray.findLastIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.includes", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastIndex", + "sortText": "findLastIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => bool", - "documentation": {"kind": "markdown", "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n"}, - "sortText": "includes", + "documentation": { + "kind": "markdown", + "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n" + }, "insertText": "->TypedArray.includes", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fillToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.includes", + "sortText": "includes", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, 'a, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n"}, - "sortText": "fillToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n" + }, "insertText": "->TypedArray.fillToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fillAll", "kind": 12, - "tags": [], + "label": "->TypedArray.fillToEnd", + "sortText": "fillToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n"}, - "sortText": "fillAll", + "documentation": { + "kind": "markdown", + "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n" + }, "insertText": "->TypedArray.fillAll", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.find", "kind": 12, - "tags": [], + "label": "->TypedArray.fillAll", + "sortText": "fillAll", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n"}, - "sortText": "find", + "documentation": { + "kind": "markdown", + "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n" + }, "insertText": "->TypedArray.find", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.subarrayToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.find", + "sortText": "find", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n"}, - "sortText": "subarrayToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n" + }, "insertText": "->TypedArray.subarrayToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.set", "kind": 12, - "tags": [], + "label": "->TypedArray.subarrayToEnd", + "sortText": "subarrayToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int, 'a) => unit", - "documentation": {"kind": "markdown", "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n"}, - "sortText": "set", + "documentation": { + "kind": "markdown", + "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n" + }, "insertText": "->TypedArray.set", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toLocaleString", "kind": 12, - "tags": [], + "label": "->TypedArray.set", + "sortText": "set", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => string", - "documentation": {"kind": "markdown", "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n"}, - "sortText": "toLocaleString", + "documentation": { + "kind": "markdown", + "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n" + }, "insertText": "->TypedArray.toLocaleString", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.lastIndexOfFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.toLocaleString", + "sortText": "toLocaleString", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, int) => int", - "documentation": {"kind": "markdown", "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n"}, - "sortText": "lastIndexOfFrom", + "documentation": { + "kind": "markdown", + "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n" + }, "insertText": "->TypedArray.lastIndexOfFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.lastIndexOfFrom", + "sortText": "lastIndexOfFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n"}, - "sortText": "findIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n" + }, "insertText": "->TypedArray.findIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.filterWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.findIndex", + "sortText": "findIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n"}, - "sortText": "filterWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n" + }, "insertText": "->TypedArray.filterWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.sort", "kind": 12, - "tags": [], + "label": "->TypedArray.filterWithIndex", + "sortText": "filterWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", - "documentation": {"kind": "markdown", "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n"}, - "sortText": "sort", + "documentation": { + "kind": "markdown", + "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n" + }, "insertText": "->TypedArray.sort", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.mapWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.sort", + "sortText": "sort", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", - "documentation": {"kind": "markdown", "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n"}, - "sortText": "mapWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n" + }, "insertText": "->TypedArray.mapWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.every", "kind": 12, - "tags": [], + "label": "->TypedArray.mapWithIndex", + "sortText": "mapWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n"}, - "sortText": "every", + "documentation": { + "kind": "markdown", + "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n" + }, "insertText": "->TypedArray.every", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.length", "kind": 12, - "tags": [], + "label": "->TypedArray.every", + "sortText": "every", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n"}, - "sortText": "length", + "documentation": { + "kind": "markdown", + "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n" + }, "insertText": "->TypedArray.length", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.indexOf", "kind": 12, - "tags": [], + "label": "->TypedArray.length", + "sortText": "length", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => int", - "documentation": {"kind": "markdown", "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n"}, - "sortText": "indexOf", + "documentation": { + "kind": "markdown", + "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n" + }, "insertText": "->TypedArray.indexOf", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyWithinToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.indexOf", + "sortText": "indexOf", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n"}, - "sortText": "copyWithinToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n" + }, "insertText": "->TypedArray.copyWithinToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.some", "kind": 12, - "tags": [], + "label": "->TypedArray.copyWithinToEnd", + "sortText": "copyWithinToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n"}, - "sortText": "some", + "documentation": { + "kind": "markdown", + "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n" + }, "insertText": "->TypedArray.some", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.some", + "sortText": "some", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n"}, - "sortText": "reduceWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n" + }, "insertText": "->TypedArray.reduceWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.map", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceWithIndex", + "sortText": "reduceWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => 'b) => t<'b>", - "documentation": {"kind": "markdown", "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n"}, - "sortText": "map", + "documentation": { + "kind": "markdown", + "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n" + }, "insertText": "->TypedArray.map", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toSorted", "kind": 12, - "tags": [], + "label": "->TypedArray.map", + "sortText": "map", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n"}, - "sortText": "toSorted", + "documentation": { + "kind": "markdown", + "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n" + }, "insertText": "->TypedArray.toSorted", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyAllWithin", "kind": 12, - "tags": [], + "label": "->TypedArray.toSorted", + "sortText": "toSorted", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~target: int) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n"}, - "sortText": "copyAllWithin", + "documentation": { + "kind": "markdown", + "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n" + }, "insertText": "->TypedArray.copyAllWithin", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.subarray", "kind": 12, - "tags": [], + "label": "->TypedArray.copyAllWithin", + "sortText": "copyAllWithin", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n"}, - "sortText": "subarray", + "documentation": { + "kind": "markdown", + "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n" + }, "insertText": "->TypedArray.subarray", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.setArray", "kind": 12, - "tags": [], + "label": "->TypedArray.subarray", + "sortText": "subarray", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, array<'a>) => unit", - "documentation": {"kind": "markdown", "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n"}, - "sortText": "setArray", + "documentation": { + "kind": "markdown", + "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n" + }, "insertText": "->TypedArray.setArray", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.get", "kind": 12, - "tags": [], + "label": "->TypedArray.setArray", + "sortText": "setArray", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n"}, - "sortText": "get", + "documentation": { + "kind": "markdown", + "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n" + }, "insertText": "->TypedArray.get", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.with", "kind": 12, - "tags": [], + "label": "->TypedArray.get", + "sortText": "get", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int, 'a) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n"}, - "sortText": "with", + "documentation": { + "kind": "markdown", + "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + }, "insertText": "->TypedArray.with", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toReversed", "kind": 12, - "tags": [], + "label": "->TypedArray.with", + "sortText": "with", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n"}, - "sortText": "toReversed", + "documentation": { + "kind": "markdown", + "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + }, "insertText": "->TypedArray.toReversed", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyWithin", "kind": 12, - "tags": [], + "label": "->TypedArray.toReversed", + "sortText": "toReversed", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n"}, - "sortText": "copyWithin", + "documentation": { + "kind": "markdown", + "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n" + }, "insertText": "->TypedArray.copyWithin", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.everyWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.copyWithin", + "sortText": "copyWithin", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n"}, - "sortText": "everyWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n" + }, "insertText": "->TypedArray.everyWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toString", "kind": 12, - "tags": [], + "label": "->TypedArray.everyWithIndex", + "sortText": "everyWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => string", - "documentation": {"kind": "markdown", "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n"}, - "sortText": "toString", + "documentation": { + "kind": "markdown", + "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n" + }, "insertText": "->TypedArray.toString", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.setArrayFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.toString", + "sortText": "toString", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, array<'a>, int) => unit", - "documentation": {"kind": "markdown", "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n"}, - "sortText": "setArrayFrom", + "documentation": { + "kind": "markdown", + "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n" + }, "insertText": "->TypedArray.setArrayFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.forEach", "kind": 12, - "tags": [], + "label": "->TypedArray.setArrayFrom", + "sortText": "setArrayFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => unit) => unit", - "documentation": {"kind": "markdown", "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n"}, - "sortText": "forEach", + "documentation": { + "kind": "markdown", + "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n" + }, "insertText": "->TypedArray.forEach", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.forEach", + "sortText": "forEach", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n"}, - "sortText": "findWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n" + }, "insertText": "->TypedArray.findWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fill", "kind": 12, - "tags": [], + "label": "->TypedArray.findWithIndex", + "sortText": "findWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n"}, - "sortText": "fill", + "documentation": { + "kind": "markdown", + "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n" + }, "insertText": "->TypedArray.fill", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.indexOfFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.fill", + "sortText": "fill", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, int) => int", - "documentation": {"kind": "markdown", "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n"}, - "sortText": "indexOfFrom", + "documentation": { + "kind": "markdown", + "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n" + }, "insertText": "->TypedArray.indexOfFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reverse", "kind": 12, - "tags": [], + "label": "->TypedArray.indexOfFrom", + "sortText": "indexOfFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => unit", - "documentation": {"kind": "markdown", "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n"}, - "sortText": "reverse", + "documentation": { + "kind": "markdown", + "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n" + }, "insertText": "->TypedArray.reverse", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }, { - "label": "->TypedArray.byteOffset", "kind": 12, - "tags": [], + "label": "->TypedArray.reverse", + "sortText": "reverse", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 18, "line": 5 }, + "start": { "character": 17, "line": 5 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n"}, - "sortText": "byteOffset", + "documentation": { + "kind": "markdown", + "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n" + }, "insertText": "->TypedArray.byteOffset", - "additionalTextEdits": [{ - "range": {"start": {"line": 5, "character": 17}, "end": {"line": 5, "character": 18}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->TypedArray.byteOffset", + "sortText": "byteOffset", + "tags": [] + } +] Complete src/CompletionTypedArrays.res 9:16 posCursor:[9:16] posNoWhite:[9:15] Found expr:[9:3->9:16] @@ -1394,679 +2629,1296 @@ CPPipe pathFromEnv:Stdlib.Float32Array found:false Path Stdlib.Float32Array. Path Stdlib.TypedArray. Path -[{ - "label": "->Float32Array.ignore", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t => unit", - "documentation": {"kind": "markdown", "value": "\n `ignore(floatArray)` ignores the provided floatArray 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"}, - "sortText": "ignore", + "documentation": { + "kind": "markdown", + "value": "\n `ignore(floatArray)` ignores the provided floatArray 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" + }, "insertText": "->Float32Array.ignore", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastIndexWithIndex", "kind": 12, - "tags": [], + "label": "->Float32Array.ignore", + "sortText": "ignore", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n"}, - "sortText": "findLastIndexWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n" + }, "insertText": "->TypedArray.findLastIndexWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.lastIndexOf", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastIndexWithIndex", + "sortText": "findLastIndexWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => int", - "documentation": {"kind": "markdown", "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n"}, - "sortText": "lastIndexOf", + "documentation": { + "kind": "markdown", + "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n" + }, "insertText": "->TypedArray.lastIndexOf", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.lastIndexOf", + "sortText": "lastIndexOf", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n"}, - "sortText": "findLastWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n" + }, "insertText": "->TypedArray.findLastWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLast", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastWithIndex", + "sortText": "findLastWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n"}, - "sortText": "findLast", + "documentation": { + "kind": "markdown", + "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n" + }, "insertText": "->TypedArray.findLast", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.filter", "kind": 12, - "tags": [], + "label": "->TypedArray.findLast", + "sortText": "findLast", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n"}, - "sortText": "filter", + "documentation": { + "kind": "markdown", + "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n" + }, "insertText": "->TypedArray.filter", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.byteLength", "kind": 12, - "tags": [], + "label": "->TypedArray.filter", + "sortText": "filter", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n"}, - "sortText": "byteLength", + "documentation": { + "kind": "markdown", + "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n" + }, "insertText": "->TypedArray.byteLength", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.ignore", "kind": 12, - "tags": [], + "label": "->TypedArray.byteLength", + "sortText": "byteLength", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => unit", - "documentation": {"kind": "markdown", "value": "\n `ignore(typedArray)` ignores the provided typedArray 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"}, - "sortText": "ignore", + "documentation": { + "kind": "markdown", + "value": "\n `ignore(typedArray)` ignores the provided typedArray 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" + }, "insertText": "->TypedArray.ignore", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceRightWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.ignore", + "sortText": "ignore", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n"}, - "sortText": "reduceRightWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n" + }, "insertText": "->TypedArray.reduceRightWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceRight", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceRightWithIndex", + "sortText": "reduceRightWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n"}, - "sortText": "reduceRight", + "documentation": { + "kind": "markdown", + "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n" + }, "insertText": "->TypedArray.reduceRight", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.joinWith", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceRight", + "sortText": "reduceRight", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, string) => string", - "documentation": {"kind": "markdown", "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n"}, - "sortText": "joinWith", + "documentation": { + "kind": "markdown", + "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n" + }, "insertText": "->TypedArray.joinWith", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.buffer", "kind": 12, - "tags": [], + "label": "->TypedArray.joinWith", + "sortText": "joinWith", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => ArrayBuffer.t", - "documentation": {"kind": "markdown", "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n"}, - "sortText": "buffer", + "documentation": { + "kind": "markdown", + "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n" + }, "insertText": "->TypedArray.buffer", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduce", "kind": 12, - "tags": [], + "label": "->TypedArray.buffer", + "sortText": "buffer", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n"}, - "sortText": "reduce", + "documentation": { + "kind": "markdown", + "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n" + }, "insertText": "->TypedArray.reduce", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.forEachWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.reduce", + "sortText": "reduce", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => unit) => unit", - "documentation": {"kind": "markdown", "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n"}, - "sortText": "forEachWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n" + }, "insertText": "->TypedArray.forEachWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copy", "kind": 12, - "tags": [], + "label": "->TypedArray.forEachWithIndex", + "sortText": "forEachWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n"}, - "sortText": "copy", + "documentation": { + "kind": "markdown", + "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n" + }, "insertText": "->TypedArray.copy", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.someWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.copy", + "sortText": "copy", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n"}, - "sortText": "someWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n" + }, "insertText": "->TypedArray.someWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findIndexWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.someWithIndex", + "sortText": "someWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n"}, - "sortText": "findIndexWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n" + }, "insertText": "->TypedArray.findIndexWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.sliceToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.findIndexWithIndex", + "sortText": "findIndexWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n"}, - "sortText": "sliceToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n" + }, "insertText": "->TypedArray.sliceToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.slice", "kind": 12, - "tags": [], + "label": "->TypedArray.sliceToEnd", + "sortText": "sliceToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n"}, - "sortText": "slice", + "documentation": { + "kind": "markdown", + "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n" + }, "insertText": "->TypedArray.slice", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.slice", + "sortText": "slice", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n"}, - "sortText": "findLastIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n" + }, "insertText": "->TypedArray.findLastIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.includes", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastIndex", + "sortText": "findLastIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => bool", - "documentation": {"kind": "markdown", "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n"}, - "sortText": "includes", + "documentation": { + "kind": "markdown", + "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n" + }, "insertText": "->TypedArray.includes", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fillToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.includes", + "sortText": "includes", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, 'a, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n"}, - "sortText": "fillToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n" + }, "insertText": "->TypedArray.fillToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fillAll", "kind": 12, - "tags": [], + "label": "->TypedArray.fillToEnd", + "sortText": "fillToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n"}, - "sortText": "fillAll", + "documentation": { + "kind": "markdown", + "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n" + }, "insertText": "->TypedArray.fillAll", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.find", "kind": 12, - "tags": [], + "label": "->TypedArray.fillAll", + "sortText": "fillAll", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n"}, - "sortText": "find", + "documentation": { + "kind": "markdown", + "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n" + }, "insertText": "->TypedArray.find", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.subarrayToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.find", + "sortText": "find", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n"}, - "sortText": "subarrayToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n" + }, "insertText": "->TypedArray.subarrayToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.set", "kind": 12, - "tags": [], + "label": "->TypedArray.subarrayToEnd", + "sortText": "subarrayToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int, 'a) => unit", - "documentation": {"kind": "markdown", "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n"}, - "sortText": "set", + "documentation": { + "kind": "markdown", + "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n" + }, "insertText": "->TypedArray.set", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toLocaleString", "kind": 12, - "tags": [], + "label": "->TypedArray.set", + "sortText": "set", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => string", - "documentation": {"kind": "markdown", "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n"}, - "sortText": "toLocaleString", + "documentation": { + "kind": "markdown", + "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n" + }, "insertText": "->TypedArray.toLocaleString", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.lastIndexOfFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.toLocaleString", + "sortText": "toLocaleString", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, int) => int", - "documentation": {"kind": "markdown", "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n"}, - "sortText": "lastIndexOfFrom", + "documentation": { + "kind": "markdown", + "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n" + }, "insertText": "->TypedArray.lastIndexOfFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.lastIndexOfFrom", + "sortText": "lastIndexOfFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n"}, - "sortText": "findIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n" + }, "insertText": "->TypedArray.findIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.filterWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.findIndex", + "sortText": "findIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n"}, - "sortText": "filterWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n" + }, "insertText": "->TypedArray.filterWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.sort", "kind": 12, - "tags": [], + "label": "->TypedArray.filterWithIndex", + "sortText": "filterWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", - "documentation": {"kind": "markdown", "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n"}, - "sortText": "sort", + "documentation": { + "kind": "markdown", + "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n" + }, "insertText": "->TypedArray.sort", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.mapWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.sort", + "sortText": "sort", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", - "documentation": {"kind": "markdown", "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n"}, - "sortText": "mapWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n" + }, "insertText": "->TypedArray.mapWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.every", "kind": 12, - "tags": [], + "label": "->TypedArray.mapWithIndex", + "sortText": "mapWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n"}, - "sortText": "every", + "documentation": { + "kind": "markdown", + "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n" + }, "insertText": "->TypedArray.every", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.length", "kind": 12, - "tags": [], + "label": "->TypedArray.every", + "sortText": "every", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n"}, - "sortText": "length", + "documentation": { + "kind": "markdown", + "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n" + }, "insertText": "->TypedArray.length", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.indexOf", "kind": 12, - "tags": [], + "label": "->TypedArray.length", + "sortText": "length", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => int", - "documentation": {"kind": "markdown", "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n"}, - "sortText": "indexOf", + "documentation": { + "kind": "markdown", + "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n" + }, "insertText": "->TypedArray.indexOf", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyWithinToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.indexOf", + "sortText": "indexOf", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n"}, - "sortText": "copyWithinToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n" + }, "insertText": "->TypedArray.copyWithinToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.some", "kind": 12, - "tags": [], + "label": "->TypedArray.copyWithinToEnd", + "sortText": "copyWithinToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n"}, - "sortText": "some", + "documentation": { + "kind": "markdown", + "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n" + }, "insertText": "->TypedArray.some", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.some", + "sortText": "some", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n"}, - "sortText": "reduceWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n" + }, "insertText": "->TypedArray.reduceWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.map", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceWithIndex", + "sortText": "reduceWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => 'b) => t<'b>", - "documentation": {"kind": "markdown", "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n"}, - "sortText": "map", + "documentation": { + "kind": "markdown", + "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n" + }, "insertText": "->TypedArray.map", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toSorted", "kind": 12, - "tags": [], + "label": "->TypedArray.map", + "sortText": "map", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n"}, - "sortText": "toSorted", + "documentation": { + "kind": "markdown", + "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n" + }, "insertText": "->TypedArray.toSorted", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyAllWithin", "kind": 12, - "tags": [], + "label": "->TypedArray.toSorted", + "sortText": "toSorted", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~target: int) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n"}, - "sortText": "copyAllWithin", + "documentation": { + "kind": "markdown", + "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n" + }, "insertText": "->TypedArray.copyAllWithin", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.subarray", "kind": 12, - "tags": [], + "label": "->TypedArray.copyAllWithin", + "sortText": "copyAllWithin", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n"}, - "sortText": "subarray", + "documentation": { + "kind": "markdown", + "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n" + }, "insertText": "->TypedArray.subarray", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.setArray", "kind": 12, - "tags": [], + "label": "->TypedArray.subarray", + "sortText": "subarray", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, array<'a>) => unit", - "documentation": {"kind": "markdown", "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n"}, - "sortText": "setArray", + "documentation": { + "kind": "markdown", + "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n" + }, "insertText": "->TypedArray.setArray", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.get", "kind": 12, - "tags": [], + "label": "->TypedArray.setArray", + "sortText": "setArray", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n"}, - "sortText": "get", + "documentation": { + "kind": "markdown", + "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n" + }, "insertText": "->TypedArray.get", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.with", "kind": 12, - "tags": [], + "label": "->TypedArray.get", + "sortText": "get", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int, 'a) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n"}, - "sortText": "with", + "documentation": { + "kind": "markdown", + "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + }, "insertText": "->TypedArray.with", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toReversed", "kind": 12, - "tags": [], + "label": "->TypedArray.with", + "sortText": "with", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n"}, - "sortText": "toReversed", + "documentation": { + "kind": "markdown", + "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + }, "insertText": "->TypedArray.toReversed", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyWithin", "kind": 12, - "tags": [], + "label": "->TypedArray.toReversed", + "sortText": "toReversed", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n"}, - "sortText": "copyWithin", + "documentation": { + "kind": "markdown", + "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n" + }, "insertText": "->TypedArray.copyWithin", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.everyWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.copyWithin", + "sortText": "copyWithin", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n"}, - "sortText": "everyWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n" + }, "insertText": "->TypedArray.everyWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toString", "kind": 12, - "tags": [], + "label": "->TypedArray.everyWithIndex", + "sortText": "everyWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => string", - "documentation": {"kind": "markdown", "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n"}, - "sortText": "toString", + "documentation": { + "kind": "markdown", + "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n" + }, "insertText": "->TypedArray.toString", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.setArrayFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.toString", + "sortText": "toString", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, array<'a>, int) => unit", - "documentation": {"kind": "markdown", "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n"}, - "sortText": "setArrayFrom", + "documentation": { + "kind": "markdown", + "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n" + }, "insertText": "->TypedArray.setArrayFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.forEach", "kind": 12, - "tags": [], + "label": "->TypedArray.setArrayFrom", + "sortText": "setArrayFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => unit) => unit", - "documentation": {"kind": "markdown", "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n"}, - "sortText": "forEach", + "documentation": { + "kind": "markdown", + "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n" + }, "insertText": "->TypedArray.forEach", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.forEach", + "sortText": "forEach", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n"}, - "sortText": "findWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n" + }, "insertText": "->TypedArray.findWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fill", "kind": 12, - "tags": [], + "label": "->TypedArray.findWithIndex", + "sortText": "findWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n"}, - "sortText": "fill", + "documentation": { + "kind": "markdown", + "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n" + }, "insertText": "->TypedArray.fill", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.indexOfFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.fill", + "sortText": "fill", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, int) => int", - "documentation": {"kind": "markdown", "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n"}, - "sortText": "indexOfFrom", + "documentation": { + "kind": "markdown", + "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n" + }, "insertText": "->TypedArray.indexOfFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reverse", "kind": 12, - "tags": [], + "label": "->TypedArray.indexOfFrom", + "sortText": "indexOfFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => unit", - "documentation": {"kind": "markdown", "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n"}, - "sortText": "reverse", + "documentation": { + "kind": "markdown", + "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n" + }, "insertText": "->TypedArray.reverse", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.byteOffset", "kind": 12, - "tags": [], + "label": "->TypedArray.reverse", + "sortText": "reverse", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 9 }, + "start": { "character": 15, "line": 9 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n"}, - "sortText": "byteOffset", + "documentation": { + "kind": "markdown", + "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n" + }, "insertText": "->TypedArray.byteOffset", - "additionalTextEdits": [{ - "range": {"start": {"line": 9, "character": 15}, "end": {"line": 9, "character": 16}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->TypedArray.byteOffset", + "sortText": "byteOffset", + "tags": [] + } +] Complete src/CompletionTypedArrays.res 13:16 posCursor:[13:16] posNoWhite:[13:15] Found expr:[13:3->13:16] @@ -2084,679 +3936,1296 @@ CPPipe pathFromEnv:Stdlib.Float64Array found:false Path Stdlib.Float64Array. Path Stdlib.TypedArray. Path -[{ - "label": "->Float64Array.ignore", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t => unit", - "documentation": {"kind": "markdown", "value": "\n `ignore(floatArray)` ignores the provided floatArray 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"}, - "sortText": "ignore", + "documentation": { + "kind": "markdown", + "value": "\n `ignore(floatArray)` ignores the provided floatArray 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" + }, "insertText": "->Float64Array.ignore", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastIndexWithIndex", "kind": 12, - "tags": [], + "label": "->Float64Array.ignore", + "sortText": "ignore", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n"}, - "sortText": "findLastIndexWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n" + }, "insertText": "->TypedArray.findLastIndexWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.lastIndexOf", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastIndexWithIndex", + "sortText": "findLastIndexWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => int", - "documentation": {"kind": "markdown", "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n"}, - "sortText": "lastIndexOf", + "documentation": { + "kind": "markdown", + "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n" + }, "insertText": "->TypedArray.lastIndexOf", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.lastIndexOf", + "sortText": "lastIndexOf", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n"}, - "sortText": "findLastWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n" + }, "insertText": "->TypedArray.findLastWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLast", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastWithIndex", + "sortText": "findLastWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n"}, - "sortText": "findLast", + "documentation": { + "kind": "markdown", + "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n" + }, "insertText": "->TypedArray.findLast", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.filter", "kind": 12, - "tags": [], + "label": "->TypedArray.findLast", + "sortText": "findLast", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n"}, - "sortText": "filter", + "documentation": { + "kind": "markdown", + "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n" + }, "insertText": "->TypedArray.filter", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.byteLength", "kind": 12, - "tags": [], + "label": "->TypedArray.filter", + "sortText": "filter", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n"}, - "sortText": "byteLength", + "documentation": { + "kind": "markdown", + "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n" + }, "insertText": "->TypedArray.byteLength", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.ignore", "kind": 12, - "tags": [], + "label": "->TypedArray.byteLength", + "sortText": "byteLength", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => unit", - "documentation": {"kind": "markdown", "value": "\n `ignore(typedArray)` ignores the provided typedArray 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"}, - "sortText": "ignore", + "documentation": { + "kind": "markdown", + "value": "\n `ignore(typedArray)` ignores the provided typedArray 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" + }, "insertText": "->TypedArray.ignore", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceRightWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.ignore", + "sortText": "ignore", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n"}, - "sortText": "reduceRightWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n" + }, "insertText": "->TypedArray.reduceRightWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceRight", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceRightWithIndex", + "sortText": "reduceRightWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n"}, - "sortText": "reduceRight", + "documentation": { + "kind": "markdown", + "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n" + }, "insertText": "->TypedArray.reduceRight", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.joinWith", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceRight", + "sortText": "reduceRight", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, string) => string", - "documentation": {"kind": "markdown", "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n"}, - "sortText": "joinWith", + "documentation": { + "kind": "markdown", + "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n" + }, "insertText": "->TypedArray.joinWith", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.buffer", "kind": 12, - "tags": [], + "label": "->TypedArray.joinWith", + "sortText": "joinWith", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => ArrayBuffer.t", - "documentation": {"kind": "markdown", "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n"}, - "sortText": "buffer", + "documentation": { + "kind": "markdown", + "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n" + }, "insertText": "->TypedArray.buffer", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduce", "kind": 12, - "tags": [], + "label": "->TypedArray.buffer", + "sortText": "buffer", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n"}, - "sortText": "reduce", + "documentation": { + "kind": "markdown", + "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n" + }, "insertText": "->TypedArray.reduce", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.forEachWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.reduce", + "sortText": "reduce", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => unit) => unit", - "documentation": {"kind": "markdown", "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n"}, - "sortText": "forEachWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n" + }, "insertText": "->TypedArray.forEachWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copy", "kind": 12, - "tags": [], + "label": "->TypedArray.forEachWithIndex", + "sortText": "forEachWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n"}, - "sortText": "copy", + "documentation": { + "kind": "markdown", + "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n" + }, "insertText": "->TypedArray.copy", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.someWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.copy", + "sortText": "copy", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n"}, - "sortText": "someWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n" + }, "insertText": "->TypedArray.someWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findIndexWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.someWithIndex", + "sortText": "someWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n"}, - "sortText": "findIndexWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n" + }, "insertText": "->TypedArray.findIndexWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.sliceToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.findIndexWithIndex", + "sortText": "findIndexWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n"}, - "sortText": "sliceToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n" + }, "insertText": "->TypedArray.sliceToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.slice", "kind": 12, - "tags": [], + "label": "->TypedArray.sliceToEnd", + "sortText": "sliceToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n"}, - "sortText": "slice", + "documentation": { + "kind": "markdown", + "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n" + }, "insertText": "->TypedArray.slice", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.slice", + "sortText": "slice", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n"}, - "sortText": "findLastIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n" + }, "insertText": "->TypedArray.findLastIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.includes", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastIndex", + "sortText": "findLastIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => bool", - "documentation": {"kind": "markdown", "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n"}, - "sortText": "includes", + "documentation": { + "kind": "markdown", + "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n" + }, "insertText": "->TypedArray.includes", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fillToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.includes", + "sortText": "includes", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, 'a, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n"}, - "sortText": "fillToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n" + }, "insertText": "->TypedArray.fillToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fillAll", "kind": 12, - "tags": [], + "label": "->TypedArray.fillToEnd", + "sortText": "fillToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n"}, - "sortText": "fillAll", + "documentation": { + "kind": "markdown", + "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n" + }, "insertText": "->TypedArray.fillAll", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.find", "kind": 12, - "tags": [], + "label": "->TypedArray.fillAll", + "sortText": "fillAll", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n"}, - "sortText": "find", + "documentation": { + "kind": "markdown", + "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n" + }, "insertText": "->TypedArray.find", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.subarrayToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.find", + "sortText": "find", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n"}, - "sortText": "subarrayToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n" + }, "insertText": "->TypedArray.subarrayToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.set", "kind": 12, - "tags": [], + "label": "->TypedArray.subarrayToEnd", + "sortText": "subarrayToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int, 'a) => unit", - "documentation": {"kind": "markdown", "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n"}, - "sortText": "set", + "documentation": { + "kind": "markdown", + "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n" + }, "insertText": "->TypedArray.set", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toLocaleString", "kind": 12, - "tags": [], + "label": "->TypedArray.set", + "sortText": "set", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => string", - "documentation": {"kind": "markdown", "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n"}, - "sortText": "toLocaleString", + "documentation": { + "kind": "markdown", + "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n" + }, "insertText": "->TypedArray.toLocaleString", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.lastIndexOfFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.toLocaleString", + "sortText": "toLocaleString", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, int) => int", - "documentation": {"kind": "markdown", "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n"}, - "sortText": "lastIndexOfFrom", + "documentation": { + "kind": "markdown", + "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n" + }, "insertText": "->TypedArray.lastIndexOfFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.lastIndexOfFrom", + "sortText": "lastIndexOfFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n"}, - "sortText": "findIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n" + }, "insertText": "->TypedArray.findIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.filterWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.findIndex", + "sortText": "findIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n"}, - "sortText": "filterWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n" + }, "insertText": "->TypedArray.filterWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.sort", "kind": 12, - "tags": [], + "label": "->TypedArray.filterWithIndex", + "sortText": "filterWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", - "documentation": {"kind": "markdown", "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n"}, - "sortText": "sort", + "documentation": { + "kind": "markdown", + "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n" + }, "insertText": "->TypedArray.sort", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.mapWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.sort", + "sortText": "sort", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", - "documentation": {"kind": "markdown", "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n"}, - "sortText": "mapWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n" + }, "insertText": "->TypedArray.mapWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.every", "kind": 12, - "tags": [], + "label": "->TypedArray.mapWithIndex", + "sortText": "mapWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n"}, - "sortText": "every", + "documentation": { + "kind": "markdown", + "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n" + }, "insertText": "->TypedArray.every", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.length", "kind": 12, - "tags": [], + "label": "->TypedArray.every", + "sortText": "every", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n"}, - "sortText": "length", + "documentation": { + "kind": "markdown", + "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n" + }, "insertText": "->TypedArray.length", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.indexOf", "kind": 12, - "tags": [], + "label": "->TypedArray.length", + "sortText": "length", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => int", - "documentation": {"kind": "markdown", "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n"}, - "sortText": "indexOf", + "documentation": { + "kind": "markdown", + "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n" + }, "insertText": "->TypedArray.indexOf", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyWithinToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.indexOf", + "sortText": "indexOf", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n"}, - "sortText": "copyWithinToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n" + }, "insertText": "->TypedArray.copyWithinToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.some", "kind": 12, - "tags": [], + "label": "->TypedArray.copyWithinToEnd", + "sortText": "copyWithinToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n"}, - "sortText": "some", + "documentation": { + "kind": "markdown", + "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n" + }, "insertText": "->TypedArray.some", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.some", + "sortText": "some", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n"}, - "sortText": "reduceWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n" + }, "insertText": "->TypedArray.reduceWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.map", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceWithIndex", + "sortText": "reduceWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => 'b) => t<'b>", - "documentation": {"kind": "markdown", "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n"}, - "sortText": "map", + "documentation": { + "kind": "markdown", + "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n" + }, "insertText": "->TypedArray.map", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toSorted", "kind": 12, - "tags": [], + "label": "->TypedArray.map", + "sortText": "map", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n"}, - "sortText": "toSorted", + "documentation": { + "kind": "markdown", + "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n" + }, "insertText": "->TypedArray.toSorted", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyAllWithin", "kind": 12, - "tags": [], + "label": "->TypedArray.toSorted", + "sortText": "toSorted", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~target: int) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n"}, - "sortText": "copyAllWithin", + "documentation": { + "kind": "markdown", + "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n" + }, "insertText": "->TypedArray.copyAllWithin", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.subarray", "kind": 12, - "tags": [], + "label": "->TypedArray.copyAllWithin", + "sortText": "copyAllWithin", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n"}, - "sortText": "subarray", + "documentation": { + "kind": "markdown", + "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n" + }, "insertText": "->TypedArray.subarray", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.setArray", "kind": 12, - "tags": [], + "label": "->TypedArray.subarray", + "sortText": "subarray", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, array<'a>) => unit", - "documentation": {"kind": "markdown", "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n"}, - "sortText": "setArray", + "documentation": { + "kind": "markdown", + "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n" + }, "insertText": "->TypedArray.setArray", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.get", "kind": 12, - "tags": [], + "label": "->TypedArray.setArray", + "sortText": "setArray", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n"}, - "sortText": "get", + "documentation": { + "kind": "markdown", + "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n" + }, "insertText": "->TypedArray.get", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.with", "kind": 12, - "tags": [], + "label": "->TypedArray.get", + "sortText": "get", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int, 'a) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n"}, - "sortText": "with", + "documentation": { + "kind": "markdown", + "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + }, "insertText": "->TypedArray.with", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toReversed", "kind": 12, - "tags": [], + "label": "->TypedArray.with", + "sortText": "with", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n"}, - "sortText": "toReversed", + "documentation": { + "kind": "markdown", + "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + }, "insertText": "->TypedArray.toReversed", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyWithin", "kind": 12, - "tags": [], + "label": "->TypedArray.toReversed", + "sortText": "toReversed", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n"}, - "sortText": "copyWithin", + "documentation": { + "kind": "markdown", + "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n" + }, "insertText": "->TypedArray.copyWithin", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.everyWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.copyWithin", + "sortText": "copyWithin", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n"}, - "sortText": "everyWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n" + }, "insertText": "->TypedArray.everyWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toString", "kind": 12, - "tags": [], + "label": "->TypedArray.everyWithIndex", + "sortText": "everyWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => string", - "documentation": {"kind": "markdown", "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n"}, - "sortText": "toString", + "documentation": { + "kind": "markdown", + "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n" + }, "insertText": "->TypedArray.toString", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.setArrayFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.toString", + "sortText": "toString", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, array<'a>, int) => unit", - "documentation": {"kind": "markdown", "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n"}, - "sortText": "setArrayFrom", + "documentation": { + "kind": "markdown", + "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n" + }, "insertText": "->TypedArray.setArrayFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.forEach", "kind": 12, - "tags": [], + "label": "->TypedArray.setArrayFrom", + "sortText": "setArrayFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => unit) => unit", - "documentation": {"kind": "markdown", "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n"}, - "sortText": "forEach", + "documentation": { + "kind": "markdown", + "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n" + }, "insertText": "->TypedArray.forEach", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.forEach", + "sortText": "forEach", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n"}, - "sortText": "findWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n" + }, "insertText": "->TypedArray.findWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fill", "kind": 12, - "tags": [], + "label": "->TypedArray.findWithIndex", + "sortText": "findWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n"}, - "sortText": "fill", + "documentation": { + "kind": "markdown", + "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n" + }, "insertText": "->TypedArray.fill", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.indexOfFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.fill", + "sortText": "fill", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, int) => int", - "documentation": {"kind": "markdown", "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n"}, - "sortText": "indexOfFrom", + "documentation": { + "kind": "markdown", + "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n" + }, "insertText": "->TypedArray.indexOfFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reverse", "kind": 12, - "tags": [], + "label": "->TypedArray.indexOfFrom", + "sortText": "indexOfFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => unit", - "documentation": {"kind": "markdown", "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n"}, - "sortText": "reverse", + "documentation": { + "kind": "markdown", + "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n" + }, "insertText": "->TypedArray.reverse", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }, { - "label": "->TypedArray.byteOffset", "kind": 12, - "tags": [], + "label": "->TypedArray.reverse", + "sortText": "reverse", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 16, "line": 13 }, + "start": { "character": 15, "line": 13 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n"}, - "sortText": "byteOffset", + "documentation": { + "kind": "markdown", + "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n" + }, "insertText": "->TypedArray.byteOffset", - "additionalTextEdits": [{ - "range": {"start": {"line": 13, "character": 15}, "end": {"line": 13, "character": 16}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->TypedArray.byteOffset", + "sortText": "byteOffset", + "tags": [] + } +] Complete src/CompletionTypedArrays.res 17:14 posCursor:[17:14] posNoWhite:[17:13] Found expr:[17:3->17:14] @@ -2774,679 +5243,1296 @@ CPPipe pathFromEnv:Stdlib.Int16Array found:false Path Stdlib.Int16Array. Path Stdlib.TypedArray. Path -[{ - "label": "->Int16Array.ignore", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t => unit", - "documentation": {"kind": "markdown", "value": "\n `ignore(intArray)` ignores the provided intArray 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"}, - "sortText": "ignore", + "documentation": { + "kind": "markdown", + "value": "\n `ignore(intArray)` ignores the provided intArray 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" + }, "insertText": "->Int16Array.ignore", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastIndexWithIndex", "kind": 12, - "tags": [], + "label": "->Int16Array.ignore", + "sortText": "ignore", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n"}, - "sortText": "findLastIndexWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n" + }, "insertText": "->TypedArray.findLastIndexWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.lastIndexOf", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastIndexWithIndex", + "sortText": "findLastIndexWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => int", - "documentation": {"kind": "markdown", "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n"}, - "sortText": "lastIndexOf", + "documentation": { + "kind": "markdown", + "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n" + }, "insertText": "->TypedArray.lastIndexOf", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.lastIndexOf", + "sortText": "lastIndexOf", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n"}, - "sortText": "findLastWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n" + }, "insertText": "->TypedArray.findLastWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLast", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastWithIndex", + "sortText": "findLastWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n"}, - "sortText": "findLast", + "documentation": { + "kind": "markdown", + "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n" + }, "insertText": "->TypedArray.findLast", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.filter", "kind": 12, - "tags": [], + "label": "->TypedArray.findLast", + "sortText": "findLast", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n"}, - "sortText": "filter", + "documentation": { + "kind": "markdown", + "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n" + }, "insertText": "->TypedArray.filter", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.byteLength", "kind": 12, - "tags": [], + "label": "->TypedArray.filter", + "sortText": "filter", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n"}, - "sortText": "byteLength", + "documentation": { + "kind": "markdown", + "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n" + }, "insertText": "->TypedArray.byteLength", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.ignore", "kind": 12, - "tags": [], + "label": "->TypedArray.byteLength", + "sortText": "byteLength", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => unit", - "documentation": {"kind": "markdown", "value": "\n `ignore(typedArray)` ignores the provided typedArray 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"}, - "sortText": "ignore", + "documentation": { + "kind": "markdown", + "value": "\n `ignore(typedArray)` ignores the provided typedArray 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" + }, "insertText": "->TypedArray.ignore", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceRightWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.ignore", + "sortText": "ignore", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n"}, - "sortText": "reduceRightWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n" + }, "insertText": "->TypedArray.reduceRightWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceRight", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceRightWithIndex", + "sortText": "reduceRightWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n"}, - "sortText": "reduceRight", + "documentation": { + "kind": "markdown", + "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n" + }, "insertText": "->TypedArray.reduceRight", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.joinWith", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceRight", + "sortText": "reduceRight", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, string) => string", - "documentation": {"kind": "markdown", "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n"}, - "sortText": "joinWith", + "documentation": { + "kind": "markdown", + "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n" + }, "insertText": "->TypedArray.joinWith", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.buffer", "kind": 12, - "tags": [], + "label": "->TypedArray.joinWith", + "sortText": "joinWith", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => ArrayBuffer.t", - "documentation": {"kind": "markdown", "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n"}, - "sortText": "buffer", + "documentation": { + "kind": "markdown", + "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n" + }, "insertText": "->TypedArray.buffer", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduce", "kind": 12, - "tags": [], + "label": "->TypedArray.buffer", + "sortText": "buffer", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n"}, - "sortText": "reduce", + "documentation": { + "kind": "markdown", + "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n" + }, "insertText": "->TypedArray.reduce", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.forEachWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.reduce", + "sortText": "reduce", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => unit) => unit", - "documentation": {"kind": "markdown", "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n"}, - "sortText": "forEachWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n" + }, "insertText": "->TypedArray.forEachWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copy", "kind": 12, - "tags": [], + "label": "->TypedArray.forEachWithIndex", + "sortText": "forEachWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n"}, - "sortText": "copy", + "documentation": { + "kind": "markdown", + "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n" + }, "insertText": "->TypedArray.copy", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.someWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.copy", + "sortText": "copy", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n"}, - "sortText": "someWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n" + }, "insertText": "->TypedArray.someWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findIndexWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.someWithIndex", + "sortText": "someWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n"}, - "sortText": "findIndexWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n" + }, "insertText": "->TypedArray.findIndexWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.sliceToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.findIndexWithIndex", + "sortText": "findIndexWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n"}, - "sortText": "sliceToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n" + }, "insertText": "->TypedArray.sliceToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.slice", "kind": 12, - "tags": [], + "label": "->TypedArray.sliceToEnd", + "sortText": "sliceToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n"}, - "sortText": "slice", + "documentation": { + "kind": "markdown", + "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n" + }, "insertText": "->TypedArray.slice", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.slice", + "sortText": "slice", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n"}, - "sortText": "findLastIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n" + }, "insertText": "->TypedArray.findLastIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.includes", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastIndex", + "sortText": "findLastIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => bool", - "documentation": {"kind": "markdown", "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n"}, - "sortText": "includes", + "documentation": { + "kind": "markdown", + "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n" + }, "insertText": "->TypedArray.includes", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fillToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.includes", + "sortText": "includes", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, 'a, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n"}, - "sortText": "fillToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n" + }, "insertText": "->TypedArray.fillToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fillAll", "kind": 12, - "tags": [], + "label": "->TypedArray.fillToEnd", + "sortText": "fillToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n"}, - "sortText": "fillAll", + "documentation": { + "kind": "markdown", + "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n" + }, "insertText": "->TypedArray.fillAll", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.find", "kind": 12, - "tags": [], + "label": "->TypedArray.fillAll", + "sortText": "fillAll", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n"}, - "sortText": "find", + "documentation": { + "kind": "markdown", + "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n" + }, "insertText": "->TypedArray.find", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.subarrayToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.find", + "sortText": "find", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n"}, - "sortText": "subarrayToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n" + }, "insertText": "->TypedArray.subarrayToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.set", "kind": 12, - "tags": [], + "label": "->TypedArray.subarrayToEnd", + "sortText": "subarrayToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int, 'a) => unit", - "documentation": {"kind": "markdown", "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n"}, - "sortText": "set", + "documentation": { + "kind": "markdown", + "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n" + }, "insertText": "->TypedArray.set", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toLocaleString", "kind": 12, - "tags": [], + "label": "->TypedArray.set", + "sortText": "set", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => string", - "documentation": {"kind": "markdown", "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n"}, - "sortText": "toLocaleString", + "documentation": { + "kind": "markdown", + "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n" + }, "insertText": "->TypedArray.toLocaleString", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.lastIndexOfFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.toLocaleString", + "sortText": "toLocaleString", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, int) => int", - "documentation": {"kind": "markdown", "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n"}, - "sortText": "lastIndexOfFrom", + "documentation": { + "kind": "markdown", + "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n" + }, "insertText": "->TypedArray.lastIndexOfFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.lastIndexOfFrom", + "sortText": "lastIndexOfFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n"}, - "sortText": "findIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n" + }, "insertText": "->TypedArray.findIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.filterWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.findIndex", + "sortText": "findIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n"}, - "sortText": "filterWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n" + }, "insertText": "->TypedArray.filterWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.sort", "kind": 12, - "tags": [], + "label": "->TypedArray.filterWithIndex", + "sortText": "filterWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", - "documentation": {"kind": "markdown", "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n"}, - "sortText": "sort", + "documentation": { + "kind": "markdown", + "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n" + }, "insertText": "->TypedArray.sort", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.mapWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.sort", + "sortText": "sort", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", - "documentation": {"kind": "markdown", "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n"}, - "sortText": "mapWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n" + }, "insertText": "->TypedArray.mapWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.every", "kind": 12, - "tags": [], + "label": "->TypedArray.mapWithIndex", + "sortText": "mapWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n"}, - "sortText": "every", + "documentation": { + "kind": "markdown", + "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n" + }, "insertText": "->TypedArray.every", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.length", "kind": 12, - "tags": [], + "label": "->TypedArray.every", + "sortText": "every", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n"}, - "sortText": "length", + "documentation": { + "kind": "markdown", + "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n" + }, "insertText": "->TypedArray.length", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.indexOf", "kind": 12, - "tags": [], + "label": "->TypedArray.length", + "sortText": "length", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => int", - "documentation": {"kind": "markdown", "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n"}, - "sortText": "indexOf", + "documentation": { + "kind": "markdown", + "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n" + }, "insertText": "->TypedArray.indexOf", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyWithinToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.indexOf", + "sortText": "indexOf", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n"}, - "sortText": "copyWithinToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n" + }, "insertText": "->TypedArray.copyWithinToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.some", "kind": 12, - "tags": [], + "label": "->TypedArray.copyWithinToEnd", + "sortText": "copyWithinToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n"}, - "sortText": "some", + "documentation": { + "kind": "markdown", + "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n" + }, "insertText": "->TypedArray.some", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.some", + "sortText": "some", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n"}, - "sortText": "reduceWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n" + }, "insertText": "->TypedArray.reduceWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.map", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceWithIndex", + "sortText": "reduceWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => 'b) => t<'b>", - "documentation": {"kind": "markdown", "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n"}, - "sortText": "map", + "documentation": { + "kind": "markdown", + "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n" + }, "insertText": "->TypedArray.map", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toSorted", "kind": 12, - "tags": [], + "label": "->TypedArray.map", + "sortText": "map", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n"}, - "sortText": "toSorted", + "documentation": { + "kind": "markdown", + "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n" + }, "insertText": "->TypedArray.toSorted", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyAllWithin", "kind": 12, - "tags": [], + "label": "->TypedArray.toSorted", + "sortText": "toSorted", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~target: int) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n"}, - "sortText": "copyAllWithin", + "documentation": { + "kind": "markdown", + "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n" + }, "insertText": "->TypedArray.copyAllWithin", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.subarray", "kind": 12, - "tags": [], + "label": "->TypedArray.copyAllWithin", + "sortText": "copyAllWithin", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n"}, - "sortText": "subarray", + "documentation": { + "kind": "markdown", + "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n" + }, "insertText": "->TypedArray.subarray", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.setArray", "kind": 12, - "tags": [], + "label": "->TypedArray.subarray", + "sortText": "subarray", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, array<'a>) => unit", - "documentation": {"kind": "markdown", "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n"}, - "sortText": "setArray", + "documentation": { + "kind": "markdown", + "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n" + }, "insertText": "->TypedArray.setArray", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.get", "kind": 12, - "tags": [], + "label": "->TypedArray.setArray", + "sortText": "setArray", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n"}, - "sortText": "get", + "documentation": { + "kind": "markdown", + "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n" + }, "insertText": "->TypedArray.get", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.with", "kind": 12, - "tags": [], + "label": "->TypedArray.get", + "sortText": "get", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int, 'a) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n"}, - "sortText": "with", + "documentation": { + "kind": "markdown", + "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + }, "insertText": "->TypedArray.with", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toReversed", "kind": 12, - "tags": [], + "label": "->TypedArray.with", + "sortText": "with", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n"}, - "sortText": "toReversed", + "documentation": { + "kind": "markdown", + "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + }, "insertText": "->TypedArray.toReversed", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyWithin", "kind": 12, - "tags": [], + "label": "->TypedArray.toReversed", + "sortText": "toReversed", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n"}, - "sortText": "copyWithin", + "documentation": { + "kind": "markdown", + "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n" + }, "insertText": "->TypedArray.copyWithin", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.everyWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.copyWithin", + "sortText": "copyWithin", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n"}, - "sortText": "everyWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n" + }, "insertText": "->TypedArray.everyWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toString", "kind": 12, - "tags": [], + "label": "->TypedArray.everyWithIndex", + "sortText": "everyWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => string", - "documentation": {"kind": "markdown", "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n"}, - "sortText": "toString", + "documentation": { + "kind": "markdown", + "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n" + }, "insertText": "->TypedArray.toString", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.setArrayFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.toString", + "sortText": "toString", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, array<'a>, int) => unit", - "documentation": {"kind": "markdown", "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n"}, - "sortText": "setArrayFrom", + "documentation": { + "kind": "markdown", + "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n" + }, "insertText": "->TypedArray.setArrayFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.forEach", "kind": 12, - "tags": [], + "label": "->TypedArray.setArrayFrom", + "sortText": "setArrayFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => unit) => unit", - "documentation": {"kind": "markdown", "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n"}, - "sortText": "forEach", + "documentation": { + "kind": "markdown", + "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n" + }, "insertText": "->TypedArray.forEach", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.forEach", + "sortText": "forEach", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n"}, - "sortText": "findWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n" + }, "insertText": "->TypedArray.findWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fill", "kind": 12, - "tags": [], + "label": "->TypedArray.findWithIndex", + "sortText": "findWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n"}, - "sortText": "fill", + "documentation": { + "kind": "markdown", + "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n" + }, "insertText": "->TypedArray.fill", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.indexOfFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.fill", + "sortText": "fill", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, int) => int", - "documentation": {"kind": "markdown", "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n"}, - "sortText": "indexOfFrom", + "documentation": { + "kind": "markdown", + "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n" + }, "insertText": "->TypedArray.indexOfFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reverse", "kind": 12, - "tags": [], + "label": "->TypedArray.indexOfFrom", + "sortText": "indexOfFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => unit", - "documentation": {"kind": "markdown", "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n"}, - "sortText": "reverse", + "documentation": { + "kind": "markdown", + "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n" + }, "insertText": "->TypedArray.reverse", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.byteOffset", "kind": 12, - "tags": [], + "label": "->TypedArray.reverse", + "sortText": "reverse", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 13, "line": 17 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n"}, - "sortText": "byteOffset", + "documentation": { + "kind": "markdown", + "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n" + }, "insertText": "->TypedArray.byteOffset", - "additionalTextEdits": [{ - "range": {"start": {"line": 17, "character": 13}, "end": {"line": 17, "character": 14}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->TypedArray.byteOffset", + "sortText": "byteOffset", + "tags": [] + } +] Complete src/CompletionTypedArrays.res 21:14 posCursor:[21:14] posNoWhite:[21:13] Found expr:[21:3->21:14] @@ -3464,679 +6550,1296 @@ CPPipe pathFromEnv:Stdlib.Int32Array found:false Path Stdlib.Int32Array. Path Stdlib.TypedArray. Path -[{ - "label": "->Int32Array.ignore", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t => unit", - "documentation": {"kind": "markdown", "value": "\n `ignore(intArray)` ignores the provided intArray 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"}, - "sortText": "ignore", + "documentation": { + "kind": "markdown", + "value": "\n `ignore(intArray)` ignores the provided intArray 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" + }, "insertText": "->Int32Array.ignore", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastIndexWithIndex", "kind": 12, - "tags": [], + "label": "->Int32Array.ignore", + "sortText": "ignore", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n"}, - "sortText": "findLastIndexWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n" + }, "insertText": "->TypedArray.findLastIndexWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.lastIndexOf", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastIndexWithIndex", + "sortText": "findLastIndexWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => int", - "documentation": {"kind": "markdown", "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n"}, - "sortText": "lastIndexOf", + "documentation": { + "kind": "markdown", + "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n" + }, "insertText": "->TypedArray.lastIndexOf", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.lastIndexOf", + "sortText": "lastIndexOf", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n"}, - "sortText": "findLastWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n" + }, "insertText": "->TypedArray.findLastWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLast", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastWithIndex", + "sortText": "findLastWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n"}, - "sortText": "findLast", + "documentation": { + "kind": "markdown", + "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n" + }, "insertText": "->TypedArray.findLast", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.filter", "kind": 12, - "tags": [], + "label": "->TypedArray.findLast", + "sortText": "findLast", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n"}, - "sortText": "filter", + "documentation": { + "kind": "markdown", + "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n" + }, "insertText": "->TypedArray.filter", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.byteLength", "kind": 12, - "tags": [], + "label": "->TypedArray.filter", + "sortText": "filter", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n"}, - "sortText": "byteLength", + "documentation": { + "kind": "markdown", + "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n" + }, "insertText": "->TypedArray.byteLength", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.ignore", "kind": 12, - "tags": [], + "label": "->TypedArray.byteLength", + "sortText": "byteLength", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => unit", - "documentation": {"kind": "markdown", "value": "\n `ignore(typedArray)` ignores the provided typedArray 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"}, - "sortText": "ignore", + "documentation": { + "kind": "markdown", + "value": "\n `ignore(typedArray)` ignores the provided typedArray 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" + }, "insertText": "->TypedArray.ignore", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceRightWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.ignore", + "sortText": "ignore", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n"}, - "sortText": "reduceRightWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n" + }, "insertText": "->TypedArray.reduceRightWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceRight", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceRightWithIndex", + "sortText": "reduceRightWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n"}, - "sortText": "reduceRight", + "documentation": { + "kind": "markdown", + "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n" + }, "insertText": "->TypedArray.reduceRight", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.joinWith", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceRight", + "sortText": "reduceRight", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, string) => string", - "documentation": {"kind": "markdown", "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n"}, - "sortText": "joinWith", + "documentation": { + "kind": "markdown", + "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n" + }, "insertText": "->TypedArray.joinWith", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.buffer", "kind": 12, - "tags": [], + "label": "->TypedArray.joinWith", + "sortText": "joinWith", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => ArrayBuffer.t", - "documentation": {"kind": "markdown", "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n"}, - "sortText": "buffer", + "documentation": { + "kind": "markdown", + "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n" + }, "insertText": "->TypedArray.buffer", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduce", "kind": 12, - "tags": [], + "label": "->TypedArray.buffer", + "sortText": "buffer", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n"}, - "sortText": "reduce", + "documentation": { + "kind": "markdown", + "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n" + }, "insertText": "->TypedArray.reduce", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.forEachWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.reduce", + "sortText": "reduce", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => unit) => unit", - "documentation": {"kind": "markdown", "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n"}, - "sortText": "forEachWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n" + }, "insertText": "->TypedArray.forEachWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copy", "kind": 12, - "tags": [], + "label": "->TypedArray.forEachWithIndex", + "sortText": "forEachWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n"}, - "sortText": "copy", + "documentation": { + "kind": "markdown", + "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n" + }, "insertText": "->TypedArray.copy", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.someWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.copy", + "sortText": "copy", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n"}, - "sortText": "someWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n" + }, "insertText": "->TypedArray.someWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findIndexWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.someWithIndex", + "sortText": "someWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n"}, - "sortText": "findIndexWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n" + }, "insertText": "->TypedArray.findIndexWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.sliceToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.findIndexWithIndex", + "sortText": "findIndexWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n"}, - "sortText": "sliceToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n" + }, "insertText": "->TypedArray.sliceToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.slice", "kind": 12, - "tags": [], + "label": "->TypedArray.sliceToEnd", + "sortText": "sliceToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n"}, - "sortText": "slice", + "documentation": { + "kind": "markdown", + "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n" + }, "insertText": "->TypedArray.slice", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.slice", + "sortText": "slice", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n"}, - "sortText": "findLastIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n" + }, "insertText": "->TypedArray.findLastIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.includes", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastIndex", + "sortText": "findLastIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => bool", - "documentation": {"kind": "markdown", "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n"}, - "sortText": "includes", + "documentation": { + "kind": "markdown", + "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n" + }, "insertText": "->TypedArray.includes", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fillToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.includes", + "sortText": "includes", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, 'a, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n"}, - "sortText": "fillToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n" + }, "insertText": "->TypedArray.fillToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fillAll", "kind": 12, - "tags": [], + "label": "->TypedArray.fillToEnd", + "sortText": "fillToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n"}, - "sortText": "fillAll", + "documentation": { + "kind": "markdown", + "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n" + }, "insertText": "->TypedArray.fillAll", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.find", "kind": 12, - "tags": [], + "label": "->TypedArray.fillAll", + "sortText": "fillAll", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n"}, - "sortText": "find", + "documentation": { + "kind": "markdown", + "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n" + }, "insertText": "->TypedArray.find", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.subarrayToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.find", + "sortText": "find", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n"}, - "sortText": "subarrayToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n" + }, "insertText": "->TypedArray.subarrayToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.set", "kind": 12, - "tags": [], + "label": "->TypedArray.subarrayToEnd", + "sortText": "subarrayToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int, 'a) => unit", - "documentation": {"kind": "markdown", "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n"}, - "sortText": "set", + "documentation": { + "kind": "markdown", + "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n" + }, "insertText": "->TypedArray.set", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toLocaleString", "kind": 12, - "tags": [], + "label": "->TypedArray.set", + "sortText": "set", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => string", - "documentation": {"kind": "markdown", "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n"}, - "sortText": "toLocaleString", + "documentation": { + "kind": "markdown", + "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n" + }, "insertText": "->TypedArray.toLocaleString", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.lastIndexOfFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.toLocaleString", + "sortText": "toLocaleString", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, int) => int", - "documentation": {"kind": "markdown", "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n"}, - "sortText": "lastIndexOfFrom", + "documentation": { + "kind": "markdown", + "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n" + }, "insertText": "->TypedArray.lastIndexOfFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.lastIndexOfFrom", + "sortText": "lastIndexOfFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n"}, - "sortText": "findIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n" + }, "insertText": "->TypedArray.findIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.filterWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.findIndex", + "sortText": "findIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n"}, - "sortText": "filterWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n" + }, "insertText": "->TypedArray.filterWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.sort", "kind": 12, - "tags": [], + "label": "->TypedArray.filterWithIndex", + "sortText": "filterWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", - "documentation": {"kind": "markdown", "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n"}, - "sortText": "sort", + "documentation": { + "kind": "markdown", + "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n" + }, "insertText": "->TypedArray.sort", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.mapWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.sort", + "sortText": "sort", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", - "documentation": {"kind": "markdown", "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n"}, - "sortText": "mapWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n" + }, "insertText": "->TypedArray.mapWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.every", "kind": 12, - "tags": [], + "label": "->TypedArray.mapWithIndex", + "sortText": "mapWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n"}, - "sortText": "every", + "documentation": { + "kind": "markdown", + "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n" + }, "insertText": "->TypedArray.every", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.length", "kind": 12, - "tags": [], + "label": "->TypedArray.every", + "sortText": "every", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n"}, - "sortText": "length", + "documentation": { + "kind": "markdown", + "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n" + }, "insertText": "->TypedArray.length", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.indexOf", "kind": 12, - "tags": [], + "label": "->TypedArray.length", + "sortText": "length", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => int", - "documentation": {"kind": "markdown", "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n"}, - "sortText": "indexOf", + "documentation": { + "kind": "markdown", + "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n" + }, "insertText": "->TypedArray.indexOf", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyWithinToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.indexOf", + "sortText": "indexOf", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n"}, - "sortText": "copyWithinToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n" + }, "insertText": "->TypedArray.copyWithinToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.some", "kind": 12, - "tags": [], + "label": "->TypedArray.copyWithinToEnd", + "sortText": "copyWithinToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n"}, - "sortText": "some", + "documentation": { + "kind": "markdown", + "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n" + }, "insertText": "->TypedArray.some", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.some", + "sortText": "some", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n"}, - "sortText": "reduceWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n" + }, "insertText": "->TypedArray.reduceWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.map", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceWithIndex", + "sortText": "reduceWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => 'b) => t<'b>", - "documentation": {"kind": "markdown", "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n"}, - "sortText": "map", + "documentation": { + "kind": "markdown", + "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n" + }, "insertText": "->TypedArray.map", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toSorted", "kind": 12, - "tags": [], + "label": "->TypedArray.map", + "sortText": "map", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n"}, - "sortText": "toSorted", + "documentation": { + "kind": "markdown", + "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n" + }, "insertText": "->TypedArray.toSorted", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyAllWithin", "kind": 12, - "tags": [], + "label": "->TypedArray.toSorted", + "sortText": "toSorted", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~target: int) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n"}, - "sortText": "copyAllWithin", + "documentation": { + "kind": "markdown", + "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n" + }, "insertText": "->TypedArray.copyAllWithin", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.subarray", "kind": 12, - "tags": [], + "label": "->TypedArray.copyAllWithin", + "sortText": "copyAllWithin", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n"}, - "sortText": "subarray", + "documentation": { + "kind": "markdown", + "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n" + }, "insertText": "->TypedArray.subarray", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.setArray", "kind": 12, - "tags": [], + "label": "->TypedArray.subarray", + "sortText": "subarray", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, array<'a>) => unit", - "documentation": {"kind": "markdown", "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n"}, - "sortText": "setArray", + "documentation": { + "kind": "markdown", + "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n" + }, "insertText": "->TypedArray.setArray", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.get", "kind": 12, - "tags": [], + "label": "->TypedArray.setArray", + "sortText": "setArray", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n"}, - "sortText": "get", + "documentation": { + "kind": "markdown", + "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n" + }, "insertText": "->TypedArray.get", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.with", "kind": 12, - "tags": [], + "label": "->TypedArray.get", + "sortText": "get", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int, 'a) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n"}, - "sortText": "with", + "documentation": { + "kind": "markdown", + "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + }, "insertText": "->TypedArray.with", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toReversed", "kind": 12, - "tags": [], + "label": "->TypedArray.with", + "sortText": "with", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n"}, - "sortText": "toReversed", + "documentation": { + "kind": "markdown", + "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + }, "insertText": "->TypedArray.toReversed", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyWithin", "kind": 12, - "tags": [], + "label": "->TypedArray.toReversed", + "sortText": "toReversed", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n"}, - "sortText": "copyWithin", + "documentation": { + "kind": "markdown", + "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n" + }, "insertText": "->TypedArray.copyWithin", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.everyWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.copyWithin", + "sortText": "copyWithin", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n"}, - "sortText": "everyWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n" + }, "insertText": "->TypedArray.everyWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toString", "kind": 12, - "tags": [], + "label": "->TypedArray.everyWithIndex", + "sortText": "everyWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => string", - "documentation": {"kind": "markdown", "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n"}, - "sortText": "toString", + "documentation": { + "kind": "markdown", + "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n" + }, "insertText": "->TypedArray.toString", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.setArrayFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.toString", + "sortText": "toString", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, array<'a>, int) => unit", - "documentation": {"kind": "markdown", "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n"}, - "sortText": "setArrayFrom", + "documentation": { + "kind": "markdown", + "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n" + }, "insertText": "->TypedArray.setArrayFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.forEach", "kind": 12, - "tags": [], + "label": "->TypedArray.setArrayFrom", + "sortText": "setArrayFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => unit) => unit", - "documentation": {"kind": "markdown", "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n"}, - "sortText": "forEach", + "documentation": { + "kind": "markdown", + "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n" + }, "insertText": "->TypedArray.forEach", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.forEach", + "sortText": "forEach", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n"}, - "sortText": "findWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n" + }, "insertText": "->TypedArray.findWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fill", "kind": 12, - "tags": [], + "label": "->TypedArray.findWithIndex", + "sortText": "findWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n"}, - "sortText": "fill", + "documentation": { + "kind": "markdown", + "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n" + }, "insertText": "->TypedArray.fill", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.indexOfFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.fill", + "sortText": "fill", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, int) => int", - "documentation": {"kind": "markdown", "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n"}, - "sortText": "indexOfFrom", + "documentation": { + "kind": "markdown", + "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n" + }, "insertText": "->TypedArray.indexOfFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reverse", "kind": 12, - "tags": [], + "label": "->TypedArray.indexOfFrom", + "sortText": "indexOfFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => unit", - "documentation": {"kind": "markdown", "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n"}, - "sortText": "reverse", + "documentation": { + "kind": "markdown", + "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n" + }, "insertText": "->TypedArray.reverse", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.byteOffset", "kind": 12, - "tags": [], + "label": "->TypedArray.reverse", + "sortText": "reverse", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 21 }, + "start": { "character": 13, "line": 21 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n"}, - "sortText": "byteOffset", + "documentation": { + "kind": "markdown", + "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n" + }, "insertText": "->TypedArray.byteOffset", - "additionalTextEdits": [{ - "range": {"start": {"line": 21, "character": 13}, "end": {"line": 21, "character": 14}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->TypedArray.byteOffset", + "sortText": "byteOffset", + "tags": [] + } +] Complete src/CompletionTypedArrays.res 25:13 posCursor:[25:13] posNoWhite:[25:12] Found expr:[25:3->25:13] @@ -4154,679 +7857,1296 @@ CPPipe pathFromEnv:Stdlib.Int8Array found:false Path Stdlib.Int8Array. Path Stdlib.TypedArray. Path -[{ - "label": "->Int8Array.ignore", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t => unit", - "documentation": {"kind": "markdown", "value": "\n `ignore(intArray)` ignores the provided intArray 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"}, - "sortText": "ignore", + "documentation": { + "kind": "markdown", + "value": "\n `ignore(intArray)` ignores the provided intArray 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" + }, "insertText": "->Int8Array.ignore", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastIndexWithIndex", "kind": 12, - "tags": [], + "label": "->Int8Array.ignore", + "sortText": "ignore", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n"}, - "sortText": "findLastIndexWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n" + }, "insertText": "->TypedArray.findLastIndexWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.lastIndexOf", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastIndexWithIndex", + "sortText": "findLastIndexWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => int", - "documentation": {"kind": "markdown", "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n"}, - "sortText": "lastIndexOf", + "documentation": { + "kind": "markdown", + "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n" + }, "insertText": "->TypedArray.lastIndexOf", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.lastIndexOf", + "sortText": "lastIndexOf", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n"}, - "sortText": "findLastWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n" + }, "insertText": "->TypedArray.findLastWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLast", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastWithIndex", + "sortText": "findLastWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n"}, - "sortText": "findLast", + "documentation": { + "kind": "markdown", + "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n" + }, "insertText": "->TypedArray.findLast", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.filter", "kind": 12, - "tags": [], + "label": "->TypedArray.findLast", + "sortText": "findLast", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n"}, - "sortText": "filter", + "documentation": { + "kind": "markdown", + "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n" + }, "insertText": "->TypedArray.filter", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.byteLength", "kind": 12, - "tags": [], + "label": "->TypedArray.filter", + "sortText": "filter", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n"}, - "sortText": "byteLength", + "documentation": { + "kind": "markdown", + "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n" + }, "insertText": "->TypedArray.byteLength", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.ignore", "kind": 12, - "tags": [], + "label": "->TypedArray.byteLength", + "sortText": "byteLength", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => unit", - "documentation": {"kind": "markdown", "value": "\n `ignore(typedArray)` ignores the provided typedArray 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"}, - "sortText": "ignore", + "documentation": { + "kind": "markdown", + "value": "\n `ignore(typedArray)` ignores the provided typedArray 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" + }, "insertText": "->TypedArray.ignore", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceRightWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.ignore", + "sortText": "ignore", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n"}, - "sortText": "reduceRightWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n" + }, "insertText": "->TypedArray.reduceRightWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceRight", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceRightWithIndex", + "sortText": "reduceRightWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n"}, - "sortText": "reduceRight", + "documentation": { + "kind": "markdown", + "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n" + }, "insertText": "->TypedArray.reduceRight", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.joinWith", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceRight", + "sortText": "reduceRight", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, string) => string", - "documentation": {"kind": "markdown", "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n"}, - "sortText": "joinWith", + "documentation": { + "kind": "markdown", + "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n" + }, "insertText": "->TypedArray.joinWith", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.buffer", "kind": 12, - "tags": [], + "label": "->TypedArray.joinWith", + "sortText": "joinWith", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => ArrayBuffer.t", - "documentation": {"kind": "markdown", "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n"}, - "sortText": "buffer", + "documentation": { + "kind": "markdown", + "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n" + }, "insertText": "->TypedArray.buffer", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduce", "kind": 12, - "tags": [], + "label": "->TypedArray.buffer", + "sortText": "buffer", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n"}, - "sortText": "reduce", + "documentation": { + "kind": "markdown", + "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n" + }, "insertText": "->TypedArray.reduce", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.forEachWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.reduce", + "sortText": "reduce", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => unit) => unit", - "documentation": {"kind": "markdown", "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n"}, - "sortText": "forEachWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n" + }, "insertText": "->TypedArray.forEachWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copy", "kind": 12, - "tags": [], + "label": "->TypedArray.forEachWithIndex", + "sortText": "forEachWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n"}, - "sortText": "copy", + "documentation": { + "kind": "markdown", + "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n" + }, "insertText": "->TypedArray.copy", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.someWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.copy", + "sortText": "copy", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n"}, - "sortText": "someWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n" + }, "insertText": "->TypedArray.someWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findIndexWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.someWithIndex", + "sortText": "someWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n"}, - "sortText": "findIndexWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n" + }, "insertText": "->TypedArray.findIndexWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.sliceToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.findIndexWithIndex", + "sortText": "findIndexWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n"}, - "sortText": "sliceToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n" + }, "insertText": "->TypedArray.sliceToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.slice", "kind": 12, - "tags": [], + "label": "->TypedArray.sliceToEnd", + "sortText": "sliceToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n"}, - "sortText": "slice", + "documentation": { + "kind": "markdown", + "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n" + }, "insertText": "->TypedArray.slice", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.slice", + "sortText": "slice", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n"}, - "sortText": "findLastIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n" + }, "insertText": "->TypedArray.findLastIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.includes", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastIndex", + "sortText": "findLastIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => bool", - "documentation": {"kind": "markdown", "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n"}, - "sortText": "includes", + "documentation": { + "kind": "markdown", + "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n" + }, "insertText": "->TypedArray.includes", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fillToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.includes", + "sortText": "includes", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, 'a, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n"}, - "sortText": "fillToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n" + }, "insertText": "->TypedArray.fillToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fillAll", "kind": 12, - "tags": [], + "label": "->TypedArray.fillToEnd", + "sortText": "fillToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n"}, - "sortText": "fillAll", + "documentation": { + "kind": "markdown", + "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n" + }, "insertText": "->TypedArray.fillAll", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.find", "kind": 12, - "tags": [], + "label": "->TypedArray.fillAll", + "sortText": "fillAll", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n"}, - "sortText": "find", + "documentation": { + "kind": "markdown", + "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n" + }, "insertText": "->TypedArray.find", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.subarrayToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.find", + "sortText": "find", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n"}, - "sortText": "subarrayToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n" + }, "insertText": "->TypedArray.subarrayToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.set", "kind": 12, - "tags": [], + "label": "->TypedArray.subarrayToEnd", + "sortText": "subarrayToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int, 'a) => unit", - "documentation": {"kind": "markdown", "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n"}, - "sortText": "set", + "documentation": { + "kind": "markdown", + "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n" + }, "insertText": "->TypedArray.set", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toLocaleString", "kind": 12, - "tags": [], + "label": "->TypedArray.set", + "sortText": "set", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => string", - "documentation": {"kind": "markdown", "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n"}, - "sortText": "toLocaleString", + "documentation": { + "kind": "markdown", + "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n" + }, "insertText": "->TypedArray.toLocaleString", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.lastIndexOfFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.toLocaleString", + "sortText": "toLocaleString", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, int) => int", - "documentation": {"kind": "markdown", "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n"}, - "sortText": "lastIndexOfFrom", + "documentation": { + "kind": "markdown", + "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n" + }, "insertText": "->TypedArray.lastIndexOfFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.lastIndexOfFrom", + "sortText": "lastIndexOfFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n"}, - "sortText": "findIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n" + }, "insertText": "->TypedArray.findIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.filterWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.findIndex", + "sortText": "findIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n"}, - "sortText": "filterWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n" + }, "insertText": "->TypedArray.filterWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.sort", "kind": 12, - "tags": [], + "label": "->TypedArray.filterWithIndex", + "sortText": "filterWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", - "documentation": {"kind": "markdown", "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n"}, - "sortText": "sort", + "documentation": { + "kind": "markdown", + "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n" + }, "insertText": "->TypedArray.sort", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.mapWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.sort", + "sortText": "sort", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", - "documentation": {"kind": "markdown", "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n"}, - "sortText": "mapWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n" + }, "insertText": "->TypedArray.mapWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.every", "kind": 12, - "tags": [], + "label": "->TypedArray.mapWithIndex", + "sortText": "mapWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n"}, - "sortText": "every", + "documentation": { + "kind": "markdown", + "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n" + }, "insertText": "->TypedArray.every", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.length", "kind": 12, - "tags": [], + "label": "->TypedArray.every", + "sortText": "every", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n"}, - "sortText": "length", + "documentation": { + "kind": "markdown", + "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n" + }, "insertText": "->TypedArray.length", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.indexOf", "kind": 12, - "tags": [], + "label": "->TypedArray.length", + "sortText": "length", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => int", - "documentation": {"kind": "markdown", "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n"}, - "sortText": "indexOf", + "documentation": { + "kind": "markdown", + "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n" + }, "insertText": "->TypedArray.indexOf", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyWithinToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.indexOf", + "sortText": "indexOf", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n"}, - "sortText": "copyWithinToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n" + }, "insertText": "->TypedArray.copyWithinToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.some", "kind": 12, - "tags": [], + "label": "->TypedArray.copyWithinToEnd", + "sortText": "copyWithinToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n"}, - "sortText": "some", + "documentation": { + "kind": "markdown", + "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n" + }, "insertText": "->TypedArray.some", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.some", + "sortText": "some", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n"}, - "sortText": "reduceWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n" + }, "insertText": "->TypedArray.reduceWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.map", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceWithIndex", + "sortText": "reduceWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => 'b) => t<'b>", - "documentation": {"kind": "markdown", "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n"}, - "sortText": "map", + "documentation": { + "kind": "markdown", + "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n" + }, "insertText": "->TypedArray.map", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toSorted", "kind": 12, - "tags": [], + "label": "->TypedArray.map", + "sortText": "map", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n"}, - "sortText": "toSorted", + "documentation": { + "kind": "markdown", + "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n" + }, "insertText": "->TypedArray.toSorted", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyAllWithin", "kind": 12, - "tags": [], + "label": "->TypedArray.toSorted", + "sortText": "toSorted", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~target: int) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n"}, - "sortText": "copyAllWithin", + "documentation": { + "kind": "markdown", + "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n" + }, "insertText": "->TypedArray.copyAllWithin", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.subarray", "kind": 12, - "tags": [], + "label": "->TypedArray.copyAllWithin", + "sortText": "copyAllWithin", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n"}, - "sortText": "subarray", + "documentation": { + "kind": "markdown", + "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n" + }, "insertText": "->TypedArray.subarray", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.setArray", "kind": 12, - "tags": [], + "label": "->TypedArray.subarray", + "sortText": "subarray", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, array<'a>) => unit", - "documentation": {"kind": "markdown", "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n"}, - "sortText": "setArray", + "documentation": { + "kind": "markdown", + "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n" + }, "insertText": "->TypedArray.setArray", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.get", "kind": 12, - "tags": [], + "label": "->TypedArray.setArray", + "sortText": "setArray", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n"}, - "sortText": "get", + "documentation": { + "kind": "markdown", + "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n" + }, "insertText": "->TypedArray.get", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.with", "kind": 12, - "tags": [], + "label": "->TypedArray.get", + "sortText": "get", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int, 'a) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n"}, - "sortText": "with", + "documentation": { + "kind": "markdown", + "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + }, "insertText": "->TypedArray.with", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toReversed", "kind": 12, - "tags": [], + "label": "->TypedArray.with", + "sortText": "with", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n"}, - "sortText": "toReversed", + "documentation": { + "kind": "markdown", + "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + }, "insertText": "->TypedArray.toReversed", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyWithin", "kind": 12, - "tags": [], + "label": "->TypedArray.toReversed", + "sortText": "toReversed", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n"}, - "sortText": "copyWithin", + "documentation": { + "kind": "markdown", + "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n" + }, "insertText": "->TypedArray.copyWithin", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.everyWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.copyWithin", + "sortText": "copyWithin", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n"}, - "sortText": "everyWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n" + }, "insertText": "->TypedArray.everyWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toString", "kind": 12, - "tags": [], + "label": "->TypedArray.everyWithIndex", + "sortText": "everyWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => string", - "documentation": {"kind": "markdown", "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n"}, - "sortText": "toString", + "documentation": { + "kind": "markdown", + "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n" + }, "insertText": "->TypedArray.toString", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.setArrayFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.toString", + "sortText": "toString", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, array<'a>, int) => unit", - "documentation": {"kind": "markdown", "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n"}, - "sortText": "setArrayFrom", + "documentation": { + "kind": "markdown", + "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n" + }, "insertText": "->TypedArray.setArrayFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.forEach", "kind": 12, - "tags": [], + "label": "->TypedArray.setArrayFrom", + "sortText": "setArrayFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => unit) => unit", - "documentation": {"kind": "markdown", "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n"}, - "sortText": "forEach", + "documentation": { + "kind": "markdown", + "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n" + }, "insertText": "->TypedArray.forEach", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.forEach", + "sortText": "forEach", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n"}, - "sortText": "findWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n" + }, "insertText": "->TypedArray.findWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fill", "kind": 12, - "tags": [], + "label": "->TypedArray.findWithIndex", + "sortText": "findWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n"}, - "sortText": "fill", + "documentation": { + "kind": "markdown", + "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n" + }, "insertText": "->TypedArray.fill", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.indexOfFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.fill", + "sortText": "fill", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, int) => int", - "documentation": {"kind": "markdown", "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n"}, - "sortText": "indexOfFrom", + "documentation": { + "kind": "markdown", + "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n" + }, "insertText": "->TypedArray.indexOfFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reverse", "kind": 12, - "tags": [], + "label": "->TypedArray.indexOfFrom", + "sortText": "indexOfFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => unit", - "documentation": {"kind": "markdown", "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n"}, - "sortText": "reverse", + "documentation": { + "kind": "markdown", + "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n" + }, "insertText": "->TypedArray.reverse", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }, { - "label": "->TypedArray.byteOffset", "kind": 12, - "tags": [], + "label": "->TypedArray.reverse", + "sortText": "reverse", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 25 }, + "start": { "character": 12, "line": 25 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n"}, - "sortText": "byteOffset", + "documentation": { + "kind": "markdown", + "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n" + }, "insertText": "->TypedArray.byteOffset", - "additionalTextEdits": [{ - "range": {"start": {"line": 25, "character": 12}, "end": {"line": 25, "character": 13}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->TypedArray.byteOffset", + "sortText": "byteOffset", + "tags": [] + } +] Complete src/CompletionTypedArrays.res 29:15 posCursor:[29:15] posNoWhite:[29:14] Found expr:[29:3->29:15] @@ -4844,679 +9164,1296 @@ CPPipe pathFromEnv:Stdlib.Uint16Array found:false Path Stdlib.Uint16Array. Path Stdlib.TypedArray. Path -[{ - "label": "->Uint16Array.ignore", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t => unit", - "documentation": {"kind": "markdown", "value": "\n `ignore(uintArray)` ignores the provided uintArray 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"}, - "sortText": "ignore", + "documentation": { + "kind": "markdown", + "value": "\n `ignore(uintArray)` ignores the provided uintArray 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" + }, "insertText": "->Uint16Array.ignore", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastIndexWithIndex", "kind": 12, - "tags": [], + "label": "->Uint16Array.ignore", + "sortText": "ignore", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n"}, - "sortText": "findLastIndexWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n" + }, "insertText": "->TypedArray.findLastIndexWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.lastIndexOf", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastIndexWithIndex", + "sortText": "findLastIndexWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => int", - "documentation": {"kind": "markdown", "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n"}, - "sortText": "lastIndexOf", + "documentation": { + "kind": "markdown", + "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n" + }, "insertText": "->TypedArray.lastIndexOf", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.lastIndexOf", + "sortText": "lastIndexOf", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n"}, - "sortText": "findLastWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n" + }, "insertText": "->TypedArray.findLastWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLast", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastWithIndex", + "sortText": "findLastWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n"}, - "sortText": "findLast", + "documentation": { + "kind": "markdown", + "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n" + }, "insertText": "->TypedArray.findLast", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.filter", "kind": 12, - "tags": [], + "label": "->TypedArray.findLast", + "sortText": "findLast", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n"}, - "sortText": "filter", + "documentation": { + "kind": "markdown", + "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n" + }, "insertText": "->TypedArray.filter", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.byteLength", "kind": 12, - "tags": [], + "label": "->TypedArray.filter", + "sortText": "filter", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n"}, - "sortText": "byteLength", + "documentation": { + "kind": "markdown", + "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n" + }, "insertText": "->TypedArray.byteLength", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.ignore", "kind": 12, - "tags": [], + "label": "->TypedArray.byteLength", + "sortText": "byteLength", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => unit", - "documentation": {"kind": "markdown", "value": "\n `ignore(typedArray)` ignores the provided typedArray 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"}, - "sortText": "ignore", + "documentation": { + "kind": "markdown", + "value": "\n `ignore(typedArray)` ignores the provided typedArray 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" + }, "insertText": "->TypedArray.ignore", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceRightWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.ignore", + "sortText": "ignore", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n"}, - "sortText": "reduceRightWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n" + }, "insertText": "->TypedArray.reduceRightWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceRight", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceRightWithIndex", + "sortText": "reduceRightWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n"}, - "sortText": "reduceRight", + "documentation": { + "kind": "markdown", + "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n" + }, "insertText": "->TypedArray.reduceRight", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.joinWith", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceRight", + "sortText": "reduceRight", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, string) => string", - "documentation": {"kind": "markdown", "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n"}, - "sortText": "joinWith", + "documentation": { + "kind": "markdown", + "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n" + }, "insertText": "->TypedArray.joinWith", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.buffer", "kind": 12, - "tags": [], + "label": "->TypedArray.joinWith", + "sortText": "joinWith", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => ArrayBuffer.t", - "documentation": {"kind": "markdown", "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n"}, - "sortText": "buffer", + "documentation": { + "kind": "markdown", + "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n" + }, "insertText": "->TypedArray.buffer", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduce", "kind": 12, - "tags": [], + "label": "->TypedArray.buffer", + "sortText": "buffer", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n"}, - "sortText": "reduce", + "documentation": { + "kind": "markdown", + "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n" + }, "insertText": "->TypedArray.reduce", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.forEachWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.reduce", + "sortText": "reduce", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => unit) => unit", - "documentation": {"kind": "markdown", "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n"}, - "sortText": "forEachWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n" + }, "insertText": "->TypedArray.forEachWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copy", "kind": 12, - "tags": [], + "label": "->TypedArray.forEachWithIndex", + "sortText": "forEachWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n"}, - "sortText": "copy", + "documentation": { + "kind": "markdown", + "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n" + }, "insertText": "->TypedArray.copy", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.someWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.copy", + "sortText": "copy", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n"}, - "sortText": "someWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n" + }, "insertText": "->TypedArray.someWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findIndexWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.someWithIndex", + "sortText": "someWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n"}, - "sortText": "findIndexWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n" + }, "insertText": "->TypedArray.findIndexWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.sliceToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.findIndexWithIndex", + "sortText": "findIndexWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n"}, - "sortText": "sliceToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n" + }, "insertText": "->TypedArray.sliceToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.slice", "kind": 12, - "tags": [], + "label": "->TypedArray.sliceToEnd", + "sortText": "sliceToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n"}, - "sortText": "slice", + "documentation": { + "kind": "markdown", + "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n" + }, "insertText": "->TypedArray.slice", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.slice", + "sortText": "slice", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n"}, - "sortText": "findLastIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n" + }, "insertText": "->TypedArray.findLastIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.includes", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastIndex", + "sortText": "findLastIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => bool", - "documentation": {"kind": "markdown", "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n"}, - "sortText": "includes", + "documentation": { + "kind": "markdown", + "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n" + }, "insertText": "->TypedArray.includes", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fillToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.includes", + "sortText": "includes", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, 'a, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n"}, - "sortText": "fillToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n" + }, "insertText": "->TypedArray.fillToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fillAll", "kind": 12, - "tags": [], + "label": "->TypedArray.fillToEnd", + "sortText": "fillToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n"}, - "sortText": "fillAll", + "documentation": { + "kind": "markdown", + "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n" + }, "insertText": "->TypedArray.fillAll", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.find", "kind": 12, - "tags": [], + "label": "->TypedArray.fillAll", + "sortText": "fillAll", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n"}, - "sortText": "find", + "documentation": { + "kind": "markdown", + "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n" + }, "insertText": "->TypedArray.find", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.subarrayToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.find", + "sortText": "find", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n"}, - "sortText": "subarrayToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n" + }, "insertText": "->TypedArray.subarrayToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.set", "kind": 12, - "tags": [], + "label": "->TypedArray.subarrayToEnd", + "sortText": "subarrayToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int, 'a) => unit", - "documentation": {"kind": "markdown", "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n"}, - "sortText": "set", + "documentation": { + "kind": "markdown", + "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n" + }, "insertText": "->TypedArray.set", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toLocaleString", "kind": 12, - "tags": [], + "label": "->TypedArray.set", + "sortText": "set", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => string", - "documentation": {"kind": "markdown", "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n"}, - "sortText": "toLocaleString", + "documentation": { + "kind": "markdown", + "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n" + }, "insertText": "->TypedArray.toLocaleString", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.lastIndexOfFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.toLocaleString", + "sortText": "toLocaleString", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, int) => int", - "documentation": {"kind": "markdown", "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n"}, - "sortText": "lastIndexOfFrom", + "documentation": { + "kind": "markdown", + "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n" + }, "insertText": "->TypedArray.lastIndexOfFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.lastIndexOfFrom", + "sortText": "lastIndexOfFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n"}, - "sortText": "findIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n" + }, "insertText": "->TypedArray.findIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.filterWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.findIndex", + "sortText": "findIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n"}, - "sortText": "filterWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n" + }, "insertText": "->TypedArray.filterWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.sort", "kind": 12, - "tags": [], + "label": "->TypedArray.filterWithIndex", + "sortText": "filterWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", - "documentation": {"kind": "markdown", "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n"}, - "sortText": "sort", + "documentation": { + "kind": "markdown", + "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n" + }, "insertText": "->TypedArray.sort", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.mapWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.sort", + "sortText": "sort", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", - "documentation": {"kind": "markdown", "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n"}, - "sortText": "mapWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n" + }, "insertText": "->TypedArray.mapWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.every", "kind": 12, - "tags": [], + "label": "->TypedArray.mapWithIndex", + "sortText": "mapWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n"}, - "sortText": "every", + "documentation": { + "kind": "markdown", + "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n" + }, "insertText": "->TypedArray.every", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.length", "kind": 12, - "tags": [], + "label": "->TypedArray.every", + "sortText": "every", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n"}, - "sortText": "length", + "documentation": { + "kind": "markdown", + "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n" + }, "insertText": "->TypedArray.length", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.indexOf", "kind": 12, - "tags": [], + "label": "->TypedArray.length", + "sortText": "length", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => int", - "documentation": {"kind": "markdown", "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n"}, - "sortText": "indexOf", + "documentation": { + "kind": "markdown", + "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n" + }, "insertText": "->TypedArray.indexOf", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyWithinToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.indexOf", + "sortText": "indexOf", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n"}, - "sortText": "copyWithinToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n" + }, "insertText": "->TypedArray.copyWithinToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.some", "kind": 12, - "tags": [], + "label": "->TypedArray.copyWithinToEnd", + "sortText": "copyWithinToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n"}, - "sortText": "some", + "documentation": { + "kind": "markdown", + "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n" + }, "insertText": "->TypedArray.some", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.some", + "sortText": "some", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n"}, - "sortText": "reduceWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n" + }, "insertText": "->TypedArray.reduceWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.map", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceWithIndex", + "sortText": "reduceWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => 'b) => t<'b>", - "documentation": {"kind": "markdown", "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n"}, - "sortText": "map", + "documentation": { + "kind": "markdown", + "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n" + }, "insertText": "->TypedArray.map", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toSorted", "kind": 12, - "tags": [], + "label": "->TypedArray.map", + "sortText": "map", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n"}, - "sortText": "toSorted", + "documentation": { + "kind": "markdown", + "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n" + }, "insertText": "->TypedArray.toSorted", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyAllWithin", "kind": 12, - "tags": [], + "label": "->TypedArray.toSorted", + "sortText": "toSorted", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~target: int) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n"}, - "sortText": "copyAllWithin", + "documentation": { + "kind": "markdown", + "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n" + }, "insertText": "->TypedArray.copyAllWithin", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.subarray", "kind": 12, - "tags": [], + "label": "->TypedArray.copyAllWithin", + "sortText": "copyAllWithin", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n"}, - "sortText": "subarray", + "documentation": { + "kind": "markdown", + "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n" + }, "insertText": "->TypedArray.subarray", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.setArray", "kind": 12, - "tags": [], + "label": "->TypedArray.subarray", + "sortText": "subarray", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, array<'a>) => unit", - "documentation": {"kind": "markdown", "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n"}, - "sortText": "setArray", + "documentation": { + "kind": "markdown", + "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n" + }, "insertText": "->TypedArray.setArray", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.get", "kind": 12, - "tags": [], + "label": "->TypedArray.setArray", + "sortText": "setArray", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n"}, - "sortText": "get", + "documentation": { + "kind": "markdown", + "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n" + }, "insertText": "->TypedArray.get", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.with", "kind": 12, - "tags": [], + "label": "->TypedArray.get", + "sortText": "get", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int, 'a) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n"}, - "sortText": "with", + "documentation": { + "kind": "markdown", + "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + }, "insertText": "->TypedArray.with", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toReversed", "kind": 12, - "tags": [], + "label": "->TypedArray.with", + "sortText": "with", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n"}, - "sortText": "toReversed", + "documentation": { + "kind": "markdown", + "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + }, "insertText": "->TypedArray.toReversed", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyWithin", "kind": 12, - "tags": [], + "label": "->TypedArray.toReversed", + "sortText": "toReversed", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n"}, - "sortText": "copyWithin", + "documentation": { + "kind": "markdown", + "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n" + }, "insertText": "->TypedArray.copyWithin", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.everyWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.copyWithin", + "sortText": "copyWithin", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n"}, - "sortText": "everyWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n" + }, "insertText": "->TypedArray.everyWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toString", "kind": 12, - "tags": [], + "label": "->TypedArray.everyWithIndex", + "sortText": "everyWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => string", - "documentation": {"kind": "markdown", "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n"}, - "sortText": "toString", + "documentation": { + "kind": "markdown", + "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n" + }, "insertText": "->TypedArray.toString", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.setArrayFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.toString", + "sortText": "toString", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, array<'a>, int) => unit", - "documentation": {"kind": "markdown", "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n"}, - "sortText": "setArrayFrom", + "documentation": { + "kind": "markdown", + "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n" + }, "insertText": "->TypedArray.setArrayFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.forEach", "kind": 12, - "tags": [], + "label": "->TypedArray.setArrayFrom", + "sortText": "setArrayFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => unit) => unit", - "documentation": {"kind": "markdown", "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n"}, - "sortText": "forEach", + "documentation": { + "kind": "markdown", + "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n" + }, "insertText": "->TypedArray.forEach", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.forEach", + "sortText": "forEach", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n"}, - "sortText": "findWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n" + }, "insertText": "->TypedArray.findWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fill", "kind": 12, - "tags": [], + "label": "->TypedArray.findWithIndex", + "sortText": "findWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n"}, - "sortText": "fill", + "documentation": { + "kind": "markdown", + "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n" + }, "insertText": "->TypedArray.fill", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.indexOfFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.fill", + "sortText": "fill", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, int) => int", - "documentation": {"kind": "markdown", "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n"}, - "sortText": "indexOfFrom", + "documentation": { + "kind": "markdown", + "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n" + }, "insertText": "->TypedArray.indexOfFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reverse", "kind": 12, - "tags": [], + "label": "->TypedArray.indexOfFrom", + "sortText": "indexOfFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => unit", - "documentation": {"kind": "markdown", "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n"}, - "sortText": "reverse", + "documentation": { + "kind": "markdown", + "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n" + }, "insertText": "->TypedArray.reverse", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.byteOffset", "kind": 12, - "tags": [], + "label": "->TypedArray.reverse", + "sortText": "reverse", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 29 }, + "start": { "character": 14, "line": 29 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n"}, - "sortText": "byteOffset", + "documentation": { + "kind": "markdown", + "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n" + }, "insertText": "->TypedArray.byteOffset", - "additionalTextEdits": [{ - "range": {"start": {"line": 29, "character": 14}, "end": {"line": 29, "character": 15}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->TypedArray.byteOffset", + "sortText": "byteOffset", + "tags": [] + } +] Complete src/CompletionTypedArrays.res 33:15 posCursor:[33:15] posNoWhite:[33:14] Found expr:[33:3->33:15] @@ -5534,679 +10471,1296 @@ CPPipe pathFromEnv:Stdlib.Uint32Array found:false Path Stdlib.Uint32Array. Path Stdlib.TypedArray. Path -[{ - "label": "->Uint32Array.ignore", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t => unit", - "documentation": {"kind": "markdown", "value": "\n `ignore(uintArray)` ignores the provided uintArray 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"}, - "sortText": "ignore", + "documentation": { + "kind": "markdown", + "value": "\n `ignore(uintArray)` ignores the provided uintArray 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" + }, "insertText": "->Uint32Array.ignore", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastIndexWithIndex", "kind": 12, - "tags": [], + "label": "->Uint32Array.ignore", + "sortText": "ignore", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n"}, - "sortText": "findLastIndexWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n" + }, "insertText": "->TypedArray.findLastIndexWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.lastIndexOf", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastIndexWithIndex", + "sortText": "findLastIndexWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => int", - "documentation": {"kind": "markdown", "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n"}, - "sortText": "lastIndexOf", + "documentation": { + "kind": "markdown", + "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n" + }, "insertText": "->TypedArray.lastIndexOf", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.lastIndexOf", + "sortText": "lastIndexOf", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n"}, - "sortText": "findLastWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n" + }, "insertText": "->TypedArray.findLastWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLast", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastWithIndex", + "sortText": "findLastWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n"}, - "sortText": "findLast", + "documentation": { + "kind": "markdown", + "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n" + }, "insertText": "->TypedArray.findLast", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.filter", "kind": 12, - "tags": [], + "label": "->TypedArray.findLast", + "sortText": "findLast", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n"}, - "sortText": "filter", + "documentation": { + "kind": "markdown", + "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n" + }, "insertText": "->TypedArray.filter", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.byteLength", "kind": 12, - "tags": [], + "label": "->TypedArray.filter", + "sortText": "filter", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n"}, - "sortText": "byteLength", + "documentation": { + "kind": "markdown", + "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n" + }, "insertText": "->TypedArray.byteLength", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.ignore", "kind": 12, - "tags": [], + "label": "->TypedArray.byteLength", + "sortText": "byteLength", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => unit", - "documentation": {"kind": "markdown", "value": "\n `ignore(typedArray)` ignores the provided typedArray 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"}, - "sortText": "ignore", + "documentation": { + "kind": "markdown", + "value": "\n `ignore(typedArray)` ignores the provided typedArray 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" + }, "insertText": "->TypedArray.ignore", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceRightWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.ignore", + "sortText": "ignore", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n"}, - "sortText": "reduceRightWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n" + }, "insertText": "->TypedArray.reduceRightWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceRight", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceRightWithIndex", + "sortText": "reduceRightWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n"}, - "sortText": "reduceRight", + "documentation": { + "kind": "markdown", + "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n" + }, "insertText": "->TypedArray.reduceRight", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.joinWith", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceRight", + "sortText": "reduceRight", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, string) => string", - "documentation": {"kind": "markdown", "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n"}, - "sortText": "joinWith", + "documentation": { + "kind": "markdown", + "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n" + }, "insertText": "->TypedArray.joinWith", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.buffer", "kind": 12, - "tags": [], + "label": "->TypedArray.joinWith", + "sortText": "joinWith", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => ArrayBuffer.t", - "documentation": {"kind": "markdown", "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n"}, - "sortText": "buffer", + "documentation": { + "kind": "markdown", + "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n" + }, "insertText": "->TypedArray.buffer", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduce", "kind": 12, - "tags": [], + "label": "->TypedArray.buffer", + "sortText": "buffer", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n"}, - "sortText": "reduce", + "documentation": { + "kind": "markdown", + "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n" + }, "insertText": "->TypedArray.reduce", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.forEachWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.reduce", + "sortText": "reduce", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => unit) => unit", - "documentation": {"kind": "markdown", "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n"}, - "sortText": "forEachWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n" + }, "insertText": "->TypedArray.forEachWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copy", "kind": 12, - "tags": [], + "label": "->TypedArray.forEachWithIndex", + "sortText": "forEachWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n"}, - "sortText": "copy", + "documentation": { + "kind": "markdown", + "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n" + }, "insertText": "->TypedArray.copy", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.someWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.copy", + "sortText": "copy", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n"}, - "sortText": "someWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n" + }, "insertText": "->TypedArray.someWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findIndexWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.someWithIndex", + "sortText": "someWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n"}, - "sortText": "findIndexWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n" + }, "insertText": "->TypedArray.findIndexWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.sliceToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.findIndexWithIndex", + "sortText": "findIndexWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n"}, - "sortText": "sliceToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n" + }, "insertText": "->TypedArray.sliceToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.slice", "kind": 12, - "tags": [], + "label": "->TypedArray.sliceToEnd", + "sortText": "sliceToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n"}, - "sortText": "slice", + "documentation": { + "kind": "markdown", + "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n" + }, "insertText": "->TypedArray.slice", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.slice", + "sortText": "slice", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n"}, - "sortText": "findLastIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n" + }, "insertText": "->TypedArray.findLastIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.includes", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastIndex", + "sortText": "findLastIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => bool", - "documentation": {"kind": "markdown", "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n"}, - "sortText": "includes", + "documentation": { + "kind": "markdown", + "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n" + }, "insertText": "->TypedArray.includes", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fillToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.includes", + "sortText": "includes", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, 'a, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n"}, - "sortText": "fillToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n" + }, "insertText": "->TypedArray.fillToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fillAll", "kind": 12, - "tags": [], + "label": "->TypedArray.fillToEnd", + "sortText": "fillToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n"}, - "sortText": "fillAll", + "documentation": { + "kind": "markdown", + "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n" + }, "insertText": "->TypedArray.fillAll", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.find", "kind": 12, - "tags": [], + "label": "->TypedArray.fillAll", + "sortText": "fillAll", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n"}, - "sortText": "find", + "documentation": { + "kind": "markdown", + "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n" + }, "insertText": "->TypedArray.find", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.subarrayToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.find", + "sortText": "find", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n"}, - "sortText": "subarrayToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n" + }, "insertText": "->TypedArray.subarrayToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.set", "kind": 12, - "tags": [], + "label": "->TypedArray.subarrayToEnd", + "sortText": "subarrayToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int, 'a) => unit", - "documentation": {"kind": "markdown", "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n"}, - "sortText": "set", + "documentation": { + "kind": "markdown", + "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n" + }, "insertText": "->TypedArray.set", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toLocaleString", "kind": 12, - "tags": [], + "label": "->TypedArray.set", + "sortText": "set", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => string", - "documentation": {"kind": "markdown", "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n"}, - "sortText": "toLocaleString", + "documentation": { + "kind": "markdown", + "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n" + }, "insertText": "->TypedArray.toLocaleString", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.lastIndexOfFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.toLocaleString", + "sortText": "toLocaleString", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, int) => int", - "documentation": {"kind": "markdown", "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n"}, - "sortText": "lastIndexOfFrom", + "documentation": { + "kind": "markdown", + "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n" + }, "insertText": "->TypedArray.lastIndexOfFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.lastIndexOfFrom", + "sortText": "lastIndexOfFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n"}, - "sortText": "findIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n" + }, "insertText": "->TypedArray.findIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.filterWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.findIndex", + "sortText": "findIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n"}, - "sortText": "filterWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n" + }, "insertText": "->TypedArray.filterWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.sort", "kind": 12, - "tags": [], + "label": "->TypedArray.filterWithIndex", + "sortText": "filterWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", - "documentation": {"kind": "markdown", "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n"}, - "sortText": "sort", + "documentation": { + "kind": "markdown", + "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n" + }, "insertText": "->TypedArray.sort", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.mapWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.sort", + "sortText": "sort", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", - "documentation": {"kind": "markdown", "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n"}, - "sortText": "mapWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n" + }, "insertText": "->TypedArray.mapWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.every", "kind": 12, - "tags": [], + "label": "->TypedArray.mapWithIndex", + "sortText": "mapWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n"}, - "sortText": "every", + "documentation": { + "kind": "markdown", + "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n" + }, "insertText": "->TypedArray.every", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.length", "kind": 12, - "tags": [], + "label": "->TypedArray.every", + "sortText": "every", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n"}, - "sortText": "length", + "documentation": { + "kind": "markdown", + "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n" + }, "insertText": "->TypedArray.length", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.indexOf", "kind": 12, - "tags": [], + "label": "->TypedArray.length", + "sortText": "length", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => int", - "documentation": {"kind": "markdown", "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n"}, - "sortText": "indexOf", + "documentation": { + "kind": "markdown", + "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n" + }, "insertText": "->TypedArray.indexOf", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyWithinToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.indexOf", + "sortText": "indexOf", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n"}, - "sortText": "copyWithinToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n" + }, "insertText": "->TypedArray.copyWithinToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.some", "kind": 12, - "tags": [], + "label": "->TypedArray.copyWithinToEnd", + "sortText": "copyWithinToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n"}, - "sortText": "some", + "documentation": { + "kind": "markdown", + "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n" + }, "insertText": "->TypedArray.some", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.some", + "sortText": "some", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n"}, - "sortText": "reduceWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n" + }, "insertText": "->TypedArray.reduceWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.map", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceWithIndex", + "sortText": "reduceWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => 'b) => t<'b>", - "documentation": {"kind": "markdown", "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n"}, - "sortText": "map", + "documentation": { + "kind": "markdown", + "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n" + }, "insertText": "->TypedArray.map", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toSorted", "kind": 12, - "tags": [], + "label": "->TypedArray.map", + "sortText": "map", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n"}, - "sortText": "toSorted", + "documentation": { + "kind": "markdown", + "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n" + }, "insertText": "->TypedArray.toSorted", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyAllWithin", "kind": 12, - "tags": [], + "label": "->TypedArray.toSorted", + "sortText": "toSorted", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~target: int) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n"}, - "sortText": "copyAllWithin", + "documentation": { + "kind": "markdown", + "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n" + }, "insertText": "->TypedArray.copyAllWithin", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.subarray", "kind": 12, - "tags": [], + "label": "->TypedArray.copyAllWithin", + "sortText": "copyAllWithin", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n"}, - "sortText": "subarray", + "documentation": { + "kind": "markdown", + "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n" + }, "insertText": "->TypedArray.subarray", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.setArray", "kind": 12, - "tags": [], + "label": "->TypedArray.subarray", + "sortText": "subarray", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, array<'a>) => unit", - "documentation": {"kind": "markdown", "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n"}, - "sortText": "setArray", + "documentation": { + "kind": "markdown", + "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n" + }, "insertText": "->TypedArray.setArray", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.get", "kind": 12, - "tags": [], + "label": "->TypedArray.setArray", + "sortText": "setArray", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n"}, - "sortText": "get", + "documentation": { + "kind": "markdown", + "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n" + }, "insertText": "->TypedArray.get", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.with", "kind": 12, - "tags": [], + "label": "->TypedArray.get", + "sortText": "get", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int, 'a) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n"}, - "sortText": "with", + "documentation": { + "kind": "markdown", + "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + }, "insertText": "->TypedArray.with", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toReversed", "kind": 12, - "tags": [], + "label": "->TypedArray.with", + "sortText": "with", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n"}, - "sortText": "toReversed", + "documentation": { + "kind": "markdown", + "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + }, "insertText": "->TypedArray.toReversed", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyWithin", "kind": 12, - "tags": [], + "label": "->TypedArray.toReversed", + "sortText": "toReversed", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n"}, - "sortText": "copyWithin", + "documentation": { + "kind": "markdown", + "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n" + }, "insertText": "->TypedArray.copyWithin", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.everyWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.copyWithin", + "sortText": "copyWithin", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n"}, - "sortText": "everyWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n" + }, "insertText": "->TypedArray.everyWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toString", "kind": 12, - "tags": [], + "label": "->TypedArray.everyWithIndex", + "sortText": "everyWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => string", - "documentation": {"kind": "markdown", "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n"}, - "sortText": "toString", + "documentation": { + "kind": "markdown", + "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n" + }, "insertText": "->TypedArray.toString", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.setArrayFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.toString", + "sortText": "toString", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, array<'a>, int) => unit", - "documentation": {"kind": "markdown", "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n"}, - "sortText": "setArrayFrom", + "documentation": { + "kind": "markdown", + "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n" + }, "insertText": "->TypedArray.setArrayFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.forEach", "kind": 12, - "tags": [], + "label": "->TypedArray.setArrayFrom", + "sortText": "setArrayFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => unit) => unit", - "documentation": {"kind": "markdown", "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n"}, - "sortText": "forEach", + "documentation": { + "kind": "markdown", + "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n" + }, "insertText": "->TypedArray.forEach", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.forEach", + "sortText": "forEach", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n"}, - "sortText": "findWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n" + }, "insertText": "->TypedArray.findWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fill", "kind": 12, - "tags": [], + "label": "->TypedArray.findWithIndex", + "sortText": "findWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n"}, - "sortText": "fill", + "documentation": { + "kind": "markdown", + "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n" + }, "insertText": "->TypedArray.fill", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.indexOfFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.fill", + "sortText": "fill", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, int) => int", - "documentation": {"kind": "markdown", "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n"}, - "sortText": "indexOfFrom", + "documentation": { + "kind": "markdown", + "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n" + }, "insertText": "->TypedArray.indexOfFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reverse", "kind": 12, - "tags": [], + "label": "->TypedArray.indexOfFrom", + "sortText": "indexOfFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => unit", - "documentation": {"kind": "markdown", "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n"}, - "sortText": "reverse", + "documentation": { + "kind": "markdown", + "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n" + }, "insertText": "->TypedArray.reverse", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }, { - "label": "->TypedArray.byteOffset", "kind": 12, - "tags": [], + "label": "->TypedArray.reverse", + "sortText": "reverse", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 33 }, + "start": { "character": 14, "line": 33 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n"}, - "sortText": "byteOffset", + "documentation": { + "kind": "markdown", + "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n" + }, "insertText": "->TypedArray.byteOffset", - "additionalTextEdits": [{ - "range": {"start": {"line": 33, "character": 14}, "end": {"line": 33, "character": 15}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->TypedArray.byteOffset", + "sortText": "byteOffset", + "tags": [] + } +] Complete src/CompletionTypedArrays.res 37:14 posCursor:[37:14] posNoWhite:[37:13] Found expr:[37:3->37:14] @@ -6224,679 +11778,1296 @@ CPPipe pathFromEnv:Stdlib.Uint8Array found:false Path Stdlib.Uint8Array. Path Stdlib.TypedArray. Path -[{ - "label": "->Uint8Array.ignore", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t => unit", - "documentation": {"kind": "markdown", "value": "\n `ignore(uintArray)` ignores the provided uintArray 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"}, - "sortText": "ignore", + "documentation": { + "kind": "markdown", + "value": "\n `ignore(uintArray)` ignores the provided uintArray 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" + }, "insertText": "->Uint8Array.ignore", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastIndexWithIndex", "kind": 12, - "tags": [], + "label": "->Uint8Array.ignore", + "sortText": "ignore", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n"}, - "sortText": "findLastIndexWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n" + }, "insertText": "->TypedArray.findLastIndexWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.lastIndexOf", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastIndexWithIndex", + "sortText": "findLastIndexWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => int", - "documentation": {"kind": "markdown", "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n"}, - "sortText": "lastIndexOf", + "documentation": { + "kind": "markdown", + "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n" + }, "insertText": "->TypedArray.lastIndexOf", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.lastIndexOf", + "sortText": "lastIndexOf", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n"}, - "sortText": "findLastWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n" + }, "insertText": "->TypedArray.findLastWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLast", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastWithIndex", + "sortText": "findLastWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n"}, - "sortText": "findLast", + "documentation": { + "kind": "markdown", + "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n" + }, "insertText": "->TypedArray.findLast", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.filter", "kind": 12, - "tags": [], + "label": "->TypedArray.findLast", + "sortText": "findLast", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n"}, - "sortText": "filter", + "documentation": { + "kind": "markdown", + "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n" + }, "insertText": "->TypedArray.filter", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.byteLength", "kind": 12, - "tags": [], + "label": "->TypedArray.filter", + "sortText": "filter", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n"}, - "sortText": "byteLength", + "documentation": { + "kind": "markdown", + "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n" + }, "insertText": "->TypedArray.byteLength", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.ignore", "kind": 12, - "tags": [], + "label": "->TypedArray.byteLength", + "sortText": "byteLength", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => unit", - "documentation": {"kind": "markdown", "value": "\n `ignore(typedArray)` ignores the provided typedArray 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"}, - "sortText": "ignore", + "documentation": { + "kind": "markdown", + "value": "\n `ignore(typedArray)` ignores the provided typedArray 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" + }, "insertText": "->TypedArray.ignore", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceRightWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.ignore", + "sortText": "ignore", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n"}, - "sortText": "reduceRightWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n" + }, "insertText": "->TypedArray.reduceRightWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceRight", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceRightWithIndex", + "sortText": "reduceRightWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n"}, - "sortText": "reduceRight", + "documentation": { + "kind": "markdown", + "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n" + }, "insertText": "->TypedArray.reduceRight", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.joinWith", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceRight", + "sortText": "reduceRight", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, string) => string", - "documentation": {"kind": "markdown", "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n"}, - "sortText": "joinWith", + "documentation": { + "kind": "markdown", + "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n" + }, "insertText": "->TypedArray.joinWith", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.buffer", "kind": 12, - "tags": [], + "label": "->TypedArray.joinWith", + "sortText": "joinWith", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => ArrayBuffer.t", - "documentation": {"kind": "markdown", "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n"}, - "sortText": "buffer", + "documentation": { + "kind": "markdown", + "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n" + }, "insertText": "->TypedArray.buffer", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduce", "kind": 12, - "tags": [], + "label": "->TypedArray.buffer", + "sortText": "buffer", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n"}, - "sortText": "reduce", + "documentation": { + "kind": "markdown", + "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n" + }, "insertText": "->TypedArray.reduce", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.forEachWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.reduce", + "sortText": "reduce", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => unit) => unit", - "documentation": {"kind": "markdown", "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n"}, - "sortText": "forEachWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n" + }, "insertText": "->TypedArray.forEachWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copy", "kind": 12, - "tags": [], + "label": "->TypedArray.forEachWithIndex", + "sortText": "forEachWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n"}, - "sortText": "copy", + "documentation": { + "kind": "markdown", + "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n" + }, "insertText": "->TypedArray.copy", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.someWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.copy", + "sortText": "copy", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n"}, - "sortText": "someWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n" + }, "insertText": "->TypedArray.someWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findIndexWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.someWithIndex", + "sortText": "someWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n"}, - "sortText": "findIndexWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n" + }, "insertText": "->TypedArray.findIndexWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.sliceToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.findIndexWithIndex", + "sortText": "findIndexWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n"}, - "sortText": "sliceToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n" + }, "insertText": "->TypedArray.sliceToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.slice", "kind": 12, - "tags": [], + "label": "->TypedArray.sliceToEnd", + "sortText": "sliceToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n"}, - "sortText": "slice", + "documentation": { + "kind": "markdown", + "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n" + }, "insertText": "->TypedArray.slice", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.slice", + "sortText": "slice", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n"}, - "sortText": "findLastIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n" + }, "insertText": "->TypedArray.findLastIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.includes", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastIndex", + "sortText": "findLastIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => bool", - "documentation": {"kind": "markdown", "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n"}, - "sortText": "includes", + "documentation": { + "kind": "markdown", + "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n" + }, "insertText": "->TypedArray.includes", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fillToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.includes", + "sortText": "includes", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, 'a, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n"}, - "sortText": "fillToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n" + }, "insertText": "->TypedArray.fillToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fillAll", "kind": 12, - "tags": [], + "label": "->TypedArray.fillToEnd", + "sortText": "fillToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n"}, - "sortText": "fillAll", + "documentation": { + "kind": "markdown", + "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n" + }, "insertText": "->TypedArray.fillAll", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.find", "kind": 12, - "tags": [], + "label": "->TypedArray.fillAll", + "sortText": "fillAll", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n"}, - "sortText": "find", + "documentation": { + "kind": "markdown", + "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n" + }, "insertText": "->TypedArray.find", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.subarrayToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.find", + "sortText": "find", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n"}, - "sortText": "subarrayToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n" + }, "insertText": "->TypedArray.subarrayToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.set", "kind": 12, - "tags": [], + "label": "->TypedArray.subarrayToEnd", + "sortText": "subarrayToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int, 'a) => unit", - "documentation": {"kind": "markdown", "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n"}, - "sortText": "set", + "documentation": { + "kind": "markdown", + "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n" + }, "insertText": "->TypedArray.set", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toLocaleString", "kind": 12, - "tags": [], + "label": "->TypedArray.set", + "sortText": "set", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => string", - "documentation": {"kind": "markdown", "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n"}, - "sortText": "toLocaleString", + "documentation": { + "kind": "markdown", + "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n" + }, "insertText": "->TypedArray.toLocaleString", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.lastIndexOfFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.toLocaleString", + "sortText": "toLocaleString", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, int) => int", - "documentation": {"kind": "markdown", "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n"}, - "sortText": "lastIndexOfFrom", + "documentation": { + "kind": "markdown", + "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n" + }, "insertText": "->TypedArray.lastIndexOfFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.lastIndexOfFrom", + "sortText": "lastIndexOfFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n"}, - "sortText": "findIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n" + }, "insertText": "->TypedArray.findIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.filterWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.findIndex", + "sortText": "findIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n"}, - "sortText": "filterWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n" + }, "insertText": "->TypedArray.filterWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.sort", "kind": 12, - "tags": [], + "label": "->TypedArray.filterWithIndex", + "sortText": "filterWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", - "documentation": {"kind": "markdown", "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n"}, - "sortText": "sort", + "documentation": { + "kind": "markdown", + "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n" + }, "insertText": "->TypedArray.sort", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.mapWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.sort", + "sortText": "sort", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", - "documentation": {"kind": "markdown", "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n"}, - "sortText": "mapWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n" + }, "insertText": "->TypedArray.mapWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.every", "kind": 12, - "tags": [], + "label": "->TypedArray.mapWithIndex", + "sortText": "mapWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n"}, - "sortText": "every", + "documentation": { + "kind": "markdown", + "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n" + }, "insertText": "->TypedArray.every", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.length", "kind": 12, - "tags": [], + "label": "->TypedArray.every", + "sortText": "every", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n"}, - "sortText": "length", + "documentation": { + "kind": "markdown", + "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n" + }, "insertText": "->TypedArray.length", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.indexOf", "kind": 12, - "tags": [], + "label": "->TypedArray.length", + "sortText": "length", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => int", - "documentation": {"kind": "markdown", "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n"}, - "sortText": "indexOf", + "documentation": { + "kind": "markdown", + "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n" + }, "insertText": "->TypedArray.indexOf", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyWithinToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.indexOf", + "sortText": "indexOf", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n"}, - "sortText": "copyWithinToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n" + }, "insertText": "->TypedArray.copyWithinToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.some", "kind": 12, - "tags": [], + "label": "->TypedArray.copyWithinToEnd", + "sortText": "copyWithinToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n"}, - "sortText": "some", + "documentation": { + "kind": "markdown", + "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n" + }, "insertText": "->TypedArray.some", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.some", + "sortText": "some", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n"}, - "sortText": "reduceWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n" + }, "insertText": "->TypedArray.reduceWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.map", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceWithIndex", + "sortText": "reduceWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => 'b) => t<'b>", - "documentation": {"kind": "markdown", "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n"}, - "sortText": "map", + "documentation": { + "kind": "markdown", + "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n" + }, "insertText": "->TypedArray.map", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toSorted", "kind": 12, - "tags": [], + "label": "->TypedArray.map", + "sortText": "map", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n"}, - "sortText": "toSorted", + "documentation": { + "kind": "markdown", + "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n" + }, "insertText": "->TypedArray.toSorted", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyAllWithin", "kind": 12, - "tags": [], + "label": "->TypedArray.toSorted", + "sortText": "toSorted", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~target: int) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n"}, - "sortText": "copyAllWithin", + "documentation": { + "kind": "markdown", + "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n" + }, "insertText": "->TypedArray.copyAllWithin", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.subarray", "kind": 12, - "tags": [], + "label": "->TypedArray.copyAllWithin", + "sortText": "copyAllWithin", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n"}, - "sortText": "subarray", + "documentation": { + "kind": "markdown", + "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n" + }, "insertText": "->TypedArray.subarray", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.setArray", "kind": 12, - "tags": [], + "label": "->TypedArray.subarray", + "sortText": "subarray", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, array<'a>) => unit", - "documentation": {"kind": "markdown", "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n"}, - "sortText": "setArray", + "documentation": { + "kind": "markdown", + "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n" + }, "insertText": "->TypedArray.setArray", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.get", "kind": 12, - "tags": [], + "label": "->TypedArray.setArray", + "sortText": "setArray", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n"}, - "sortText": "get", + "documentation": { + "kind": "markdown", + "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n" + }, "insertText": "->TypedArray.get", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.with", "kind": 12, - "tags": [], + "label": "->TypedArray.get", + "sortText": "get", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int, 'a) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n"}, - "sortText": "with", + "documentation": { + "kind": "markdown", + "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + }, "insertText": "->TypedArray.with", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toReversed", "kind": 12, - "tags": [], + "label": "->TypedArray.with", + "sortText": "with", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n"}, - "sortText": "toReversed", + "documentation": { + "kind": "markdown", + "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + }, "insertText": "->TypedArray.toReversed", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyWithin", "kind": 12, - "tags": [], + "label": "->TypedArray.toReversed", + "sortText": "toReversed", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n"}, - "sortText": "copyWithin", + "documentation": { + "kind": "markdown", + "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n" + }, "insertText": "->TypedArray.copyWithin", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.everyWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.copyWithin", + "sortText": "copyWithin", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n"}, - "sortText": "everyWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n" + }, "insertText": "->TypedArray.everyWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toString", "kind": 12, - "tags": [], + "label": "->TypedArray.everyWithIndex", + "sortText": "everyWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => string", - "documentation": {"kind": "markdown", "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n"}, - "sortText": "toString", + "documentation": { + "kind": "markdown", + "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n" + }, "insertText": "->TypedArray.toString", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.setArrayFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.toString", + "sortText": "toString", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, array<'a>, int) => unit", - "documentation": {"kind": "markdown", "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n"}, - "sortText": "setArrayFrom", + "documentation": { + "kind": "markdown", + "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n" + }, "insertText": "->TypedArray.setArrayFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.forEach", "kind": 12, - "tags": [], + "label": "->TypedArray.setArrayFrom", + "sortText": "setArrayFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => unit) => unit", - "documentation": {"kind": "markdown", "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n"}, - "sortText": "forEach", + "documentation": { + "kind": "markdown", + "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n" + }, "insertText": "->TypedArray.forEach", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.forEach", + "sortText": "forEach", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n"}, - "sortText": "findWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n" + }, "insertText": "->TypedArray.findWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fill", "kind": 12, - "tags": [], + "label": "->TypedArray.findWithIndex", + "sortText": "findWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n"}, - "sortText": "fill", + "documentation": { + "kind": "markdown", + "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n" + }, "insertText": "->TypedArray.fill", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.indexOfFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.fill", + "sortText": "fill", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, int) => int", - "documentation": {"kind": "markdown", "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n"}, - "sortText": "indexOfFrom", + "documentation": { + "kind": "markdown", + "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n" + }, "insertText": "->TypedArray.indexOfFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reverse", "kind": 12, - "tags": [], + "label": "->TypedArray.indexOfFrom", + "sortText": "indexOfFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => unit", - "documentation": {"kind": "markdown", "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n"}, - "sortText": "reverse", + "documentation": { + "kind": "markdown", + "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n" + }, "insertText": "->TypedArray.reverse", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }, { - "label": "->TypedArray.byteOffset", "kind": 12, - "tags": [], + "label": "->TypedArray.reverse", + "sortText": "reverse", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 14, "line": 37 }, + "start": { "character": 13, "line": 37 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n"}, - "sortText": "byteOffset", + "documentation": { + "kind": "markdown", + "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n" + }, "insertText": "->TypedArray.byteOffset", - "additionalTextEdits": [{ - "range": {"start": {"line": 37, "character": 13}, "end": {"line": 37, "character": 14}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->TypedArray.byteOffset", + "sortText": "byteOffset", + "tags": [] + } +] Complete src/CompletionTypedArrays.res 41:21 posCursor:[41:21] posNoWhite:[41:20] Found expr:[41:3->41:21] @@ -6914,677 +13085,1294 @@ CPPipe pathFromEnv:Stdlib.Uint8ClampedArray found:false Path Stdlib.Uint8ClampedArray. Path Stdlib.TypedArray. Path -[{ - "label": "->Uint8ClampedArray.ignore", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t => unit", - "documentation": {"kind": "markdown", "value": "\n `ignore(uintArray)` ignores the provided uintArray 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"}, - "sortText": "ignore", + "documentation": { + "kind": "markdown", + "value": "\n `ignore(uintArray)` ignores the provided uintArray 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" + }, "insertText": "->Uint8ClampedArray.ignore", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastIndexWithIndex", "kind": 12, - "tags": [], + "label": "->Uint8ClampedArray.ignore", + "sortText": "ignore", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n"}, - "sortText": "findLastIndexWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n" + }, "insertText": "->TypedArray.findLastIndexWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.lastIndexOf", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastIndexWithIndex", + "sortText": "findLastIndexWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => int", - "documentation": {"kind": "markdown", "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n"}, - "sortText": "lastIndexOf", + "documentation": { + "kind": "markdown", + "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n" + }, "insertText": "->TypedArray.lastIndexOf", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.lastIndexOf", + "sortText": "lastIndexOf", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n"}, - "sortText": "findLastWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n" + }, "insertText": "->TypedArray.findLastWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLast", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastWithIndex", + "sortText": "findLastWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n"}, - "sortText": "findLast", + "documentation": { + "kind": "markdown", + "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n" + }, "insertText": "->TypedArray.findLast", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.filter", "kind": 12, - "tags": [], + "label": "->TypedArray.findLast", + "sortText": "findLast", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n"}, - "sortText": "filter", + "documentation": { + "kind": "markdown", + "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n" + }, "insertText": "->TypedArray.filter", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.byteLength", "kind": 12, - "tags": [], + "label": "->TypedArray.filter", + "sortText": "filter", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n"}, - "sortText": "byteLength", + "documentation": { + "kind": "markdown", + "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n" + }, "insertText": "->TypedArray.byteLength", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.ignore", "kind": 12, - "tags": [], + "label": "->TypedArray.byteLength", + "sortText": "byteLength", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => unit", - "documentation": {"kind": "markdown", "value": "\n `ignore(typedArray)` ignores the provided typedArray 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"}, - "sortText": "ignore", + "documentation": { + "kind": "markdown", + "value": "\n `ignore(typedArray)` ignores the provided typedArray 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" + }, "insertText": "->TypedArray.ignore", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceRightWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.ignore", + "sortText": "ignore", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n"}, - "sortText": "reduceRightWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n" + }, "insertText": "->TypedArray.reduceRightWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceRight", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceRightWithIndex", + "sortText": "reduceRightWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n"}, - "sortText": "reduceRight", + "documentation": { + "kind": "markdown", + "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n" + }, "insertText": "->TypedArray.reduceRight", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.joinWith", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceRight", + "sortText": "reduceRight", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, string) => string", - "documentation": {"kind": "markdown", "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n"}, - "sortText": "joinWith", + "documentation": { + "kind": "markdown", + "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n" + }, "insertText": "->TypedArray.joinWith", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.buffer", "kind": 12, - "tags": [], + "label": "->TypedArray.joinWith", + "sortText": "joinWith", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => ArrayBuffer.t", - "documentation": {"kind": "markdown", "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n"}, - "sortText": "buffer", + "documentation": { + "kind": "markdown", + "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n" + }, "insertText": "->TypedArray.buffer", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduce", "kind": 12, - "tags": [], + "label": "->TypedArray.buffer", + "sortText": "buffer", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n"}, - "sortText": "reduce", + "documentation": { + "kind": "markdown", + "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n" + }, "insertText": "->TypedArray.reduce", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.forEachWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.reduce", + "sortText": "reduce", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => unit) => unit", - "documentation": {"kind": "markdown", "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n"}, - "sortText": "forEachWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n" + }, "insertText": "->TypedArray.forEachWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copy", "kind": 12, - "tags": [], + "label": "->TypedArray.forEachWithIndex", + "sortText": "forEachWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n"}, - "sortText": "copy", + "documentation": { + "kind": "markdown", + "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n" + }, "insertText": "->TypedArray.copy", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.someWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.copy", + "sortText": "copy", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n"}, - "sortText": "someWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n" + }, "insertText": "->TypedArray.someWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findIndexWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.someWithIndex", + "sortText": "someWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n"}, - "sortText": "findIndexWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n" + }, "insertText": "->TypedArray.findIndexWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.sliceToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.findIndexWithIndex", + "sortText": "findIndexWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n"}, - "sortText": "sliceToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n" + }, "insertText": "->TypedArray.sliceToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.slice", "kind": 12, - "tags": [], + "label": "->TypedArray.sliceToEnd", + "sortText": "sliceToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n"}, - "sortText": "slice", + "documentation": { + "kind": "markdown", + "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n" + }, "insertText": "->TypedArray.slice", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findLastIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.slice", + "sortText": "slice", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n"}, - "sortText": "findLastIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n" + }, "insertText": "->TypedArray.findLastIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.includes", "kind": 12, - "tags": [], + "label": "->TypedArray.findLastIndex", + "sortText": "findLastIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => bool", - "documentation": {"kind": "markdown", "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n"}, - "sortText": "includes", + "documentation": { + "kind": "markdown", + "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n" + }, "insertText": "->TypedArray.includes", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fillToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.includes", + "sortText": "includes", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, 'a, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n"}, - "sortText": "fillToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n" + }, "insertText": "->TypedArray.fillToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fillAll", "kind": 12, - "tags": [], + "label": "->TypedArray.fillToEnd", + "sortText": "fillToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n"}, - "sortText": "fillAll", + "documentation": { + "kind": "markdown", + "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n" + }, "insertText": "->TypedArray.fillAll", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.find", "kind": 12, - "tags": [], + "label": "->TypedArray.fillAll", + "sortText": "fillAll", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n"}, - "sortText": "find", + "documentation": { + "kind": "markdown", + "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n" + }, "insertText": "->TypedArray.find", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.subarrayToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.find", + "sortText": "find", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n"}, - "sortText": "subarrayToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n" + }, "insertText": "->TypedArray.subarrayToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.set", "kind": 12, - "tags": [], + "label": "->TypedArray.subarrayToEnd", + "sortText": "subarrayToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int, 'a) => unit", - "documentation": {"kind": "markdown", "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n"}, - "sortText": "set", + "documentation": { + "kind": "markdown", + "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n" + }, "insertText": "->TypedArray.set", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toLocaleString", "kind": 12, - "tags": [], + "label": "->TypedArray.set", + "sortText": "set", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => string", - "documentation": {"kind": "markdown", "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n"}, - "sortText": "toLocaleString", + "documentation": { + "kind": "markdown", + "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n" + }, "insertText": "->TypedArray.toLocaleString", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.lastIndexOfFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.toLocaleString", + "sortText": "toLocaleString", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, int) => int", - "documentation": {"kind": "markdown", "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n"}, - "sortText": "lastIndexOfFrom", + "documentation": { + "kind": "markdown", + "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n" + }, "insertText": "->TypedArray.lastIndexOfFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.lastIndexOfFrom", + "sortText": "lastIndexOfFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", - "documentation": {"kind": "markdown", "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n"}, - "sortText": "findIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n" + }, "insertText": "->TypedArray.findIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.filterWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.findIndex", + "sortText": "findIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n"}, - "sortText": "filterWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n" + }, "insertText": "->TypedArray.filterWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.sort", "kind": 12, - "tags": [], + "label": "->TypedArray.filterWithIndex", + "sortText": "filterWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", - "documentation": {"kind": "markdown", "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n"}, - "sortText": "sort", + "documentation": { + "kind": "markdown", + "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n" + }, "insertText": "->TypedArray.sort", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.mapWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.sort", + "sortText": "sort", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", - "documentation": {"kind": "markdown", "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n"}, - "sortText": "mapWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n" + }, "insertText": "->TypedArray.mapWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.every", "kind": 12, - "tags": [], + "label": "->TypedArray.mapWithIndex", + "sortText": "mapWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n"}, - "sortText": "every", + "documentation": { + "kind": "markdown", + "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n" + }, "insertText": "->TypedArray.every", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.length", "kind": 12, - "tags": [], + "label": "->TypedArray.every", + "sortText": "every", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n"}, - "sortText": "length", + "documentation": { + "kind": "markdown", + "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n" + }, "insertText": "->TypedArray.length", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.indexOf", "kind": 12, - "tags": [], + "label": "->TypedArray.length", + "sortText": "length", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a) => int", - "documentation": {"kind": "markdown", "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n"}, - "sortText": "indexOf", + "documentation": { + "kind": "markdown", + "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n" + }, "insertText": "->TypedArray.indexOf", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyWithinToEnd", "kind": 12, - "tags": [1], + "label": "->TypedArray.indexOf", + "sortText": "indexOf", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n"}, - "sortText": "copyWithinToEnd", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n" + }, "insertText": "->TypedArray.copyWithinToEnd", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.some", "kind": 12, - "tags": [], + "label": "->TypedArray.copyWithinToEnd", + "sortText": "copyWithinToEnd", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n"}, - "sortText": "some", + "documentation": { + "kind": "markdown", + "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n" + }, "insertText": "->TypedArray.some", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reduceWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.some", + "sortText": "some", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", - "documentation": {"kind": "markdown", "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n"}, - "sortText": "reduceWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n" + }, "insertText": "->TypedArray.reduceWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.map", "kind": 12, - "tags": [], + "label": "->TypedArray.reduceWithIndex", + "sortText": "reduceWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => 'b) => t<'b>", - "documentation": {"kind": "markdown", "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n"}, - "sortText": "map", + "documentation": { + "kind": "markdown", + "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n" + }, "insertText": "->TypedArray.map", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toSorted", "kind": 12, - "tags": [], + "label": "->TypedArray.map", + "sortText": "map", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n"}, - "sortText": "toSorted", + "documentation": { + "kind": "markdown", + "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n" + }, "insertText": "->TypedArray.toSorted", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyAllWithin", "kind": 12, - "tags": [], + "label": "->TypedArray.toSorted", + "sortText": "toSorted", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~target: int) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n"}, - "sortText": "copyAllWithin", + "documentation": { + "kind": "markdown", + "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n" + }, "insertText": "->TypedArray.copyAllWithin", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.subarray", "kind": 12, - "tags": [], + "label": "->TypedArray.copyAllWithin", + "sortText": "copyAllWithin", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n"}, - "sortText": "subarray", + "documentation": { + "kind": "markdown", + "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n" + }, "insertText": "->TypedArray.subarray", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.setArray", "kind": 12, - "tags": [], + "label": "->TypedArray.subarray", + "sortText": "subarray", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, array<'a>) => unit", - "documentation": {"kind": "markdown", "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n"}, - "sortText": "setArray", + "documentation": { + "kind": "markdown", + "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n" + }, "insertText": "->TypedArray.setArray", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.get", "kind": 12, - "tags": [], + "label": "->TypedArray.setArray", + "sortText": "setArray", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n"}, - "sortText": "get", + "documentation": { + "kind": "markdown", + "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n" + }, "insertText": "->TypedArray.get", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.with", "kind": 12, - "tags": [], + "label": "->TypedArray.get", + "sortText": "get", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, int, 'a) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n"}, - "sortText": "with", + "documentation": { + "kind": "markdown", + "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + }, "insertText": "->TypedArray.with", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toReversed", "kind": 12, - "tags": [], + "label": "->TypedArray.with", + "sortText": "with", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n"}, - "sortText": "toReversed", + "documentation": { + "kind": "markdown", + "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + }, "insertText": "->TypedArray.toReversed", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.copyWithin", "kind": 12, - "tags": [], + "label": "->TypedArray.toReversed", + "sortText": "toReversed", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n"}, - "sortText": "copyWithin", + "documentation": { + "kind": "markdown", + "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n" + }, "insertText": "->TypedArray.copyWithin", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.everyWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.copyWithin", + "sortText": "copyWithin", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", - "documentation": {"kind": "markdown", "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n"}, - "sortText": "everyWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n" + }, "insertText": "->TypedArray.everyWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.toString", "kind": 12, - "tags": [], + "label": "->TypedArray.everyWithIndex", + "sortText": "everyWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => string", - "documentation": {"kind": "markdown", "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n"}, - "sortText": "toString", + "documentation": { + "kind": "markdown", + "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n" + }, "insertText": "->TypedArray.toString", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.setArrayFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.toString", + "sortText": "toString", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, array<'a>, int) => unit", - "documentation": {"kind": "markdown", "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n"}, - "sortText": "setArrayFrom", + "documentation": { + "kind": "markdown", + "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n" + }, "insertText": "->TypedArray.setArrayFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.forEach", "kind": 12, - "tags": [], + "label": "->TypedArray.setArrayFrom", + "sortText": "setArrayFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a => unit) => unit", - "documentation": {"kind": "markdown", "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n"}, - "sortText": "forEach", + "documentation": { + "kind": "markdown", + "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n" + }, "insertText": "->TypedArray.forEach", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.findWithIndex", "kind": 12, - "tags": [], + "label": "->TypedArray.forEach", + "sortText": "forEach", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", - "documentation": {"kind": "markdown", "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n"}, - "sortText": "findWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n" + }, "insertText": "->TypedArray.findWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.fill", "kind": 12, - "tags": [], + "label": "->TypedArray.findWithIndex", + "sortText": "findWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", - "documentation": {"kind": "markdown", "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n"}, - "sortText": "fill", + "documentation": { + "kind": "markdown", + "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n" + }, "insertText": "->TypedArray.fill", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.indexOfFrom", "kind": 12, - "tags": [], + "label": "->TypedArray.fill", + "sortText": "fill", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'a>, 'a, int) => int", - "documentation": {"kind": "markdown", "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n"}, - "sortText": "indexOfFrom", + "documentation": { + "kind": "markdown", + "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n" + }, "insertText": "->TypedArray.indexOfFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.reverse", "kind": 12, - "tags": [], + "label": "->TypedArray.indexOfFrom", + "sortText": "indexOfFrom", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => unit", - "documentation": {"kind": "markdown", "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n"}, - "sortText": "reverse", + "documentation": { + "kind": "markdown", + "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n" + }, "insertText": "->TypedArray.reverse", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }, { - "label": "->TypedArray.byteOffset", "kind": 12, - "tags": [], + "label": "->TypedArray.reverse", + "sortText": "reverse", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 21, "line": 41 }, + "start": { "character": 20, "line": 41 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t<'a> => int", - "documentation": {"kind": "markdown", "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n"}, - "sortText": "byteOffset", + "documentation": { + "kind": "markdown", + "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n" + }, "insertText": "->TypedArray.byteOffset", - "additionalTextEdits": [{ - "range": {"start": {"line": 41, "character": 20}, "end": {"line": 41, "character": 21}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->TypedArray.byteOffset", + "sortText": "byteOffset", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/Component.res.txt b/tests/analysis_tests/tests/src/expected/Component.res.txt index e69de29bb2d..19765bd501b 100644 --- a/tests/analysis_tests/tests/src/expected/Component.res.txt +++ b/tests/analysis_tests/tests/src/expected/Component.res.txt @@ -0,0 +1 @@ +null diff --git a/tests/analysis_tests/tests/src/expected/Component.resi.txt b/tests/analysis_tests/tests/src/expected/Component.resi.txt index e69de29bb2d..19765bd501b 100644 --- a/tests/analysis_tests/tests/src/expected/Component.resi.txt +++ b/tests/analysis_tests/tests/src/expected/Component.resi.txt @@ -0,0 +1 @@ +null diff --git a/tests/analysis_tests/tests/src/expected/CreateInterface.res.txt b/tests/analysis_tests/tests/src/expected/CreateInterface.res.txt index 998459a8a1c..e06fbcf39fa 100644 --- a/tests/analysis_tests/tests/src/expected/CreateInterface.res.txt +++ b/tests/analysis_tests/tests/src/expected/CreateInterface.res.txt @@ -1,3 +1,4 @@ +null Create Interface src/CreateInterface.res type r = {name: string, age: int} let add: (~x: int, ~y: int) => int diff --git a/tests/analysis_tests/tests/src/expected/Cross.res.txt b/tests/analysis_tests/tests/src/expected/Cross.res.txt index 9cbbdc6d998..315e9544ad9 100644 --- a/tests/analysis_tests/tests/src/expected/Cross.res.txt +++ b/tests/analysis_tests/tests/src/expected/Cross.res.txt @@ -1,97 +1,204 @@ +null References src/Cross.res 0:17 [ -{"uri": "Cross.res", "range": {"start": {"line": 0, "character": 15}, "end": {"line": 0, "character": 25}}}, -{"uri": "Cross.res", "range": {"start": {"line": 3, "character": 16}, "end": {"line": 3, "character": 26}}}, -{"uri": "Cross.res", "range": {"start": {"line": 5, "character": 13}, "end": {"line": 5, "character": 23}}}, -{"uri": "Cross.res", "range": {"start": {"line": 7, "character": 16}, "end": {"line": 7, "character": 26}}}, -{"uri": "References.res", "range": {"start": {"line": 0, "character": 0}, "end": {"line": 0, "character": 0}}} + { + "range": { + "end": { "character": 25, "line": 0 }, + "start": { "character": 15, "line": 0 } + }, + "uri": "file:///Cross.res" + }, + { + "range": { + "end": { "character": 26, "line": 3 }, + "start": { "character": 16, "line": 3 } + }, + "uri": "file:///Cross.res" + }, + { + "range": { + "end": { "character": 23, "line": 5 }, + "start": { "character": 13, "line": 5 } + }, + "uri": "file:///Cross.res" + }, + { + "range": { + "end": { "character": 26, "line": 7 }, + "start": { "character": 16, "line": 7 } + }, + "uri": "file:///Cross.res" + }, + { + "range": { + "end": { "character": 0, "line": 0 }, + "start": { "character": 0, "line": 0 } + }, + "uri": "file:///References.res" + } ] References src/Cross.res 9:31 [ -{"uri": "Cross.res", "range": {"start": {"line": 9, "character": 28}, "end": {"line": 9, "character": 51}}}, -{"uri": "Cross.res", "range": {"start": {"line": 12, "character": 29}, "end": {"line": 12, "character": 52}}}, -{"uri": "Cross.res", "range": {"start": {"line": 14, "character": 26}, "end": {"line": 14, "character": 49}}}, -{"uri": "Cross.res", "range": {"start": {"line": 16, "character": 29}, "end": {"line": 16, "character": 52}}}, -{"uri": "ReferencesWithInterface.res", "range": {"start": {"line": 0, "character": 0}, "end": {"line": 0, "character": 0}}}, -{"uri": "ReferencesWithInterface.resi", "range": {"start": {"line": 0, "character": 0}, "end": {"line": 0, "character": 0}}} + { + "range": { + "end": { "character": 51, "line": 9 }, + "start": { "character": 28, "line": 9 } + }, + "uri": "file:///Cross.res" + }, + { + "range": { + "end": { "character": 52, "line": 12 }, + "start": { "character": 29, "line": 12 } + }, + "uri": "file:///Cross.res" + }, + { + "range": { + "end": { "character": 49, "line": 14 }, + "start": { "character": 26, "line": 14 } + }, + "uri": "file:///Cross.res" + }, + { + "range": { + "end": { "character": 52, "line": 16 }, + "start": { "character": 29, "line": 16 } + }, + "uri": "file:///Cross.res" + }, + { + "range": { + "end": { "character": 0, "line": 0 }, + "start": { "character": 0, "line": 0 } + }, + "uri": "file:///ReferencesWithInterface.res" + }, + { + "range": { + "end": { "character": 0, "line": 0 }, + "start": { "character": 0, "line": 0 } + }, + "uri": "file:///ReferencesWithInterface.resi" + } ] Rename src/Cross.res 18:13 RenameWithInterfacePrime [ -{ - "kind": "rename", - "oldUri": "RenameWithInterface.resi", - "newUri": "RenameWithInterfacePrime.resi" -}, -{ - "kind": "rename", - "oldUri": "RenameWithInterface.res", - "newUri": "RenameWithInterfacePrime.res" -}, -{ - "textDocument": { - "version": null, - "uri": "Cross.res" - }, - "edits": [{ - "range": {"start": {"line": 18, "character": 8}, "end": {"line": 18, "character": 27}}, - "newText": "RenameWithInterfacePrime" - }, { - "range": {"start": {"line": 21, "character": 8}, "end": {"line": 21, "character": 27}}, - "newText": "RenameWithInterfacePrime" - }] + { + "kind": "rename", + "newUri": "file:///./src/RenameWithInterfacePrime.resi", + "oldUri": "file:///RenameWithInterface.resi" + }, + { + "kind": "rename", + "newUri": "file:///./src/RenameWithInterfacePrime.res", + "oldUri": "file:///RenameWithInterface.res" + }, + { + "edits": [ + { + "newText": "RenameWithInterfacePrime", + "range": { + "end": { "character": 27, "line": 18 }, + "start": { "character": 8, "line": 18 } + } + }, + { + "newText": "RenameWithInterfacePrime", + "range": { + "end": { "character": 27, "line": 21 }, + "start": { "character": 8, "line": 21 } + } + } + ], + "textDocument": { "uri": "file:///Cross.res" } } ] Rename src/Cross.res 21:28 xPrime [ -{ - "textDocument": { - "version": null, - "uri": "RenameWithInterface.resi" - }, - "edits": [{ - "range": {"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 5}}, - "newText": "xPrime" - }] - }, -{ - "textDocument": { - "version": null, - "uri": "RenameWithInterface.res" + { + "edits": [ + { + "newText": "xPrime", + "range": { + "end": { "character": 5, "line": 0 }, + "start": { "character": 4, "line": 0 } + } + } + ], + "textDocument": { "uri": "file:///RenameWithInterface.resi" } }, - "edits": [{ - "range": {"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 5}}, - "newText": "xPrime" - }] + { + "edits": [ + { + "newText": "xPrime", + "range": { + "end": { "character": 5, "line": 0 }, + "start": { "character": 4, "line": 0 } + } + } + ], + "textDocument": { "uri": "file:///RenameWithInterface.res" } }, -{ - "textDocument": { - "version": null, - "uri": "Cross.res" - }, - "edits": [{ - "range": {"start": {"line": 18, "character": 28}, "end": {"line": 18, "character": 29}}, - "newText": "xPrime" - }, { - "range": {"start": {"line": 21, "character": 28}, "end": {"line": 21, "character": 29}}, - "newText": "xPrime" - }] + { + "edits": [ + { + "newText": "xPrime", + "range": { + "end": { "character": 29, "line": 18 }, + "start": { "character": 28, "line": 18 } + } + }, + { + "newText": "xPrime", + "range": { + "end": { "character": 29, "line": 21 }, + "start": { "character": 28, "line": 21 } + } + } + ], + "textDocument": { "uri": "file:///Cross.res" } } ] TypeDefinition src/Cross.res 24:5 -{"uri": "TypeDefinition.res", "range": {"start": {"line": 2, "character": 0}, "end": {"line": 2, "character": 28}}} +{ + "range": { + "end": { "character": 28, "line": 2 }, + "start": { "character": 0, "line": 2 } + }, + "uri": "file:///TypeDefinition.res" +} Definition src/Cross.res 27:32 -{"uri": "DefinitionWithInterface.res", "range": {"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 5}}} +{ + "range": { + "end": { "character": 5, "line": 0 }, + "start": { "character": 4, "line": 0 } + }, + "uri": "file:///DefinitionWithInterface.res" +} Definition src/Cross.res 30:36 -{"uri": "DefinitionWithInterface.res", "range": {"start": {"line": 3, "character": 5}, "end": {"line": 3, "character": 6}}} +{ + "range": { + "end": { "character": 6, "line": 3 }, + "start": { "character": 5, "line": 3 } + }, + "uri": "file:///DefinitionWithInterface.res" +} TypeDefinition src/Cross.res 33:37 -{"uri": "DefinitionWithInterface.resi", "range": {"start": {"line": 3, "character": 0}, "end": {"line": 3, "character": 6}}} +{ + "range": { + "end": { "character": 6, "line": 3 }, + "start": { "character": 0, "line": 3 } + }, + "uri": "file:///DefinitionWithInterface.resi" +} Complete src/Cross.res 36:28 posCursor:[36:28] posNoWhite:[36:27] Found expr:[36:3->36:28] @@ -104,5 +211,11 @@ Path DefinitionWithInterface.a [] Definition src/Cross.res 39:39 -{"uri": "DefinitionWithInterface.res", "range": {"start": {"line": 9, "character": 6}, "end": {"line": 9, "character": 7}}} +{ + "range": { + "end": { "character": 7, "line": 9 }, + "start": { "character": 6, "line": 9 } + }, + "uri": "file:///DefinitionWithInterface.res" +} diff --git a/tests/analysis_tests/tests/src/expected/Dce.res.txt b/tests/analysis_tests/tests/src/expected/Dce.res.txt index 58c835d7a2b..fe0e791c6fd 100644 --- a/tests/analysis_tests/tests/src/expected/Dce.res.txt +++ b/tests/analysis_tests/tests/src/expected/Dce.res.txt @@ -1,3 +1,4 @@ +null DCE src/Dce.res issues:1 diff --git a/tests/analysis_tests/tests/src/expected/Debug.res.txt b/tests/analysis_tests/tests/src/expected/Debug.res.txt index 3c94d138aaa..df7a1419d43 100644 --- a/tests/analysis_tests/tests/src/expected/Debug.res.txt +++ b/tests/analysis_tests/tests/src/expected/Debug.res.txt @@ -1,5 +1,12 @@ +null Definition src/Debug.res 2:27 -{"uri": "ShadowedBelt.res", "range": {"start": {"line": 1, "character": 6}, "end": {"line": 1, "character": 9}}} +{ + "range": { + "end": { "character": 9, "line": 1 }, + "start": { "character": 6, "line": 1 } + }, + "uri": "file:///ShadowedBelt.res" +} Complete src/Debug.res 11:8 posCursor:[11:8] posNoWhite:[11:7] Found expr:[11:5->11:8] @@ -10,18 +17,31 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 2 Stdlib Js ContextPath Value[eqN] Path eqN -[{ - "label": "eqNullable", - "kind": 12, - "tags": [1], +[ + { + "data": null, + "deprecated": true, "detail": "('a, nullable<'a>) => bool", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `eqNullable` directly instead.\n\n"} - }, { - "label": "eqNull", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `eqNullable` directly instead.\n\n" + }, "kind": 12, - "tags": [1], + "label": "eqNullable", + "tags": [ 1 ] + }, + { + "data": null, + "deprecated": true, "detail": "('a, null<'a>) => bool", - "documentation": {"kind": "markdown", "value": "Deprecated: Use `eqNull` directly instead.\n\n"} - }] + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use `eqNull` directly instead.\n\n" + }, + "kind": 12, + "label": "eqNull", + "tags": [ 1 ] + } +] diff --git a/tests/analysis_tests/tests/src/expected/Definition.res.txt b/tests/analysis_tests/tests/src/expected/Definition.res.txt index 824f03e3c5d..33ff76cf648 100644 --- a/tests/analysis_tests/tests/src/expected/Definition.res.txt +++ b/tests/analysis_tests/tests/src/expected/Definition.res.txt @@ -1,18 +1,52 @@ +null Definition src/Definition.res 2:8 -{"uri": "Definition.res", "range": {"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 6}}} +{ + "range": { + "end": { "character": 6, "line": 0 }, + "start": { "character": 4, "line": 0 } + }, + "uri": "file:///Definition.res" +} Definition src/Definition.res 10:23 -{"uri": "Definition.res", "range": {"start": {"line": 6, "character": 7}, "end": {"line": 6, "character": 13}}} +{ + "range": { + "end": { "character": 13, "line": 6 }, + "start": { "character": 7, "line": 6 } + }, + "uri": "file:///Definition.res" +} Hover src/Definition.res 14:14 -{"contents": {"kind": "markdown", "value": "```rescript\n(list<'a>, 'a => 'b) => list<'b>\n```\n---\n\n`map(list, f)` returns a new list with `f` applied to each element of `list`.\n\n## Examples\n\n```rescript\nlist{1, 2}->List.map(x => x + 1) == list{2, 3}\n```\n"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\n(list<'a>, 'a => 'b) => list<'b>\n```\n---\n\n`map(list, f)` returns a new list with `f` applied to each element of `list`.\n\n## Examples\n\n```rescript\nlist{1, 2}->List.map(x => x + 1) == list{2, 3}\n```\n" + } +} Hover src/Definition.res 18:14 -{"contents": {"kind": "markdown", "value": "```rescript\n('a => 'b, list<'a>) => list<'b>\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\n('a => 'b, list<'a>) => list<'b>\n```" + } +} Hover src/Definition.res 23:3 -{"contents": {"kind": "markdown", "value": "```rescript\n(int, int) => int\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\n(int, int) => int\n```" + } +} Definition src/Definition.res 26:3 -{"uri": "Definition.res", "range": {"start": {"line": 21, "character": 4}, "end": {"line": 21, "character": 13}}} +{ + "range": { + "end": { "character": 13, "line": 21 }, + "start": { "character": 4, "line": 21 } + }, + "uri": "file:///Definition.res" +} diff --git a/tests/analysis_tests/tests/src/expected/DefinitionWithInterface.res.txt b/tests/analysis_tests/tests/src/expected/DefinitionWithInterface.res.txt index f8d85032d22..012b647fe15 100644 --- a/tests/analysis_tests/tests/src/expected/DefinitionWithInterface.res.txt +++ b/tests/analysis_tests/tests/src/expected/DefinitionWithInterface.res.txt @@ -1,6 +1,19 @@ +null Definition src/DefinitionWithInterface.res 0:4 -{"uri": "DefinitionWithInterface.resi", "range": {"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 5}}} +{ + "range": { + "end": { "character": 5, "line": 0 }, + "start": { "character": 4, "line": 0 } + }, + "uri": "file:///DefinitionWithInterface.resi" +} Definition src/DefinitionWithInterface.res 9:6 -{"uri": "DefinitionWithInterface.resi", "range": {"start": {"line": 6, "character": 2}, "end": {"line": 6, "character": 12}}} +{ + "range": { + "end": { "character": 12, "line": 6 }, + "start": { "character": 2, "line": 6 } + }, + "uri": "file:///DefinitionWithInterface.resi" +} diff --git a/tests/analysis_tests/tests/src/expected/DefinitionWithInterface.resi.txt b/tests/analysis_tests/tests/src/expected/DefinitionWithInterface.resi.txt index 10bc343390a..447fbe7b20c 100644 --- a/tests/analysis_tests/tests/src/expected/DefinitionWithInterface.resi.txt +++ b/tests/analysis_tests/tests/src/expected/DefinitionWithInterface.resi.txt @@ -1,6 +1,19 @@ +null Definition src/DefinitionWithInterface.resi 0:4 -{"uri": "DefinitionWithInterface.res", "range": {"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 5}}} +{ + "range": { + "end": { "character": 5, "line": 0 }, + "start": { "character": 4, "line": 0 } + }, + "uri": "file:///DefinitionWithInterface.res" +} Definition src/DefinitionWithInterface.resi 6:6 -{"uri": "DefinitionWithInterface.res", "range": {"start": {"line": 9, "character": 6}, "end": {"line": 9, "character": 7}}} +{ + "range": { + "end": { "character": 7, "line": 9 }, + "start": { "character": 6, "line": 9 } + }, + "uri": "file:///DefinitionWithInterface.res" +} diff --git a/tests/analysis_tests/tests/src/expected/Destructuring.res.txt b/tests/analysis_tests/tests/src/expected/Destructuring.res.txt index cd442729444..2454582e2cd 100644 --- a/tests/analysis_tests/tests/src/expected/Destructuring.res.txt +++ b/tests/analysis_tests/tests/src/expected/Destructuring.res.txt @@ -1,3 +1,4 @@ +null Complete src/Destructuring.res 4:11 posCursor:[4:11] posNoWhite:[4:9] Found pattern:[4:4->4:12] Completable: Cpattern Value[x]->recordBody @@ -5,13 +6,20 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[x] Path x -[{ - "label": "age", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nage: int\n```\n\n```rescript\ntype x = {name: string, age: int}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nage: int\n```\n\n```rescript\ntype x = {name: string, age: int}\n```" + }, + "kind": 5, + "label": "age", + "tags": [] + } +] Complete src/Destructuring.res 7:8 posCursor:[7:8] posNoWhite:[7:7] Found pattern:[7:7->7:9] @@ -20,19 +28,32 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[x] Path x -[{ - "label": "name", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nname: string\n```\n\n```rescript\ntype x = {name: string, age: int}\n```"} - }, { - "label": "age", + "documentation": { + "kind": "markdown", + "value": "```rescript\nname: string\n```\n\n```rescript\ntype x = {name: string, age: int}\n```" + }, "kind": 5, - "tags": [], + "label": "name", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nage: int\n```\n\n```rescript\ntype x = {name: string, age: int}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nage: int\n```\n\n```rescript\ntype x = {name: string, age: int}\n```" + }, + "kind": 5, + "label": "age", + "tags": [] + } +] Complete src/Destructuring.res 11:13 posCursor:[11:13] posNoWhite:[11:11] Found expr:[10:8->14:1] @@ -43,13 +64,20 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[x] Path x -[{ - "label": "age", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nage: int\n```\n\n```rescript\ntype x = {name: string, age: int}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nage: int\n```\n\n```rescript\ntype x = {name: string, age: int}\n```" + }, + "kind": 5, + "label": "age", + "tags": [] + } +] Complete src/Destructuring.res 17:10 posCursor:[17:10] posNoWhite:[17:9] Found expr:[16:9->20:1] @@ -60,19 +88,32 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[x] Path x -[{ - "label": "name", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nname: string\n```\n\n```rescript\ntype x = {name: string, age: int}\n```"} - }, { - "label": "age", + "documentation": { + "kind": "markdown", + "value": "```rescript\nname: string\n```\n\n```rescript\ntype x = {name: string, age: int}\n```" + }, "kind": 5, - "tags": [], + "label": "name", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nage: int\n```\n\n```rescript\ntype x = {name: string, age: int}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nage: int\n```\n\n```rescript\ntype x = {name: string, age: int}\n```" + }, + "kind": 5, + "label": "age", + "tags": [] + } +] Complete src/Destructuring.res 31:8 posCursor:[31:8] posNoWhite:[31:7] Found pattern:[31:7->31:9] @@ -81,17 +122,30 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[x] Path x -[{ - "label": "someField", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nsomeField: int\n```\n\n```rescript\ntype recordWithOptField = {someField: int, someOptField: option}\n```"} - }, { - "label": "?someOptField", + "documentation": { + "kind": "markdown", + "value": "```rescript\nsomeField: int\n```\n\n```rescript\ntype recordWithOptField = {someField: int, someOptField: option}\n```" + }, "kind": 5, - "tags": [], + "label": "someField", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "option", - "documentation": {"kind": "markdown", "value": "someOptField is an optional field, and needs to be destructured using '?'.\n\n```rescript\n?someOptField: option\n```\n\n```rescript\ntype recordWithOptField = {someField: int, someOptField: option}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "someOptField is an optional field, and needs to be destructured using '?'.\n\n```rescript\n?someOptField: option\n```\n\n```rescript\ntype recordWithOptField = {someField: int, someOptField: option}\n```" + }, + "kind": 5, + "label": "?someOptField", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/Div.res.txt b/tests/analysis_tests/tests/src/expected/Div.res.txt index deb951ada87..954d04057dd 100644 --- a/tests/analysis_tests/tests/src/expected/Div.res.txt +++ b/tests/analysis_tests/tests/src/expected/Div.res.txt @@ -1,5 +1,6 @@ +null Hover src/Div.res 0:10 -{"contents": {"kind": "markdown", "value": "```rescript\nstring\n```"}} +{ "contents": { "kind": "markdown", "value": "```rescript\nstring\n```" } } Complete src/Div.res 3:17 posCursor:[3:17] posNoWhite:[3:16] Found expr:[3:3->3:17] @@ -9,11 +10,15 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path ReactDOM.domProps Path JsxDOM.domProps -[{ - "label": "dangerouslySetInnerHTML", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "{\"__html\": string}", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "dangerouslySetInnerHTML", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/DocComments.res.txt b/tests/analysis_tests/tests/src/expected/DocComments.res.txt index 1f8ab304def..ff323e5b1d9 100644 --- a/tests/analysis_tests/tests/src/expected/DocComments.res.txt +++ b/tests/analysis_tests/tests/src/expected/DocComments.res.txt @@ -1,15 +1,41 @@ +null Hover src/DocComments.res 9:9 -{"contents": {"kind": "markdown", "value": "```rescript\nint\n```\n---\n Doc comment with a triple-backquote example\\n \\n ```res example\\n let a = 10\\n /*\\n * stuff\\n */\\n ```\\n"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nint\n```\n---\n Doc comment with a triple-backquote example\\n \\n ```res example\\n let a = 10\\n /*\\n * stuff\\n */\\n ```\\n" + } +} Hover src/DocComments.res 22:6 -{"contents": {"kind": "markdown", "value": "```rescript\nint\n```\n---\n\n Doc comment with a triple-backquote example\n \n ```res example\n let a = 10\n /*\n * stuff\n */\n ```\n"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nint\n```\n---\n\n Doc comment with a triple-backquote example\n \n ```res example\n let a = 10\n /*\n * stuff\n */\n ```\n" + } +} Hover src/DocComments.res 33:9 -{"contents": {"kind": "markdown", "value": "```rescript\nint\n```\n---\n Doc comment with a triple-backquote example\\n \\n ```res example\\n let a = 10\\n let b = 20\\n ```\\n"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nint\n```\n---\n Doc comment with a triple-backquote example\\n \\n ```res example\\n let a = 10\\n let b = 20\\n ```\\n" + } +} Hover src/DocComments.res 44:6 -{"contents": {"kind": "markdown", "value": "```rescript\nint\n```\n---\n\n Doc comment with a triple-backquote example\n \n ```res example\n let a = 10\n let b = 20\n ```\n"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nint\n```\n---\n\n Doc comment with a triple-backquote example\n \n ```res example\n let a = 10\n let b = 20\n ```\n" + } +} Hover src/DocComments.res 48:5 -{"contents": {"kind": "markdown", "value": "```rescript\nint\n```\n---\nNew doc comment format"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nint\n```\n---\nNew doc comment format" + } +} diff --git a/tests/analysis_tests/tests/src/expected/DocumentSymbol.res.txt b/tests/analysis_tests/tests/src/expected/DocumentSymbol.res.txt index d103cf3956c..9c188827e52 100644 --- a/tests/analysis_tests/tests/src/expected/DocumentSymbol.res.txt +++ b/tests/analysis_tests/tests/src/expected/DocumentSymbol.res.txt @@ -1,105 +1,3 @@ +null DocumentSymbol src/DocumentSymbol.res -[ -{ - "name": "MyList", - "kind": 2, - "range": {"start": {"line": 0, "character": 7}, "end": {"line": 0, "character": 25}}, - "selectionRange": {"start": {"line": 0, "character": 7}, "end": {"line": 0, "character": 25}} -}, -{ - "name": "Dep", - "kind": 2, - "range": {"start": {"line": 2, "character": 7}, "end": {"line": 7, "character": 1}}, - "selectionRange": {"start": {"line": 2, "character": 7}, "end": {"line": 7, "character": 1}}, - "children": [ - { - "name": "customDouble", - "kind": 12, - "range": {"start": {"line": 6, "character": 2}, "end": {"line": 6, "character": 35}}, - "selectionRange": {"start": {"line": 6, "character": 2}, "end": {"line": 6, "character": 35}} - }] -}, -{ - "name": "Lib", - "kind": 2, - "range": {"start": {"line": 9, "character": 7}, "end": {"line": 12, "character": 1}}, - "selectionRange": {"start": {"line": 9, "character": 7}, "end": {"line": 12, "character": 1}}, - "children": [ - { - "name": "foo", - "kind": 12, - "range": {"start": {"line": 10, "character": 2}, "end": {"line": 10, "character": 54}}, - "selectionRange": {"start": {"line": 10, "character": 2}, "end": {"line": 10, "character": 54}} - }, - { - "name": "next", - "kind": 12, - "range": {"start": {"line": 11, "character": 2}, "end": {"line": 11, "character": 48}}, - "selectionRange": {"start": {"line": 11, "character": 2}, "end": {"line": 11, "character": 48}} - }] -}, -{ - "name": "op", - "kind": 13, - "range": {"start": {"line": 14, "character": 0}, "end": {"line": 14, "character": 16}}, - "selectionRange": {"start": {"line": 14, "character": 0}, "end": {"line": 14, "character": 16}} -}, -{ - "name": "ForAuto", - "kind": 2, - "range": {"start": {"line": 16, "character": 7}, "end": {"line": 20, "character": 1}}, - "selectionRange": {"start": {"line": 16, "character": 7}, "end": {"line": 20, "character": 1}}, - "children": [ - { - "name": "t", - "kind": 26, - "range": {"start": {"line": 17, "character": 2}, "end": {"line": 17, "character": 14}}, - "selectionRange": {"start": {"line": 17, "character": 2}, "end": {"line": 17, "character": 14}} - }, - { - "name": "abc", - "kind": 12, - "range": {"start": {"line": 18, "character": 2}, "end": {"line": 18, "character": 32}}, - "selectionRange": {"start": {"line": 18, "character": 2}, "end": {"line": 18, "character": 32}} - }, - { - "name": "abd", - "kind": 12, - "range": {"start": {"line": 19, "character": 2}, "end": {"line": 19, "character": 32}}, - "selectionRange": {"start": {"line": 19, "character": 2}, "end": {"line": 19, "character": 32}} - }] -}, -{ - "name": "fa", - "kind": 16, - "range": {"start": {"line": 22, "character": 0}, "end": {"line": 22, "character": 22}}, - "selectionRange": {"start": {"line": 22, "character": 0}, "end": {"line": 22, "character": 22}} -}, -{ - "name": "O", - "kind": 2, - "range": {"start": {"line": 24, "character": 7}, "end": {"line": 29, "character": 1}}, - "selectionRange": {"start": {"line": 24, "character": 7}, "end": {"line": 29, "character": 1}}, - "children": [ - { - "name": "Comp", - "kind": 2, - "range": {"start": {"line": 25, "character": 9}, "end": {"line": 28, "character": 3}}, - "selectionRange": {"start": {"line": 25, "character": 9}, "end": {"line": 28, "character": 3}}, - "children": [ - { - "name": "make", - "kind": 12, - "range": {"start": {"line": 26, "character": 4}, "end": {"line": 27, "character": 97}}, - "selectionRange": {"start": {"line": 26, "character": 4}, "end": {"line": 27, "character": 97}} - }] - }] -}, -{ - "name": "zzz", - "kind": 16, - "range": {"start": {"line": 31, "character": 0}, "end": {"line": 31, "character": 12}}, - "selectionRange": {"start": {"line": 31, "character": 0}, "end": {"line": 31, "character": 12}} -} -] - +Fatal error: exception Yojson__Safe.Util.Type_error("Expected string, got array", _) diff --git a/tests/analysis_tests/tests/src/expected/DotPipeCompleteFromCurrentModule.res.txt b/tests/analysis_tests/tests/src/expected/DotPipeCompleteFromCurrentModule.res.txt index 70f6773fec5..dda26863dc0 100644 --- a/tests/analysis_tests/tests/src/expected/DotPipeCompleteFromCurrentModule.res.txt +++ b/tests/analysis_tests/tests/src/expected/DotPipeCompleteFromCurrentModule.res.txt @@ -1,3 +1,4 @@ +null Complete src/DotPipeCompleteFromCurrentModule.res 10:13 posCursor:[10:13] posNoWhite:[10:12] Found expr:[9:12->13:5] posCursor:[10:13] posNoWhite:[10:12] Found expr:[10:11->12:10] @@ -16,17 +17,26 @@ Path x CPPipe pathFromEnv:X found:true Path X. Path -[{ - "label": "->z", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 10 }, + "start": { "character": 12, "line": 10 } + } + } + ], + "data": null, + "deprecated": false, "detail": "X.t => string", - "documentation": null, - "sortText": "z", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->z", - "additionalTextEdits": [{ - "range": {"start": {"line": 10, "character": 12}, "end": {"line": 10, "character": 13}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->z", + "sortText": "z", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/DotPipeCompletionSpec.res.txt b/tests/analysis_tests/tests/src/expected/DotPipeCompletionSpec.res.txt index c4f755efbc3..1f509e6b2e7 100644 --- a/tests/analysis_tests/tests/src/expected/DotPipeCompletionSpec.res.txt +++ b/tests/analysis_tests/tests/src/expected/DotPipeCompletionSpec.res.txt @@ -1,3 +1,4 @@ +null Complete src/DotPipeCompletionSpec.res 15:5 posCursor:[15:5] posNoWhite:[15:4] Found expr:[15:3->15:5] Pexp_field [15:3->15:4] _:[18:0->15:5] @@ -13,37 +14,60 @@ Path n CPPipe pathFromEnv:SomeModule found:true Path SomeModule. Path -[{ - "label": "name", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nname: string\n```\n\n```rescript\ntype t = {name: string}\n```"} - }, { - "label": "->SomeModule.withUnlabelledArgumentNotFirst", - "kind": 12, - "tags": [], + "documentation": { + "kind": "markdown", + "value": "```rescript\nname: string\n```\n\n```rescript\ntype t = {name: string}\n```" + }, + "kind": 5, + "label": "name", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 15 }, + "start": { "character": 4, "line": 15 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(~name: string=?, t) => unit", - "documentation": null, - "sortText": "withUnlabelledArgumentNotFirst", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeModule.withUnlabelledArgumentNotFirst", - "additionalTextEdits": [{ - "range": {"start": {"line": 15, "character": 4}, "end": {"line": 15, "character": 5}}, - "newText": "" - }] - }, { - "label": "->SomeModule.getName", "kind": 12, - "tags": [], + "label": "->SomeModule.withUnlabelledArgumentNotFirst", + "sortText": "withUnlabelledArgumentNotFirst", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 15 }, + "start": { "character": 4, "line": 15 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t => string", - "documentation": null, - "sortText": "getName", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeModule.getName", - "additionalTextEdits": [{ - "range": {"start": {"line": 15, "character": 4}, "end": {"line": 15, "character": 5}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->SomeModule.getName", + "sortText": "getName", + "tags": [] + } +] Complete src/DotPipeCompletionSpec.res 44:6 posCursor:[44:6] posNoWhite:[44:5] Found expr:[44:3->44:6] @@ -62,85 +86,140 @@ Path SomeOtherModule. Path DotPipeCompletionSpec.CompleteFromThisToo. Path DotPipeCompletionSpec.SomeOtherModule. Path -[{ - "label": "nname", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nnname: string\n```\n\n```rescript\ntype typeOutsideModule = {nname: string}\n```"} - }, { - "label": "->SomeOtherModule.getNName", - "kind": 12, - "tags": [], + "documentation": { + "kind": "markdown", + "value": "```rescript\nnname: string\n```\n\n```rescript\ntype typeOutsideModule = {nname: string}\n```" + }, + "kind": 5, + "label": "nname", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 6, "line": 44 }, + "start": { "character": 5, "line": 44 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t => string", - "documentation": null, - "sortText": "getNName", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeOtherModule.getNName", - "additionalTextEdits": [{ - "range": {"start": {"line": 44, "character": 5}, "end": {"line": 44, "character": 6}}, - "newText": "" - }] - }, { - "label": "->SomeOtherModule.getNName2", "kind": 12, - "tags": [], + "label": "->SomeOtherModule.getNName", + "sortText": "getNName", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 6, "line": 44 }, + "start": { "character": 5, "line": 44 } + } + } + ], + "data": null, + "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": null, - "sortText": "getNName2", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeOtherModule.getNName2", - "additionalTextEdits": [{ - "range": {"start": {"line": 44, "character": 5}, "end": {"line": 44, "character": 6}}, - "newText": "" - }] - }, { - "label": "->CompleteFromThisToo.a", "kind": 12, - "tags": [], + "label": "->SomeOtherModule.getNName2", + "sortText": "getNName2", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 6, "line": 44 }, + "start": { "character": 5, "line": 44 } + } + } + ], + "data": null, + "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": null, - "sortText": "a", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->CompleteFromThisToo.a", - "additionalTextEdits": [{ - "range": {"start": {"line": 44, "character": 5}, "end": {"line": 44, "character": 6}}, - "newText": "" - }] - }, { - "label": "->SomeOtherModule.getNName", "kind": 12, - "tags": [], + "label": "->CompleteFromThisToo.a", + "sortText": "a", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 6, "line": 44 }, + "start": { "character": 5, "line": 44 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t => string", - "documentation": null, - "sortText": "getNName", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeOtherModule.getNName", - "additionalTextEdits": [{ - "range": {"start": {"line": 44, "character": 5}, "end": {"line": 44, "character": 6}}, - "newText": "" - }] - }, { - "label": "->SomeOtherModule.getNName2", "kind": 12, - "tags": [], + "label": "->SomeOtherModule.getNName", + "sortText": "getNName", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 6, "line": 44 }, + "start": { "character": 5, "line": 44 } + } + } + ], + "data": null, + "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": null, - "sortText": "getNName2", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeOtherModule.getNName2", - "additionalTextEdits": [{ - "range": {"start": {"line": 44, "character": 5}, "end": {"line": 44, "character": 6}}, - "newText": "" - }] - }, { - "label": "->doWithTypeOutsideModule", "kind": 12, - "tags": [], + "label": "->SomeOtherModule.getNName2", + "sortText": "getNName2", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 6, "line": 44 }, + "start": { "character": 5, "line": 44 } + } + } + ], + "data": null, + "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": null, - "sortText": "doWithTypeOutsideModule", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->doWithTypeOutsideModule", - "additionalTextEdits": [{ - "range": {"start": {"line": 44, "character": 5}, "end": {"line": 44, "character": 6}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->doWithTypeOutsideModule", + "sortText": "doWithTypeOutsideModule", + "tags": [] + } +] Complete src/DotPipeCompletionSpec.res 62:5 posCursor:[62:5] posNoWhite:[62:4] Found expr:[62:3->62:5] @@ -158,31 +237,48 @@ CPPipe pathFromEnv:A found:true Path A. Path B. Path -[{ - "label": "->A.withA", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 62 }, + "start": { "character": 4, "line": 62 } + } + } + ], + "data": null, + "deprecated": false, "detail": "a => unit", - "documentation": null, - "sortText": "withA", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->A.withA", - "additionalTextEdits": [{ - "range": {"start": {"line": 62, "character": 4}, "end": {"line": 62, "character": 5}}, - "newText": "" - }] - }, { - "label": "->B.b", "kind": 12, - "tags": [], + "label": "->A.withA", + "sortText": "withA", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 5, "line": 62 }, + "start": { "character": 4, "line": 62 } + } + } + ], + "data": null, + "deprecated": false, "detail": "A.a => int", - "documentation": null, - "sortText": "b", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->B.b", - "additionalTextEdits": [{ - "range": {"start": {"line": 62, "character": 4}, "end": {"line": 62, "character": 5}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->B.b", + "sortText": "b", + "tags": [] + } +] Complete src/DotPipeCompletionSpec.res 67:6 posCursor:[67:6] posNoWhite:[67:5] Found expr:[67:3->67:6] @@ -199,25 +295,40 @@ Path xx CPPipe pathFromEnv:CompletionFromModule.SomeModule found:false Path CompletionFromModule.SomeModule. Path -[{ - "label": "name", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nname: string\n```\n\n```rescript\ntype t = {name: string}\n```"} - }, { - "label": "->CompletionFromModule.SomeModule.getName", - "kind": 12, - "tags": [], + "documentation": { + "kind": "markdown", + "value": "```rescript\nname: string\n```\n\n```rescript\ntype t = {name: string}\n```" + }, + "kind": 5, + "label": "name", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 6, "line": 67 }, + "start": { "character": 5, "line": 67 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t => string", - "documentation": null, - "sortText": "getName", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->CompletionFromModule.SomeModule.getName", - "additionalTextEdits": [{ - "range": {"start": {"line": 67, "character": 5}, "end": {"line": 67, "character": 6}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->CompletionFromModule.SomeModule.getName", + "sortText": "getName", + "tags": [] + } +] Complete src/DotPipeCompletionSpec.res 75:9 posCursor:[75:9] posNoWhite:[75:8] Found expr:[75:3->75:9] @@ -234,55 +345,100 @@ Path ffff Path Stdlib.Array.u Path ArrayUtils.u Path u -[{ - "label": "->Array.unshiftMany", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 8, "line": 75 }, + "start": { "character": 7, "line": 75 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(array<'a>, array<'a>) => unit", - "documentation": {"kind": "markdown", "value": "\n`unshiftMany(array, itemsArray)` inserts many new items to the start of the array.\n\nBeware this will *mutate* the array.\n\nSee [`Array.push`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/unshift) on MDN.\n\n## Examples\n\n```rescript\nlet someArray = [\"hi\", \"hello\"]\nsomeArray->Array.unshiftMany([\"yay\", \"wehoo\"])\nsomeArray == [\"yay\", \"wehoo\", \"hi\", \"hello\"]\n```\n"}, - "sortText": "unshiftMany", + "documentation": { + "kind": "markdown", + "value": "\n`unshiftMany(array, itemsArray)` inserts many new items to the start of the array.\n\nBeware this will *mutate* the array.\n\nSee [`Array.push`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/unshift) on MDN.\n\n## Examples\n\n```rescript\nlet someArray = [\"hi\", \"hello\"]\nsomeArray->Array.unshiftMany([\"yay\", \"wehoo\"])\nsomeArray == [\"yay\", \"wehoo\", \"hi\", \"hello\"]\n```\n" + }, "insertText": "->Array.unshiftMany", - "additionalTextEdits": [{ - "range": {"start": {"line": 75, "character": 7}, "end": {"line": 75, "character": 8}}, - "newText": "" - }] - }, { - "label": "->Array.unshift", "kind": 12, - "tags": [], + "label": "->Array.unshiftMany", + "sortText": "unshiftMany", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 8, "line": 75 }, + "start": { "character": 7, "line": 75 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a) => unit", - "documentation": {"kind": "markdown", "value": "\n`unshift(array, item)` inserts a new item at the start of the array.\n\nBeware this will *mutate* the array.\n\nSee [`Array.unshift`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/unshift) on MDN.\n\n## Examples\n\n```rescript\nlet someArray = [\"hi\", \"hello\"]\nsomeArray->Array.unshift(\"yay\")\nsomeArray == [\"yay\", \"hi\", \"hello\"]\n```\n"}, - "sortText": "unshift", + "documentation": { + "kind": "markdown", + "value": "\n`unshift(array, item)` inserts a new item at the start of the array.\n\nBeware this will *mutate* the array.\n\nSee [`Array.unshift`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/unshift) on MDN.\n\n## Examples\n\n```rescript\nlet someArray = [\"hi\", \"hello\"]\nsomeArray->Array.unshift(\"yay\")\nsomeArray == [\"yay\", \"hi\", \"hello\"]\n```\n" + }, "insertText": "->Array.unshift", - "additionalTextEdits": [{ - "range": {"start": {"line": 75, "character": 7}, "end": {"line": 75, "character": 8}}, - "newText": "" - }] - }, { - "label": "->Array.unsafe_get", "kind": 12, - "tags": [1], + "label": "->Array.unshift", + "sortText": "unshift", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 8, "line": 75 }, + "start": { "character": 7, "line": 75 } + } + } + ], + "data": null, + "deprecated": true, "detail": "(array<'a>, int) => 'a", - "documentation": {"kind": "markdown", "value": "Deprecated: Use getUnsafe instead. This will be removed in v13\n\n\n`unsafe_get(array, index)` returns the element at `index` of `array`.\n\nThis is _unsafe_, meaning it will return `undefined` value if `index` does not exist in `array`.\n\nUse `Array.unsafe_get` only when you are sure the `index` exists (i.e. when using for-loop).\n\n## Examples\n\n```rescript\nlet array = [1, 2, 3]\nfor index in 0 to array->Array.length - 1 {\n let value = array->Array.unsafe_get(index)\n Console.log(value)\n}\n```\n"}, - "sortText": "unsafe_get", + "documentation": { + "kind": "markdown", + "value": "Deprecated: Use getUnsafe instead. This will be removed in v13\n\n\n`unsafe_get(array, index)` returns the element at `index` of `array`.\n\nThis is _unsafe_, meaning it will return `undefined` value if `index` does not exist in `array`.\n\nUse `Array.unsafe_get` only when you are sure the `index` exists (i.e. when using for-loop).\n\n## Examples\n\n```rescript\nlet array = [1, 2, 3]\nfor index in 0 to array->Array.length - 1 {\n let value = array->Array.unsafe_get(index)\n Console.log(value)\n}\n```\n" + }, "insertText": "->Array.unsafe_get", - "additionalTextEdits": [{ - "range": {"start": {"line": 75, "character": 7}, "end": {"line": 75, "character": 8}}, - "newText": "" - }] - }, { - "label": "->Array.unzip", "kind": 12, - "tags": [], + "label": "->Array.unsafe_get", + "sortText": "unsafe_get", + "tags": [ 1 ] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 8, "line": 75 }, + "start": { "character": 7, "line": 75 } + } + } + ], + "data": null, + "deprecated": false, "detail": "array<('a, 'b)> => (t<'a>, array<'b>)", - "documentation": {"kind": "markdown", "value": "\n`unzip(a)` takes an array of pairs and creates a pair of arrays. The first array\ncontains all the first items of the pairs; the second array contains all the\nsecond items.\n\n## Examples\n\n```rescript\nArray.unzip([(1, 2), (3, 4)]) == ([1, 3], [2, 4])\n\nArray.unzip([(1, 2), (3, 4), (5, 6), (7, 8)]) == ([1, 3, 5, 7], [2, 4, 6, 8])\n```\n"}, - "sortText": "unzip", + "documentation": { + "kind": "markdown", + "value": "\n`unzip(a)` takes an array of pairs and creates a pair of arrays. The first array\ncontains all the first items of the pairs; the second array contains all the\nsecond items.\n\n## Examples\n\n```rescript\nArray.unzip([(1, 2), (3, 4)]) == ([1, 3], [2, 4])\n\nArray.unzip([(1, 2), (3, 4), (5, 6), (7, 8)]) == ([1, 3, 5, 7], [2, 4, 6, 8])\n```\n" + }, "insertText": "->Array.unzip", - "additionalTextEdits": [{ - "range": {"start": {"line": 75, "character": 7}, "end": {"line": 75, "character": 8}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->Array.unzip", + "sortText": "unzip", + "tags": [] + } +] Complete src/DotPipeCompletionSpec.res 80:7 posCursor:[80:7] posNoWhite:[80:6] Found expr:[80:3->80:7] @@ -300,61 +456,100 @@ CPPipe pathFromEnv: found:true Path DotPipeCompletionSpec. Path DotPipeCompletionSpec.SomeOtherModule. Path -[{ - "label": "nname", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nnname: string\n```\n\n```rescript\ntype typeOutsideModule = {nname: string}\n```"} - }, { - "label": "->doWithTypeOutsideModule", - "kind": 12, - "tags": [], + "documentation": { + "kind": "markdown", + "value": "```rescript\nnname: string\n```\n\n```rescript\ntype typeOutsideModule = {nname: string}\n```" + }, + "kind": 5, + "label": "nname", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 7, "line": 80 }, + "start": { "character": 6, "line": 80 } + } + } + ], + "data": null, + "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": null, - "sortText": "doWithTypeOutsideModule", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->doWithTypeOutsideModule", - "additionalTextEdits": [{ - "range": {"start": {"line": 80, "character": 6}, "end": {"line": 80, "character": 7}}, - "newText": "" - }] - }, { - "label": "->SomeOtherModule.getNName", "kind": 12, - "tags": [], + "label": "->doWithTypeOutsideModule", + "sortText": "doWithTypeOutsideModule", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 7, "line": 80 }, + "start": { "character": 6, "line": 80 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t => string", - "documentation": null, - "sortText": "getNName", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeOtherModule.getNName", - "additionalTextEdits": [{ - "range": {"start": {"line": 80, "character": 6}, "end": {"line": 80, "character": 7}}, - "newText": "" - }] - }, { - "label": "->SomeOtherModule.getNName2", "kind": 12, - "tags": [], + "label": "->SomeOtherModule.getNName", + "sortText": "getNName", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 7, "line": 80 }, + "start": { "character": 6, "line": 80 } + } + } + ], + "data": null, + "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": null, - "sortText": "getNName2", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeOtherModule.getNName2", - "additionalTextEdits": [{ - "range": {"start": {"line": 80, "character": 6}, "end": {"line": 80, "character": 7}}, - "newText": "" - }] - }, { - "label": "->doWithTypeOutsideModule", "kind": 12, - "tags": [], + "label": "->SomeOtherModule.getNName2", + "sortText": "getNName2", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 7, "line": 80 }, + "start": { "character": 6, "line": 80 } + } + } + ], + "data": null, + "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": null, - "sortText": "doWithTypeOutsideModule", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->doWithTypeOutsideModule", - "additionalTextEdits": [{ - "range": {"start": {"line": 80, "character": 6}, "end": {"line": 80, "character": 7}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->doWithTypeOutsideModule", + "sortText": "doWithTypeOutsideModule", + "tags": [] + } +] Complete src/DotPipeCompletionSpec.res 86:39 posCursor:[86:39] posNoWhite:[86:38] Found expr:[86:3->86:39] @@ -374,55 +569,100 @@ Path Array.filter Path Stdlib.Array.filt Path ArrayUtils.filt Path filt -[{ - "label": "->Array.filterMap", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 35, "line": 86 }, + "start": { "character": 34, "line": 86 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a => option<'b>) => array<'b>", - "documentation": {"kind": "markdown", "value": "\n`filterMap(array, fn)`\n\nCalls `fn` for each element and returns a new array containing results of the `fn` calls which are not `None`.\n\n## Examples\n\n```rescript\n[\"Hello\", \"Hi\", \"Good bye\"]->Array.filterMap(item =>\n switch item {\n | \"Hello\" => Some(item->String.length)\n | _ => None\n }\n) == [5]\n\n[1, 2, 3, 4, 5, 6]->Array.filterMap(n => mod(n, 2) == 0 ? Some(n * n) : None) == [4, 16, 36]\n\nArray.filterMap([1, 2, 3, 4, 5, 6], _ => None) == []\n\nArray.filterMap([], n => mod(n, 2) == 0 ? Some(n * n) : None) == []\n```\n"}, - "sortText": "filterMap", + "documentation": { + "kind": "markdown", + "value": "\n`filterMap(array, fn)`\n\nCalls `fn` for each element and returns a new array containing results of the `fn` calls which are not `None`.\n\n## Examples\n\n```rescript\n[\"Hello\", \"Hi\", \"Good bye\"]->Array.filterMap(item =>\n switch item {\n | \"Hello\" => Some(item->String.length)\n | _ => None\n }\n) == [5]\n\n[1, 2, 3, 4, 5, 6]->Array.filterMap(n => mod(n, 2) == 0 ? Some(n * n) : None) == [4, 16, 36]\n\nArray.filterMap([1, 2, 3, 4, 5, 6], _ => None) == []\n\nArray.filterMap([], n => mod(n, 2) == 0 ? Some(n * n) : None) == []\n```\n" + }, "insertText": "->Array.filterMap", - "additionalTextEdits": [{ - "range": {"start": {"line": 86, "character": 34}, "end": {"line": 86, "character": 35}}, - "newText": "" - }] - }, { - "label": "->Array.filterMapWithIndex", "kind": 12, - "tags": [], + "label": "->Array.filterMap", + "sortText": "filterMap", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 35, "line": 86 }, + "start": { "character": 34, "line": 86 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(array<'a>, ('a, int) => option<'b>) => array<'b>", - "documentation": {"kind": "markdown", "value": "\n`filterMapWithIndex(array, fn)`\n\nCalls `fn` for each element and returns a new array containing results of the `fn` calls which are not `None`.\n\n## Examples\n\n```rescript\n[\"Hello\", \"Hi\", \"Good bye\"]->Array.filterMapWithIndex((item, index) =>\n switch item {\n | \"Hello\" => Some(index)\n | _ => None\n }\n) == [0]\n```\n"}, - "sortText": "filterMapWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`filterMapWithIndex(array, fn)`\n\nCalls `fn` for each element and returns a new array containing results of the `fn` calls which are not `None`.\n\n## Examples\n\n```rescript\n[\"Hello\", \"Hi\", \"Good bye\"]->Array.filterMapWithIndex((item, index) =>\n switch item {\n | \"Hello\" => Some(index)\n | _ => None\n }\n) == [0]\n```\n" + }, "insertText": "->Array.filterMapWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 86, "character": 34}, "end": {"line": 86, "character": 35}}, - "newText": "" - }] - }, { - "label": "->Array.filter", "kind": 12, - "tags": [], + "label": "->Array.filterMapWithIndex", + "sortText": "filterMapWithIndex", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 35, "line": 86 }, + "start": { "character": 34, "line": 86 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a => bool) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`filter(array, checker)` returns a new array containing all elements from `array` for which the provided `checker` function returns true.\n\nSee [`Array.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) on MDN.\n\n## Examples\n\n```rescript\n[1, 2, 3, 4]->Array.filter(num => num > 2) == [3, 4]\n```\n"}, - "sortText": "filter", + "documentation": { + "kind": "markdown", + "value": "\n`filter(array, checker)` returns a new array containing all elements from `array` for which the provided `checker` function returns true.\n\nSee [`Array.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) on MDN.\n\n## Examples\n\n```rescript\n[1, 2, 3, 4]->Array.filter(num => num > 2) == [3, 4]\n```\n" + }, "insertText": "->Array.filter", - "additionalTextEdits": [{ - "range": {"start": {"line": 86, "character": 34}, "end": {"line": 86, "character": 35}}, - "newText": "" - }] - }, { - "label": "->Array.filterWithIndex", "kind": 12, - "tags": [], + "label": "->Array.filter", + "sortText": "filter", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 35, "line": 86 }, + "start": { "character": 34, "line": 86 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(array<'a>, ('a, int) => bool) => array<'a>", - "documentation": {"kind": "markdown", "value": "\n`filterWithIndex(array, checker)` returns a new array containing all elements from `array` for which the provided `checker` function returns true.\n\nSee [`Array.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) on MDN.\n\n## Examples\n\n```rescript\n[1, 2, 3, 4]->Array.filterWithIndex((num, index) => index === 0 || num === 2) == [1, 2]\n```\n"}, - "sortText": "filterWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`filterWithIndex(array, checker)` returns a new array containing all elements from `array` for which the provided `checker` function returns true.\n\nSee [`Array.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) on MDN.\n\n## Examples\n\n```rescript\n[1, 2, 3, 4]->Array.filterWithIndex((num, index) => index === 0 || num === 2) == [1, 2]\n```\n" + }, "insertText": "->Array.filterWithIndex", - "additionalTextEdits": [{ - "range": {"start": {"line": 86, "character": 34}, "end": {"line": 86, "character": 35}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->Array.filterWithIndex", + "sortText": "filterWithIndex", + "tags": [] + } +] Complete src/DotPipeCompletionSpec.res 89:62 posCursor:[89:62] posNoWhite:[89:61] Found expr:[89:3->89:62] @@ -441,31 +681,54 @@ ContextPath Value[Array, joinWith] Path Array.joinWith Path Stdlib.String.includ Path includ -[{ - "label": "->String.includes", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 56, "line": 89 }, + "start": { "character": 55, "line": 89 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(string, string) => bool", - "documentation": {"kind": "markdown", "value": "\n`includes(str, searchValue)` returns `true` if `searchValue` is found anywhere\nwithin `str`, `false` otherwise.\nSee [`String.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes) on MDN.\n\n## Examples\n\n```rescript\nString.includes(\"programmer\", \"gram\") == true\nString.includes(\"programmer\", \"er\") == true\nString.includes(\"programmer\", \"pro\") == true\nString.includes(\"programmer.dat\", \"xyz\") == false\n```\n"}, - "sortText": "includes", + "documentation": { + "kind": "markdown", + "value": "\n`includes(str, searchValue)` returns `true` if `searchValue` is found anywhere\nwithin `str`, `false` otherwise.\nSee [`String.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes) on MDN.\n\n## Examples\n\n```rescript\nString.includes(\"programmer\", \"gram\") == true\nString.includes(\"programmer\", \"er\") == true\nString.includes(\"programmer\", \"pro\") == true\nString.includes(\"programmer.dat\", \"xyz\") == false\n```\n" + }, "insertText": "->String.includes", - "additionalTextEdits": [{ - "range": {"start": {"line": 89, "character": 55}, "end": {"line": 89, "character": 56}}, - "newText": "" - }] - }, { - "label": "->String.includesFrom", "kind": 12, - "tags": [], + "label": "->String.includes", + "sortText": "includes", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 56, "line": 89 }, + "start": { "character": 55, "line": 89 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(string, string, int) => bool", - "documentation": {"kind": "markdown", "value": "\n`includesFrom(str, searchValue, start)` returns `true` if `searchValue` is found\nanywhere within `str` starting at character number `start` (where 0 is the\nfirst character), `false` otherwise.\nSee [`String.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes) on MDN.\n\n## Examples\n\n```rescript\nString.includesFrom(\"programmer\", \"gram\", 1) == true\nString.includesFrom(\"programmer\", \"gram\", 4) == false\nString.includesFrom(`대한민국`, `한`, 1) == true\n```\n"}, - "sortText": "includesFrom", + "documentation": { + "kind": "markdown", + "value": "\n`includesFrom(str, searchValue, start)` returns `true` if `searchValue` is found\nanywhere within `str` starting at character number `start` (where 0 is the\nfirst character), `false` otherwise.\nSee [`String.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes) on MDN.\n\n## Examples\n\n```rescript\nString.includesFrom(\"programmer\", \"gram\", 1) == true\nString.includesFrom(\"programmer\", \"gram\", 4) == false\nString.includesFrom(`대한민국`, `한`, 1) == true\n```\n" + }, "insertText": "->String.includesFrom", - "additionalTextEdits": [{ - "range": {"start": {"line": 89, "character": 55}, "end": {"line": 89, "character": 56}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->String.includesFrom", + "sortText": "includesFrom", + "tags": [] + } +] Complete src/DotPipeCompletionSpec.res 94:36 posCursor:[94:36] posNoWhite:[94:35] Found expr:[94:3->94:36] @@ -483,19 +746,31 @@ ContextPath Value[String, toLowerCase] Path String.toLowerCase Path Stdlib.String.toUpperCa Path toUpperCa -[{ - "label": "->String.toUpperCase", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 27, "line": 94 }, + "start": { "character": 26, "line": 94 } + } + } + ], + "data": null, + "deprecated": false, "detail": "string => string", - "documentation": {"kind": "markdown", "value": "\n`toUpperCase(str)` converts `str` to upper case using the locale-insensitive\ncase mappings in the Unicode Character Database. Notice that the conversion can\nexpand the number of letters in the result, for example the German ß\ncapitalizes to two Ses in a row.\nSee [`String.toUpperCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase) on MDN.\n\n## Examples\n\n```rescript\nString.toUpperCase(\"abc\") == \"ABC\"\nString.toUpperCase(`Straße`) == `STRASSE`\nString.toUpperCase(`πς`) == `ΠΣ`\n```\n"}, - "sortText": "toUpperCase", + "documentation": { + "kind": "markdown", + "value": "\n`toUpperCase(str)` converts `str` to upper case using the locale-insensitive\ncase mappings in the Unicode Character Database. Notice that the conversion can\nexpand the number of letters in the result, for example the German ß\ncapitalizes to two Ses in a row.\nSee [`String.toUpperCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase) on MDN.\n\n## Examples\n\n```rescript\nString.toUpperCase(\"abc\") == \"ABC\"\nString.toUpperCase(`Straße`) == `STRASSE`\nString.toUpperCase(`πς`) == `ΠΣ`\n```\n" + }, "insertText": "->String.toUpperCase", - "additionalTextEdits": [{ - "range": {"start": {"line": 94, "character": 26}, "end": {"line": 94, "character": 27}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->String.toUpperCase", + "sortText": "toUpperCase", + "tags": [] + } +] Complete src/DotPipeCompletionSpec.res 97:55 posCursor:[97:55] posNoWhite:[97:54] Found expr:[97:3->97:55] @@ -513,19 +788,31 @@ ContextPath Value[String, toUpperCase] Path String.toUpperCase Path Stdlib.String.toLowerC Path toLowerC -[{ - "label": "->String.toLowerCase", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 47, "line": 97 }, + "start": { "character": 46, "line": 97 } + } + } + ], + "data": null, + "deprecated": false, "detail": "string => string", - "documentation": {"kind": "markdown", "value": "\n`toLowerCase(str)` converts `str` to lower case using the locale-insensitive\ncase mappings in the Unicode Character Database. Notice that the conversion can\ngive different results depending upon context, for example with the Greek\nletter sigma, which has two different lower case forms, one when it is the last\ncharacter in a string and another when it is not.\nSee [`String.toLowerCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase) on MDN.\n\n## Examples\n\n```rescript\nString.toLowerCase(\"ABC\") == \"abc\"\nString.toLowerCase(`ΣΠ`) == `σπ`\nString.toLowerCase(`ΠΣ`) == `πς`\n```\n"}, - "sortText": "toLowerCase", + "documentation": { + "kind": "markdown", + "value": "\n`toLowerCase(str)` converts `str` to lower case using the locale-insensitive\ncase mappings in the Unicode Character Database. Notice that the conversion can\ngive different results depending upon context, for example with the Greek\nletter sigma, which has two different lower case forms, one when it is the last\ncharacter in a string and another when it is not.\nSee [`String.toLowerCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase) on MDN.\n\n## Examples\n\n```rescript\nString.toLowerCase(\"ABC\") == \"abc\"\nString.toLowerCase(`ΣΠ`) == `σπ`\nString.toLowerCase(`ΠΣ`) == `πς`\n```\n" + }, "insertText": "->String.toLowerCase", - "additionalTextEdits": [{ - "range": {"start": {"line": 97, "character": 46}, "end": {"line": 97, "character": 47}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->String.toLowerCase", + "sortText": "toLowerCase", + "tags": [] + } +] Complete src/DotPipeCompletionSpec.res 101:7 posCursor:[101:7] posNoWhite:[101:6] Found expr:[100:9->104:1] @@ -544,61 +831,100 @@ CPPipe pathFromEnv: found:true Path DotPipeCompletionSpec. Path DotPipeCompletionSpec.SomeOtherModule. Path -[{ - "label": "nname", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nnname: string\n```\n\n```rescript\ntype typeOutsideModule = {nname: string}\n```"} - }, { - "label": "->doWithTypeOutsideModule", - "kind": 12, - "tags": [], + "documentation": { + "kind": "markdown", + "value": "```rescript\nnname: string\n```\n\n```rescript\ntype typeOutsideModule = {nname: string}\n```" + }, + "kind": 5, + "label": "nname", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 7, "line": 101 }, + "start": { "character": 6, "line": 101 } + } + } + ], + "data": null, + "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": null, - "sortText": "doWithTypeOutsideModule", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->doWithTypeOutsideModule", - "additionalTextEdits": [{ - "range": {"start": {"line": 101, "character": 6}, "end": {"line": 101, "character": 7}}, - "newText": "" - }] - }, { - "label": "->SomeOtherModule.getNName", "kind": 12, - "tags": [], + "label": "->doWithTypeOutsideModule", + "sortText": "doWithTypeOutsideModule", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 7, "line": 101 }, + "start": { "character": 6, "line": 101 } + } + } + ], + "data": null, + "deprecated": false, "detail": "t => string", - "documentation": null, - "sortText": "getNName", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeOtherModule.getNName", - "additionalTextEdits": [{ - "range": {"start": {"line": 101, "character": 6}, "end": {"line": 101, "character": 7}}, - "newText": "" - }] - }, { - "label": "->SomeOtherModule.getNName2", "kind": 12, - "tags": [], + "label": "->SomeOtherModule.getNName", + "sortText": "getNName", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 7, "line": 101 }, + "start": { "character": 6, "line": 101 } + } + } + ], + "data": null, + "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": null, - "sortText": "getNName2", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeOtherModule.getNName2", - "additionalTextEdits": [{ - "range": {"start": {"line": 101, "character": 6}, "end": {"line": 101, "character": 7}}, - "newText": "" - }] - }, { - "label": "->doWithTypeOutsideModule", "kind": 12, - "tags": [], + "label": "->SomeOtherModule.getNName2", + "sortText": "getNName2", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 7, "line": 101 }, + "start": { "character": 6, "line": 101 } + } + } + ], + "data": null, + "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": null, - "sortText": "doWithTypeOutsideModule", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->doWithTypeOutsideModule", - "additionalTextEdits": [{ - "range": {"start": {"line": 101, "character": 6}, "end": {"line": 101, "character": 7}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->doWithTypeOutsideModule", + "sortText": "doWithTypeOutsideModule", + "tags": [] + } +] Complete src/DotPipeCompletionSpec.res 108:27 XXX Not found! @@ -607,27 +933,32 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Module[Dot] Path Dot -[{ - "label": "DotPipeCompleteFromCurrentModule", - "kind": 9, - "tags": [], - "detail": "module DotPipeCompleteFromCurrentModule", - "documentation": null, +[ + { "data": { "modulePath": "DotPipeCompleteFromCurrentModule", "filePath": "src/DotPipeCompletionSpec.res" - } - }, { - "label": "DotPipeCompletionSpec", + }, + "deprecated": false, + "detail": "module DotPipeCompleteFromCurrentModule", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module DotPipeCompletionSpec", - "documentation": null, + "label": "DotPipeCompleteFromCurrentModule", + "tags": [] + }, + { "data": { "modulePath": "DotPipeCompletionSpec", "filePath": "src/DotPipeCompletionSpec.res" - } - }] + }, + "deprecated": false, + "detail": "module DotPipeCompletionSpec", + "documentation": { "kind": "markdown", "value": "" }, + "kind": 9, + "label": "DotPipeCompletionSpec", + "tags": [] + } +] Complete src/DotPipeCompletionSpec.res 111:39 posCursor:[111:39] posNoWhite:[111:38] Found expr:[111:24->111:40] @@ -638,37 +969,44 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[CompletionPipe] Path CompletionPipe -[{ - "label": "CompletionPipeChain", - "kind": 9, - "tags": [], - "detail": "module CompletionPipeChain", - "documentation": null, +[ + { "data": { "modulePath": "CompletionPipeChain", "filePath": "src/DotPipeCompletionSpec.res" - } - }, { - "label": "CompletionPipeProperty", + }, + "deprecated": false, + "detail": "module CompletionPipeChain", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module CompletionPipeProperty", - "documentation": null, + "label": "CompletionPipeChain", + "tags": [] + }, + { "data": { "modulePath": "CompletionPipeProperty", "filePath": "src/DotPipeCompletionSpec.res" - } - }, { - "label": "CompletionPipeSubmodules", + }, + "deprecated": false, + "detail": "module CompletionPipeProperty", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module CompletionPipeSubmodules", - "documentation": null, + "label": "CompletionPipeProperty", + "tags": [] + }, + { "data": { "modulePath": "CompletionPipeSubmodules", "filePath": "src/DotPipeCompletionSpec.res" - } - }] + }, + "deprecated": false, + "detail": "module CompletionPipeSubmodules", + "documentation": { "kind": "markdown", "value": "" }, + "kind": 9, + "label": "CompletionPipeSubmodules", + "tags": [] + } +] Complete src/DotPipeCompletionSpec.res 114:44 posCursor:[114:44] posNoWhite:[114:43] Found expr:[114:24->114:45] @@ -679,27 +1017,32 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[Dot] Path Dot -[{ - "label": "DotPipeCompleteFromCurrentModule", - "kind": 9, - "tags": [], - "detail": "module DotPipeCompleteFromCurrentModule", - "documentation": null, +[ + { "data": { "modulePath": "DotPipeCompleteFromCurrentModule", "filePath": "src/DotPipeCompletionSpec.res" - } - }, { - "label": "DotPipeCompletionSpec", + }, + "deprecated": false, + "detail": "module DotPipeCompleteFromCurrentModule", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module DotPipeCompletionSpec", - "documentation": null, + "label": "DotPipeCompleteFromCurrentModule", + "tags": [] + }, + { "data": { "modulePath": "DotPipeCompletionSpec", "filePath": "src/DotPipeCompletionSpec.res" - } - }] + }, + "deprecated": false, + "detail": "module DotPipeCompletionSpec", + "documentation": { "kind": "markdown", "value": "" }, + "kind": 9, + "label": "DotPipeCompletionSpec", + "tags": [] + } +] Complete src/DotPipeCompletionSpec.res 122:11 posCursor:[122:11] posNoWhite:[122:10] Found expr:[122:3->122:11] @@ -713,29 +1056,46 @@ Path someObj ContextPath Value[someObj]-> ContextPath Value[someObj] Path someObj -[{ - "label": "[\"age\"]", - "kind": 4, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 11, "line": 122 }, + "start": { "character": 10, "line": 122 } + } + } + ], + "data": null, + "deprecated": false, "detail": "{\"age\": int, \"name\": string}", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "[\"age\"]", - "additionalTextEdits": [{ - "range": {"start": {"line": 122, "character": 10}, "end": {"line": 122, "character": 11}}, - "newText": "" - }] - }, { - "label": "[\"name\"]", "kind": 4, - "tags": [], + "label": "[\"age\"]", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 11, "line": 122 }, + "start": { "character": 10, "line": 122 } + } + } + ], + "data": null, + "deprecated": false, "detail": "{\"age\": int, \"name\": string}", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "[\"name\"]", - "additionalTextEdits": [{ - "range": {"start": {"line": 122, "character": 10}, "end": {"line": 122, "character": 11}}, - "newText": "" - }] - }] + "kind": 4, + "label": "[\"name\"]", + "tags": [] + } +] Complete src/DotPipeCompletionSpec.res 125:13 posCursor:[125:13] posNoWhite:[125:12] Found expr:[125:3->125:13] @@ -749,18 +1109,27 @@ Path someObj ContextPath Value[someObj]->na ContextPath Value[someObj] Path someObj -[{ - "label": "[\"name\"]", - "kind": 4, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 11, "line": 125 }, + "start": { "character": 10, "line": 125 } + } + } + ], + "data": null, + "deprecated": false, "detail": "{\"age\": int, \"name\": string}", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "insertText": "[\"name\"]", - "additionalTextEdits": [{ - "range": {"start": {"line": 125, "character": 10}, "end": {"line": 125, "character": 11}}, - "newText": "" - }] - }] + "kind": 4, + "label": "[\"name\"]", + "tags": [] + } +] Complete src/DotPipeCompletionSpec.res 144:10 posCursor:[144:10] posNoWhite:[144:9] Found expr:[144:3->144:10] @@ -778,23 +1147,38 @@ CPPipe pathFromEnv:DOMAPI found:true Path DOMAPI. Path DotPipeCompletionSpec.HTMLButtonElement. Path -[{ - "label": "disabled", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": {"kind": "markdown", "value": "```rescript\ndisabled: bool\n```\n\n```rescript\ntype htmlButtonElement = {mutable disabled: bool}\n```"} - }, { - "label": "->HTMLButtonElement.checkValidity", - "kind": 12, - "tags": [], + "documentation": { + "kind": "markdown", + "value": "```rescript\ndisabled: bool\n```\n\n```rescript\ntype htmlButtonElement = {mutable disabled: bool}\n```" + }, + "kind": 5, + "label": "disabled", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 10, "line": 144 }, + "start": { "character": 9, "line": 144 } + } + } + ], + "data": null, + "deprecated": false, "detail": "DOMAPI.htmlButtonElement => bool", - "documentation": null, - "sortText": "checkValidity", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->HTMLButtonElement.checkValidity", - "additionalTextEdits": [{ - "range": {"start": {"line": 144, "character": 9}, "end": {"line": 144, "character": 10}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->HTMLButtonElement.checkValidity", + "sortText": "checkValidity", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/EnvCompletion.res.txt b/tests/analysis_tests/tests/src/expected/EnvCompletion.res.txt index 04fcb8d2cff..1514c56c2ff 100644 --- a/tests/analysis_tests/tests/src/expected/EnvCompletion.res.txt +++ b/tests/analysis_tests/tests/src/expected/EnvCompletion.res.txt @@ -1,3 +1,4 @@ +null Complete src/EnvCompletion.res 10:17 XXX Not found! Completable: Cpattern Value[res] @@ -5,23 +6,36 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[res] Path res -[{ - "label": "Okay(_)", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "Okay('a)", - "documentation": {"kind": "markdown", "value": "```rescript\nOkay('a)\n```\n\n```rescript\ntype someResult<'a, 'b> = Okay('a) | Failure('b)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nOkay('a)\n```\n\n```rescript\ntype someResult<'a, 'b> = Okay('a) | Failure('b)\n```" + }, "insertText": "Okay(${1:_})", - "insertTextFormat": 2 - }, { - "label": "Failure(_)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "Okay(_)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Failure('b)", - "documentation": {"kind": "markdown", "value": "```rescript\nFailure('b)\n```\n\n```rescript\ntype someResult<'a, 'b> = Okay('a) | Failure('b)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nFailure('b)\n```\n\n```rescript\ntype someResult<'a, 'b> = Okay('a) | Failure('b)\n```" + }, "insertText": "Failure(${1:_})", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "Failure(_)", + "tags": [] + } +] Complete src/EnvCompletion.res 13:23 posCursor:[13:23] posNoWhite:[13:22] Found pattern:[13:18->13:24] @@ -33,23 +47,36 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[res] Path res -[{ - "label": "One", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "One", - "documentation": {"kind": "markdown", "value": "```rescript\nOne\n```\n\n```rescript\ntype things = One | Two\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nOne\n```\n\n```rescript\ntype things = One | Two\n```" + }, "insertText": "One", - "insertTextFormat": 2 - }, { - "label": "Two", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "One", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Two", - "documentation": {"kind": "markdown", "value": "```rescript\nTwo\n```\n\n```rescript\ntype things = One | Two\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nTwo\n```\n\n```rescript\ntype things = One | Two\n```" + }, "insertText": "Two", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "Two", + "tags": [] + } +] Complete src/EnvCompletion.res 16:26 posCursor:[16:26] posNoWhite:[16:25] Found pattern:[16:18->16:27] @@ -61,16 +88,20 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[res] Path res -[{ - "label": "\"\"", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null, - "sortText": "A", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "\"$0\"", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "\"\"", + "sortText": "A", + "tags": [] + } +] Complete src/EnvCompletion.res 19:19 XXX Not found! @@ -80,16 +111,23 @@ Resolved opens 1 Stdlib ContextPath Value[use](Nolabel) ContextPath Value[use] Path use -[{ - "label": "{}", - "kind": 22, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "EnvCompletionOtherFile.response", - "documentation": {"kind": "markdown", "value": "```rescript\ntype EnvCompletionOtherFile.response = {stuff: theVariant, res: someResult}\n```"}, - "sortText": "A", + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype EnvCompletionOtherFile.response = {stuff: theVariant, res: someResult}\n```" + }, "insertText": "{$0}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 22, + "label": "{}", + "sortText": "A", + "tags": [] + } +] Complete src/EnvCompletion.res 22:21 posCursor:[22:21] posNoWhite:[22:20] Found pattern:[22:20->22:22] @@ -99,19 +137,32 @@ Resolved opens 1 Stdlib ContextPath Value[use](Nolabel) ContextPath Value[use] Path use -[{ - "label": "stuff", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "theVariant", - "documentation": {"kind": "markdown", "value": "```rescript\nstuff: theVariant\n```\n\n```rescript\ntype EnvCompletionOtherFile.response = {stuff: theVariant, res: someResult}\n```"} - }, { - "label": "res", + "documentation": { + "kind": "markdown", + "value": "```rescript\nstuff: theVariant\n```\n\n```rescript\ntype EnvCompletionOtherFile.response = {stuff: theVariant, res: someResult}\n```" + }, "kind": 5, - "tags": [], + "label": "stuff", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "someResult", - "documentation": {"kind": "markdown", "value": "```rescript\nres: someResult\n```\n\n```rescript\ntype EnvCompletionOtherFile.response = {stuff: theVariant, res: someResult}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nres: someResult\n```\n\n```rescript\ntype EnvCompletionOtherFile.response = {stuff: theVariant, res: someResult}\n```" + }, + "kind": 5, + "label": "res", + "tags": [] + } +] Complete src/EnvCompletion.res 25:27 posCursor:[25:27] posNoWhite:[25:26] Found pattern:[25:20->25:31] @@ -121,23 +172,36 @@ Resolved opens 1 Stdlib ContextPath Value[use](Nolabel) ContextPath Value[use] Path use -[{ - "label": "First", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "First", - "documentation": {"kind": "markdown", "value": "```rescript\nFirst\n```\n\n```rescript\ntype theVariant = First | Second(r1)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nFirst\n```\n\n```rescript\ntype theVariant = First | Second(r1)\n```" + }, "insertText": "First", - "insertTextFormat": 2 - }, { - "label": "Second(_)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "First", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Second(r1)", - "documentation": {"kind": "markdown", "value": "```rescript\nSecond(r1)\n```\n\n```rescript\ntype theVariant = First | Second(r1)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nSecond(r1)\n```\n\n```rescript\ntype theVariant = First | Second(r1)\n```" + }, "insertText": "Second(${1:_})", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "Second(_)", + "tags": [] + } +] Complete src/EnvCompletion.res 28:35 posCursor:[28:35] posNoWhite:[28:34] Found pattern:[28:20->28:38] @@ -151,16 +215,23 @@ Resolved opens 1 Stdlib ContextPath Value[use](Nolabel) ContextPath Value[use] Path use -[{ - "label": "{}", - "kind": 22, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "r1", - "documentation": {"kind": "markdown", "value": "```rescript\ntype r1 = {age: int}\n```"}, - "sortText": "A", + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype r1 = {age: int}\n```" + }, "insertText": "{$0}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 22, + "label": "{}", + "sortText": "A", + "tags": [] + } +] Complete src/EnvCompletion.res 31:36 posCursor:[31:36] posNoWhite:[31:35] Found pattern:[31:20->31:40] @@ -173,13 +244,20 @@ Resolved opens 1 Stdlib ContextPath Value[use](Nolabel) ContextPath Value[use] Path use -[{ - "label": "age", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nage: int\n```\n\n```rescript\ntype r1 = {age: int}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nage: int\n```\n\n```rescript\ntype r1 = {age: int}\n```" + }, + "kind": 5, + "label": "age", + "tags": [] + } +] Complete src/EnvCompletion.res 34:25 posCursor:[34:25] posNoWhite:[34:24] Found pattern:[34:20->34:29] @@ -189,23 +267,36 @@ Resolved opens 1 Stdlib ContextPath Value[use](Nolabel) ContextPath Value[use] Path use -[{ - "label": "Okay(_)", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "Okay('a)", - "documentation": {"kind": "markdown", "value": "```rescript\nOkay('a)\n```\n\n```rescript\ntype someResult<'a, 'b> = Okay('a) | Failure('b)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nOkay('a)\n```\n\n```rescript\ntype someResult<'a, 'b> = Okay('a) | Failure('b)\n```" + }, "insertText": "Okay(${1:_})", - "insertTextFormat": 2 - }, { - "label": "Failure(_)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "Okay(_)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Failure('b)", - "documentation": {"kind": "markdown", "value": "```rescript\nFailure('b)\n```\n\n```rescript\ntype someResult<'a, 'b> = Okay('a) | Failure('b)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nFailure('b)\n```\n\n```rescript\ntype someResult<'a, 'b> = Okay('a) | Failure('b)\n```" + }, "insertText": "Failure(${1:_})", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "Failure(_)", + "tags": [] + } +] Complete src/EnvCompletion.res 37:31 posCursor:[37:31] posNoWhite:[37:30] Found pattern:[37:20->37:34] @@ -219,23 +310,36 @@ Resolved opens 1 Stdlib ContextPath Value[use](Nolabel) ContextPath Value[use] Path use -[{ - "label": "First", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "First", - "documentation": {"kind": "markdown", "value": "```rescript\nFirst\n```\n\n```rescript\ntype theVariant = First | Second(r1)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nFirst\n```\n\n```rescript\ntype theVariant = First | Second(r1)\n```" + }, "insertText": "First", - "insertTextFormat": 2 - }, { - "label": "Second(_)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "First", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Second(r1)", - "documentation": {"kind": "markdown", "value": "```rescript\nSecond(r1)\n```\n\n```rescript\ntype theVariant = First | Second(r1)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nSecond(r1)\n```\n\n```rescript\ntype theVariant = First | Second(r1)\n```" + }, "insertText": "Second(${1:_})", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "Second(_)", + "tags": [] + } +] Complete src/EnvCompletion.res 40:38 posCursor:[40:38] posNoWhite:[40:37] Found pattern:[40:20->40:42] @@ -251,16 +355,23 @@ Resolved opens 1 Stdlib ContextPath Value[use](Nolabel) ContextPath Value[use] Path use -[{ - "label": "{}", - "kind": 22, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "r1", - "documentation": {"kind": "markdown", "value": "```rescript\ntype r1 = {age: int}\n```"}, - "sortText": "A", + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype r1 = {age: int}\n```" + }, "insertText": "{$0}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 22, + "label": "{}", + "sortText": "A", + "tags": [] + } +] Complete src/EnvCompletion.res 43:39 posCursor:[43:39] posNoWhite:[43:38] Found pattern:[43:20->43:44] @@ -275,13 +386,20 @@ Resolved opens 1 Stdlib ContextPath Value[use](Nolabel) ContextPath Value[use] Path use -[{ - "label": "age", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nage: int\n```\n\n```rescript\ntype r1 = {age: int}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nage: int\n```\n\n```rescript\ntype r1 = {age: int}\n```" + }, + "kind": 5, + "label": "age", + "tags": [] + } +] Complete src/EnvCompletion.res 52:18 XXX Not found! @@ -290,16 +408,23 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[res2] Path res2 -[{ - "label": "{}", - "kind": 22, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "EnvCompletionOtherFile.someRecord", - "documentation": {"kind": "markdown", "value": "```rescript\ntype EnvCompletionOtherFile.someRecord = {name: string, theThing: 'thing, theVariant: theVariant}\n```"}, - "sortText": "A", + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype EnvCompletionOtherFile.someRecord = {name: string, theThing: 'thing, theVariant: theVariant}\n```" + }, "insertText": "{$0}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 22, + "label": "{}", + "sortText": "A", + "tags": [] + } +] Complete src/EnvCompletion.res 55:20 posCursor:[55:20] posNoWhite:[55:19] Found pattern:[55:19->55:21] @@ -308,25 +433,44 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[res2] Path res2 -[{ - "label": "name", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nname: string\n```\n\n```rescript\ntype EnvCompletionOtherFile.someRecord = {name: string, theThing: 'thing, theVariant: theVariant}\n```"} - }, { - "label": "theThing", + "documentation": { + "kind": "markdown", + "value": "```rescript\nname: string\n```\n\n```rescript\ntype EnvCompletionOtherFile.someRecord = {name: string, theThing: 'thing, theVariant: theVariant}\n```" + }, "kind": 5, - "tags": [], + "label": "name", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "'thing", - "documentation": {"kind": "markdown", "value": "```rescript\ntheThing: 'thing\n```\n\n```rescript\ntype EnvCompletionOtherFile.someRecord = {name: string, theThing: 'thing, theVariant: theVariant}\n```"} - }, { - "label": "theVariant", + "documentation": { + "kind": "markdown", + "value": "```rescript\ntheThing: 'thing\n```\n\n```rescript\ntype EnvCompletionOtherFile.someRecord = {name: string, theThing: 'thing, theVariant: theVariant}\n```" + }, "kind": 5, - "tags": [], + "label": "theThing", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "theVariant", - "documentation": {"kind": "markdown", "value": "```rescript\ntheVariant: theVariant\n```\n\n```rescript\ntype EnvCompletionOtherFile.someRecord = {name: string, theThing: 'thing, theVariant: theVariant}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\ntheVariant: theVariant\n```\n\n```rescript\ntype EnvCompletionOtherFile.someRecord = {name: string, theThing: 'thing, theVariant: theVariant}\n```" + }, + "kind": 5, + "label": "theVariant", + "tags": [] + } +] Complete src/EnvCompletion.res 58:29 posCursor:[58:29] posNoWhite:[58:28] Found pattern:[58:19->58:33] @@ -335,23 +479,36 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[res2] Path res2 -[{ - "label": "Four", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "Four", - "documentation": {"kind": "markdown", "value": "```rescript\nFour\n```\n\n```rescript\ntype things2 = Four | Five\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nFour\n```\n\n```rescript\ntype things2 = Four | Five\n```" + }, "insertText": "Four", - "insertTextFormat": 2 - }, { - "label": "Five", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "Four", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Five", - "documentation": {"kind": "markdown", "value": "```rescript\nFive\n```\n\n```rescript\ntype things2 = Four | Five\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nFive\n```\n\n```rescript\ntype things2 = Four | Five\n```" + }, "insertText": "Five", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "Five", + "tags": [] + } +] Complete src/EnvCompletion.res 61:31 posCursor:[61:31] posNoWhite:[61:30] Found pattern:[61:19->61:35] @@ -360,21 +517,34 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[res2] Path res2 -[{ - "label": "First", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "First", - "documentation": {"kind": "markdown", "value": "```rescript\nFirst\n```\n\n```rescript\ntype theVariant = First | Second(r1)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nFirst\n```\n\n```rescript\ntype theVariant = First | Second(r1)\n```" + }, "insertText": "First", - "insertTextFormat": 2 - }, { - "label": "Second(_)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "First", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Second(r1)", - "documentation": {"kind": "markdown", "value": "```rescript\nSecond(r1)\n```\n\n```rescript\ntype theVariant = First | Second(r1)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nSecond(r1)\n```\n\n```rescript\ntype theVariant = First | Second(r1)\n```" + }, "insertText": "Second(${1:_})", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "Second(_)", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/EnvCompletionOtherFile.res.txt b/tests/analysis_tests/tests/src/expected/EnvCompletionOtherFile.res.txt index e69de29bb2d..19765bd501b 100644 --- a/tests/analysis_tests/tests/src/expected/EnvCompletionOtherFile.res.txt +++ b/tests/analysis_tests/tests/src/expected/EnvCompletionOtherFile.res.txt @@ -0,0 +1 @@ +null diff --git a/tests/analysis_tests/tests/src/expected/ExhaustiveSwitch.res.txt b/tests/analysis_tests/tests/src/expected/ExhaustiveSwitch.res.txt index 2d5586d1f28..7c61519afdb 100644 --- a/tests/analysis_tests/tests/src/expected/ExhaustiveSwitch.res.txt +++ b/tests/analysis_tests/tests/src/expected/ExhaustiveSwitch.res.txt @@ -1,3 +1,4 @@ +null Complete src/ExhaustiveSwitch.res 8:24 XXX Not found! Completable: CexhaustiveSwitch Value[withSomeVarian] @@ -5,22 +6,32 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[withSomeVarian] Path withSomeVarian -[{ - "label": "withSomeVariant", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "someVariant", - "documentation": {"kind": "markdown", "value": "```rescript\ntype someVariant = One | Two | Three(option)\n```"} - }, { - "label": "withSomeVariant (exhaustive switch)", - "kind": 15, - "tags": [], + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype someVariant = One | Two | Three(option)\n```" + }, + "kind": 12, + "label": "withSomeVariant", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "insert exhaustive switch for value", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "filterText": "withSomeVariant", "insertText": "withSomeVariant {\n | One => ${1:%todo}\n | Two => ${2:%todo}\n | Three(_) => ${3:%todo}\n }", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 15, + "label": "withSomeVariant (exhaustive switch)", + "tags": [] + } +] Complete src/ExhaustiveSwitch.res 11:21 XXX Not found! @@ -29,22 +40,29 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[withSomePol] Path withSomePol -[{ - "label": "withSomePoly", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "somePolyVariant", - "documentation": null - }, { - "label": "withSomePoly (exhaustive switch)", - "kind": 15, - "tags": [], + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "withSomePoly", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "insert exhaustive switch for value", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "filterText": "withSomePoly", "insertText": "withSomePoly {\n | #\"switch\" => ${1:%todo}\n | #one => ${2:%todo}\n | #three(_) => ${3:%todo}\n | #two => ${4:%todo}\n | #\"exotic ident\" => ${5:%todo}\n }", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 15, + "label": "withSomePoly (exhaustive switch)", + "tags": [] + } +] Complete src/ExhaustiveSwitch.res 14:17 XXX Not found! @@ -53,22 +71,29 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[someBoo] Path someBoo -[{ - "label": "someBool", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "someBool (exhaustive switch)", - "kind": 15, - "tags": [], + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "someBool", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "insert exhaustive switch for value", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "filterText": "someBool", "insertText": "someBool {\n | true => ${1:%todo}\n | false => ${2:%todo}\n }", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 15, + "label": "someBool (exhaustive switch)", + "tags": [] + } +] Complete src/ExhaustiveSwitch.res 17:16 XXX Not found! @@ -77,22 +102,29 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[someOp] Path someOp -[{ - "label": "someOpt", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "option", - "documentation": null - }, { - "label": "someOpt (exhaustive switch)", - "kind": 15, - "tags": [], + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "someOpt", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "insert exhaustive switch for value", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "filterText": "someOpt", "insertText": "someOpt {\n | Some($1) => ${2:%todo}\n | None => ${3:%todo}\n }", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 15, + "label": "someOpt (exhaustive switch)", + "tags": [] + } +] Xform src/ExhaustiveSwitch.res 30:13 posCursor:[30:13] posNoWhite:[30:12] Found expr:[30:3->30:17] @@ -122,8 +154,8 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Hit: Exhaustive switch -TextDocumentEdit: ExhaustiveSwitch.res -{"start": {"line": 33, "character": 3}, "end": {"line": 33, "character": 10}} +TextDocumentEdit: file:///src/ExhaustiveSwitch.res +{"end":{"character":10,"line":33},"start":{"character":3,"line":33}} newText: <--here switch x->getV { @@ -143,8 +175,8 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Hit: Exhaustive switch -TextDocumentEdit: ExhaustiveSwitch.res -{"start": {"line": 36, "character": 3}, "end": {"line": 36, "character": 6}} +TextDocumentEdit: file:///src/ExhaustiveSwitch.res +{"end":{"character":6,"line":36},"start":{"character":3,"line":36}} newText: <--here switch vvv { @@ -163,21 +195,31 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[withSomeVarian] Path withSomeVarian -[{ - "label": "withSomeVariant", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "someVariant", - "documentation": {"kind": "markdown", "value": "```rescript\ntype someVariant = One | Two | Three(option)\n```"} - }, { - "label": "withSomeVariant (exhaustive switch)", - "kind": 15, - "tags": [], + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype someVariant = One | Two | Three(option)\n```" + }, + "kind": 12, + "label": "withSomeVariant", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "insert exhaustive switch for value", - "documentation": null, + "documentation": { "kind": "markdown", "value": "" }, "filterText": "withSomeVariant", "insertText": "withSomeVariant {\n | One => ${1:%todo}\n | Two => ${2:%todo}\n | Three(_) => ${3:%todo}\n }", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 15, + "label": "withSomeVariant (exhaustive switch)", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/Fastify.res.txt b/tests/analysis_tests/tests/src/expected/Fastify.res.txt index e69de29bb2d..19765bd501b 100644 --- a/tests/analysis_tests/tests/src/expected/Fastify.res.txt +++ b/tests/analysis_tests/tests/src/expected/Fastify.res.txt @@ -0,0 +1 @@ +null diff --git a/tests/analysis_tests/tests/src/expected/FastifyExt.res.txt b/tests/analysis_tests/tests/src/expected/FastifyExt.res.txt index e69de29bb2d..19765bd501b 100644 --- a/tests/analysis_tests/tests/src/expected/FastifyExt.res.txt +++ b/tests/analysis_tests/tests/src/expected/FastifyExt.res.txt @@ -0,0 +1 @@ +null diff --git a/tests/analysis_tests/tests/src/expected/Firebase.res.txt b/tests/analysis_tests/tests/src/expected/Firebase.res.txt index 17105d12f49..13e02724061 100644 --- a/tests/analysis_tests/tests/src/expected/Firebase.res.txt +++ b/tests/analysis_tests/tests/src/expected/Firebase.res.txt @@ -1,3 +1,4 @@ +null Complete src/Firebase.res 30:9 posCursor:[30:9] posNoWhite:[30:8] Found expr:[30:5->30:9] Pexp_field [30:5->30:8] _:[32:0->30:9] @@ -14,29 +15,50 @@ Path ref CPPipe pathFromEnv:Firebase.Firestore found:true Path Firebase.Firestore. Path -[{ - "label": "id", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nid: string\n```\n\n```rescript\ntype documentReference<'documentdata> = {\n id: string,\n path: string,\n}\n```"} - }, { - "label": "path", + "documentation": { + "kind": "markdown", + "value": "```rescript\nid: string\n```\n\n```rescript\ntype documentReference<'documentdata> = {\n id: string,\n path: string,\n}\n```" + }, "kind": 5, - "tags": [], + "label": "id", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\npath: string\n```\n\n```rescript\ntype documentReference<'documentdata> = {\n id: string,\n path: string,\n}\n```"} - }, { - "label": "->Firestore.getDoc", - "kind": 12, - "tags": [], + "documentation": { + "kind": "markdown", + "value": "```rescript\npath: string\n```\n\n```rescript\ntype documentReference<'documentdata> = {\n id: string,\n path: string,\n}\n```" + }, + "kind": 5, + "label": "path", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 9, "line": 30 }, + "start": { "character": 8, "line": 30 } + } + } + ], + "data": null, + "deprecated": false, "detail": "documentReference<\n 'documentdata,\n> => Promise.t>", - "documentation": null, - "sortText": "getDoc", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->Firestore.getDoc", - "additionalTextEdits": [{ - "range": {"start": {"line": 30, "character": 8}, "end": {"line": 30, "character": 9}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->Firestore.getDoc", + "sortText": "getDoc", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/FirstClassModules.res.txt b/tests/analysis_tests/tests/src/expected/FirstClassModules.res.txt index cc0bfcaf1db..54e07b333f4 100644 --- a/tests/analysis_tests/tests/src/expected/FirstClassModules.res.txt +++ b/tests/analysis_tests/tests/src/expected/FirstClassModules.res.txt @@ -1,5 +1,11 @@ +null Hover src/FirstClassModules.res 11:16 -{"contents": {"kind": "markdown", "value": "```rescript\nmodule type SomeModule = {\n module Inner\n type t = {x: int}\n let foo: t => int\n let doStuff: string => unit\n let doOtherStuff: string => unit\n}\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nmodule type SomeModule = {\n module Inner\n type t = {x: int}\n let foo: t => int\n let doStuff: string => unit\n let doOtherStuff: string => unit\n}\n```" + } +} Complete src/FirstClassModules.res 13:15 posCursor:[13:15] posNoWhite:[13:14] Found expr:[10:13->26:1] @@ -12,40 +18,64 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[SomeModule, ""] Path SomeModule. -[{ - "label": "Inner", - "kind": 9, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "module Inner", - "documentation": null - }, { - "label": "t", - "kind": 22, - "tags": [], + "documentation": { "kind": "markdown", "value": "" }, + "kind": 9, + "label": "Inner", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "type t", - "documentation": {"kind": "markdown", "value": "```rescript\ntype t = {x: int}\n```"} - }, { - "label": "foo", - "kind": 12, - "tags": [], + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype t = {x: int}\n```" + }, + "kind": 22, + "label": "t", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "t => int", - "documentation": null - }, { - "label": "doStuff", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "foo", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string => unit", - "documentation": null - }, { - "label": "doOtherStuff", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "doStuff", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string => unit", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "doOtherStuff", + "tags": [] + } +] Hover src/FirstClassModules.res 16:8 -{"contents": {"kind": "markdown", "value": "```rescript\nstring => unit\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nstring => unit\n```" + } +} Complete src/FirstClassModules.res 20:7 posCursor:[20:7] posNoWhite:[20:6] Found expr:[10:13->26:1] @@ -60,25 +90,38 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[M, ""] Path M. -[{ - "label": "t", - "kind": 22, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "type t", - "documentation": {"kind": "markdown", "value": "```rescript\ntype t = {name: string}\n```"} - }, { - "label": "getName", - "kind": 12, - "tags": [], + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype t = {name: string}\n```" + }, + "kind": 22, + "label": "t", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "t => string", - "documentation": null - }, { - "label": "thisShouldNotBeCompletedFor", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "getName", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "unit => string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "thisShouldNotBeCompletedFor", + "tags": [] + } +] Complete src/FirstClassModules.res 23:8 posCursor:[23:8] posNoWhite:[23:7] Found expr:[10:13->26:1] @@ -93,13 +136,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[M, g] Path M.g -[{ - "label": "getName", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t => string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "getName", + "tags": [] + } +] Complete src/FirstClassModules.res 32:8 posCursor:[32:8] posNoWhite:[32:7] Found expr:[30:22->35:1] @@ -112,37 +159,56 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[S2, ""] Path S2. -[{ - "label": "Inner", - "kind": 9, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "module Inner", - "documentation": null - }, { - "label": "t", - "kind": 22, - "tags": [], + "documentation": { "kind": "markdown", "value": "" }, + "kind": 9, + "label": "Inner", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "type t", - "documentation": {"kind": "markdown", "value": "```rescript\ntype t = {x: int}\n```"} - }, { - "label": "foo", - "kind": 12, - "tags": [], + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype t = {x: int}\n```" + }, + "kind": 22, + "label": "t", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "t => int", - "documentation": null - }, { - "label": "doStuff", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "foo", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string => unit", - "documentation": null - }, { - "label": "doOtherStuff", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "doStuff", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string => unit", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "doOtherStuff", + "tags": [] + } +] Complete src/FirstClassModules.res 38:7 posCursor:[38:7] posNoWhite:[38:6] Found expr:[38:5->38:7] @@ -152,40 +218,64 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[X, ""] Path X. -[{ - "label": "Inner", - "kind": 9, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "module Inner", - "documentation": null - }, { - "label": "t", - "kind": 22, - "tags": [], + "documentation": { "kind": "markdown", "value": "" }, + "kind": 9, + "label": "Inner", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "type t", - "documentation": {"kind": "markdown", "value": "```rescript\ntype t = {x: int}\n```"} - }, { - "label": "foo", - "kind": 12, - "tags": [], + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype t = {x: int}\n```" + }, + "kind": 22, + "label": "t", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "t => int", - "documentation": null - }, { - "label": "doStuff", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "foo", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string => unit", - "documentation": null - }, { - "label": "doOtherStuff", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "doStuff", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string => unit", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "doOtherStuff", + "tags": [] + } +] Hover src/FirstClassModules.res 44:7 -{"contents": {"kind": "markdown", "value": "```rescript\nmodule type SomeModule = {\n module Inner\n type t = {x: int}\n let foo: t => int\n let doStuff: string => unit\n let doOtherStuff: string => unit\n}\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nmodule type SomeModule = {\n module Inner\n type t = {x: int}\n let foo: t => int\n let doStuff: string => unit\n let doOtherStuff: string => unit\n}\n```" + } +} Complete src/FirstClassModules.res 52:17 posCursor:[52:17] posNoWhite:[52:16] Found expr:[50:15->55:3] @@ -198,37 +288,56 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[SomeModule, ""] Path SomeModule. -[{ - "label": "Inner", - "kind": 9, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "module Inner", - "documentation": null - }, { - "label": "t", - "kind": 22, - "tags": [], + "documentation": { "kind": "markdown", "value": "" }, + "kind": 9, + "label": "Inner", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "type t", - "documentation": {"kind": "markdown", "value": "```rescript\ntype t = {x: int}\n```"} - }, { - "label": "foo", - "kind": 12, - "tags": [], + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype t = {x: int}\n```" + }, + "kind": 22, + "label": "t", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "t => int", - "documentation": null - }, { - "label": "doStuff", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "foo", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string => unit", - "documentation": null - }, { - "label": "doOtherStuff", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "doStuff", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string => unit", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "doOtherStuff", + "tags": [] + } +] Complete src/FirstClassModules.res 65:17 posCursor:[65:17] posNoWhite:[65:16] Found expr:[58:16->69:1] @@ -243,35 +352,54 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[SomeModule, ""] Path SomeModule. -[{ - "label": "Inner", - "kind": 9, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "module Inner", - "documentation": null - }, { - "label": "t", - "kind": 22, - "tags": [], + "documentation": { "kind": "markdown", "value": "" }, + "kind": 9, + "label": "Inner", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "type t", - "documentation": {"kind": "markdown", "value": "```rescript\ntype t = {x: int}\n```"} - }, { - "label": "foo", - "kind": 12, - "tags": [], + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype t = {x: int}\n```" + }, + "kind": 22, + "label": "t", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "t => int", - "documentation": null - }, { - "label": "doStuff", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "foo", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string => unit", - "documentation": null - }, { - "label": "doOtherStuff", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "doStuff", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string => unit", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "doOtherStuff", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/Fragment.res.txt b/tests/analysis_tests/tests/src/expected/Fragment.res.txt index c2601ef1216..e0448e4d923 100644 --- a/tests/analysis_tests/tests/src/expected/Fragment.res.txt +++ b/tests/analysis_tests/tests/src/expected/Fragment.res.txt @@ -1,6 +1,17 @@ +null Hover src/Fragment.res 6:19 -{"contents": {"kind": "markdown", "value": "```rescript\nReact.component>\n```\n\n---\n\n```\n \n```\n```rescript\ntype React.component<'props> = Jsx.component<'props>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C13%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype SectionHeader.props<'children> = {children: 'children}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Fragment.res%22%2C1%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype React.element = Jsx.element\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C0%2C0%5D)\n"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nReact.component>\n```\n\n---\n\n```\n \n```\n```rescript\ntype React.component<'props> = Jsx.component<'props>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C13%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype SectionHeader.props<'children> = {children: 'children}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Fragment.res%22%2C1%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype React.element = Jsx.element\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C0%2C0%5D)\n" + } +} Hover src/Fragment.res 9:56 -{"contents": {"kind": "markdown", "value": "```rescript\nReact.component\n```\n\n---\n\n```\n \n```\n```rescript\ntype React.component<'props> = Jsx.component<'props>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C13%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype React.fragmentProps = {children?: element}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C42%2C0%5D)\n"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nReact.component\n```\n\n---\n\n```\n \n```\n```rescript\ntype React.component<'props> = Jsx.component<'props>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C13%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype React.fragmentProps = {children?: element}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C42%2C0%5D)\n" + } +} diff --git a/tests/analysis_tests/tests/src/expected/Highlight.res.txt b/tests/analysis_tests/tests/src/expected/Highlight.res.txt index 6ee7e2e8005..cf43ee1754e 100644 --- a/tests/analysis_tests/tests/src/expected/Highlight.res.txt +++ b/tests/analysis_tests/tests/src/expected/Highlight.res.txt @@ -1,3 +1,4 @@ +null Highlight src/Highlight.res structure items:39 diagnostics:0 Lident: M 0:7 Namespace diff --git a/tests/analysis_tests/tests/src/expected/Hover.res.txt b/tests/analysis_tests/tests/src/expected/Hover.res.txt index f9f1746e150..dda30dee9a8 100644 --- a/tests/analysis_tests/tests/src/expected/Hover.res.txt +++ b/tests/analysis_tests/tests/src/expected/Hover.res.txt @@ -1,76 +1,141 @@ +null Hover src/Hover.res 0:4 -{"contents": {"kind": "markdown", "value": "```rescript\nint\n```"}} +{ "contents": { "kind": "markdown", "value": "```rescript\nint\n```" } } Hover src/Hover.res 3:5 -{"contents": {"kind": "markdown", "value": "```rescript\ntype t = (int, float)\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\ntype t = (int, float)\n```" + } +} Hover src/Hover.res 6:7 -{"contents": {"kind": "markdown", "value": "```rescript\nmodule Id: {\n type x = int\n}\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nmodule Id: {\n type x = int\n}\n```" + } +} Hover src/Hover.res 19:11 -{"contents": {"kind": "markdown", "value": "\nThis module is commented\n---\n\n```\n \n```\n```rescript\nmodule Dep: {\n let customDouble: int => int\n}\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "\nThis module is commented\n---\n\n```\n \n```\n```rescript\nmodule Dep: {\n let customDouble: int => int\n}\n```" + } +} Hover src/Hover.res 22:11 -{"contents": {"kind": "markdown", "value": "```rescript\nint => int\n```\n---\nSome doc comment"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nint => int\n```\n---\nSome doc comment" + } +} Hover src/Hover.res 26:6 getLocItem #8: heuristic for JSX with at most one child heuristic for: [makeProps, make, createElement], give the loc of `make` -{"contents": {"kind": "markdown", "value": "```rescript\nint\n```"}} +{ "contents": { "kind": "markdown", "value": "```rescript\nint\n```" } } Hover src/Hover.res 33:4 -{"contents": {"kind": "markdown", "value": "```rescript\nunit => int\n```\n---\nDoc comment for functionWithTypeAnnotation"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nunit => int\n```\n---\nDoc comment for functionWithTypeAnnotation" + } +} Hover src/Hover.res 37:13 -{"contents": {"kind": "markdown", "value": "```rescript\nstring\n```"}} +{ "contents": { "kind": "markdown", "value": "```rescript\nstring\n```" } } Hover src/Hover.res 42:15 -{"contents": {"kind": "markdown", "value": "```rescript\nstring\n```"}} +{ "contents": { "kind": "markdown", "value": "```rescript\nstring\n```" } } Hover src/Hover.res 46:10 -{"contents": {"kind": "markdown", "value": "```rescript\nint\n```"}} +{ "contents": { "kind": "markdown", "value": "```rescript\nint\n```" } } Hover src/Hover.res 49:13 -{"contents": {"kind": "markdown", "value": "```rescript\nmodule type Logger = {\n let log: string => unit\n}\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nmodule type Logger = {\n let log: string => unit\n}\n```" + } +} Hover src/Hover.res 54:7 -{"contents": {"kind": "markdown", "value": "```rescript\nmodule type Logger = {\n let log: string => unit\n}\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nmodule type Logger = {\n let log: string => unit\n}\n```" + } +} Definition src/Hover.res 60:14 -{"uri": "Hover.res", "range": {"start": {"line": 49, "character": 12}, "end": {"line": 49, "character": 18}}} +{ + "range": { + "end": { "character": 18, "line": 49 }, + "start": { "character": 12, "line": 49 } + }, + "uri": "file:///Hover.res" +} Hover src/Hover.res 63:9 -{"contents": {"kind": "markdown", "value": "```rescript\nmodule IdDefinedTwice: {\n let y: int\n let _x: int\n}\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nmodule IdDefinedTwice: {\n let y: int\n let _x: int\n}\n```" + } +} Hover src/Hover.res 74:7 -{"contents": {"kind": "markdown", "value": "```rescript\nmodule A: {\n let x: int\n}\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nmodule A: {\n let x: int\n}\n```" + } +} Hover src/Hover.res 77:7 -{"contents": {"kind": "markdown", "value": "```rescript\nmodule A: {\n let x: int\n}\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nmodule A: {\n let x: int\n}\n```" + } +} Hover src/Hover.res 91:10 Nothing at that position. Now trying to use completion. posCursor:[91:10] posNoWhite:[91:8] Found expr:[88:2->91:9] JSX 88:7] > _children:89:4 -null Hover src/Hover.res 98:10 Nothing at that position. Now trying to use completion. posCursor:[98:10] posNoWhite:[98:9] Found expr:[95:2->98:10] JSX 95:8] > _children:96:4 -null Hover src/Hover.res 103:25 -{"contents": {"kind": "markdown", "value": "```rescript\nfloat\n```"}} +{ "contents": { "kind": "markdown", "value": "```rescript\nfloat\n```" } } Hover src/Hover.res 106:21 -{"contents": {"kind": "markdown", "value": "```rescript\nint\n```"}} +{ "contents": { "kind": "markdown", "value": "```rescript\nint\n```" } } Hover src/Hover.res 116:16 -{"contents": {"kind": "markdown", "value": "```rescript\nAA.cond<([< #str(string)] as 'a)> => AA.cond<'a>\n```\n\n---\n\n```\n \n```\n```rescript\ntype AA.cond<'a> = 'a\n constraint 'a = [< #str(string)]\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C110%2C2%5D)\n"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nAA.cond<([< #str(string)] as 'a)> => AA.cond<'a>\n```\n\n---\n\n```\n \n```\n```rescript\ntype AA.cond<'a> = 'a\n constraint 'a = [< #str(string)]\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C110%2C2%5D)\n" + } +} Hover src/Hover.res 119:25 -{"contents": {"kind": "markdown", "value": "```rescript\nAA.cond<([< #str(string)] as 'a)> => AA.cond<'a>\n```\n\n---\n\n```\n \n```\n```rescript\ntype AA.cond<'a> = 'a\n constraint 'a = [< #str(string)]\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C110%2C2%5D)\n"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nAA.cond<([< #str(string)] as 'a)> => AA.cond<'a>\n```\n\n---\n\n```\n \n```\n```rescript\ntype AA.cond<'a> = 'a\n constraint 'a = [< #str(string)]\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C110%2C2%5D)\n" + } +} Hover src/Hover.res 122:3 Nothing at that position. Now trying to use completion. @@ -78,31 +143,76 @@ Attribute id:live:[122:0->122:5] label:live Completable: Cdecorator(live) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib -{"contents": {"kind": "markdown", "value": "The `@live` decorator is for reanalyze, a static analysis tool for ReScript that can do dead code analysis.\n\n`@live` tells the dead code analysis that the value should be considered live, even though it might appear to be dead. This is typically used in case of FFI where there are indirect ways to access values. It can be added to everything that could otherwise be considered unused by the dead code analysis - values, functions, arguments, records, individual record fields, and so on.\n\n[Read more and see examples in the documentation](https://rescript-lang.org/syntax-lookup#live-decorator).\n\nHint: Did you know you can run an interactive code analysis in your project by running the command `> ReScript: Start Code Analyzer`? Try it!"}} +{ + "contents": { + "kind": "markdown", + "value": "The `@live` decorator is for reanalyze, a static analysis tool for ReScript that can do dead code analysis.\n\n`@live` tells the dead code analysis that the value should be considered live, even though it might appear to be dead. This is typically used in case of FFI where there are indirect ways to access values. It can be added to everything that could otherwise be considered unused by the dead code analysis - values, functions, arguments, records, individual record fields, and so on.\n\n[Read more and see examples in the documentation](https://rescript-lang.org/syntax-lookup#live-decorator).\n\nHint: Did you know you can run an interactive code analysis in your project by running the command `> ReScript: Start Code Analyzer`? Try it!" + } +} Hover src/Hover.res 125:4 -{"contents": {"kind": "markdown", "value": "```rescript\nunit => unit => int\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nunit => unit => int\n```" + } +} Hover src/Hover.res 131:4 -{"contents": {"kind": "markdown", "value": "```rescript\n(unit, unit) => int\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\n(unit, unit) => int\n```" + } +} Hover src/Hover.res 134:4 -{"contents": {"kind": "markdown", "value": "```rescript\n(unit, unit) => int\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\n(unit, unit) => int\n```" + } +} Hover src/Hover.res 137:5 -{"contents": {"kind": "markdown", "value": "```rescript\nunit => unit => int\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nunit => unit => int\n```" + } +} Hover src/Hover.res 144:9 -{"contents": {"kind": "markdown", "value": "```rescript\nint\n```\n---\ndoc comment 1"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nint\n```\n---\ndoc comment 1" + } +} Hover src/Hover.res 148:6 -{"contents": {"kind": "markdown", "value": "```rescript\nint\n```\n---\n doc comment 2 "}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nint\n```\n---\n doc comment 2 " + } +} Hover src/Hover.res 165:23 -{"contents": {"kind": "markdown", "value": "```rescript\nfoo\n```\n\n---\n\n```\n \n```\n```rescript\ntype foo<'a> = {content: 'a, zzz: string}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C161%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype bar = {age: int}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C162%2C2%5D)\n"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nfoo\n```\n\n---\n\n```\n \n```\n```rescript\ntype foo<'a> = {content: 'a, zzz: string}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C161%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype bar = {age: int}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C162%2C2%5D)\n" + } +} Hover src/Hover.res 167:22 -{"contents": {"kind": "markdown", "value": "```rescript\nfoobar\n```\n\n---\n\n```\n \n```\n```rescript\ntype foobar = foo\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C163%2C2%5D)\n"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nfoobar\n```\n\n---\n\n```\n \n```\n```rescript\ntype foobar = foo\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C163%2C2%5D)\n" + } +} Complete src/Hover.res 170:16 posCursor:[170:16] posNoWhite:[170:15] Found expr:[170:5->170:16] @@ -133,13 +243,20 @@ Path content CPPipe pathFromEnv: found:true Path Hover. Path -[{ - "label": "age", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nage: int\n```\n\n```rescript\ntype bar = {age: int}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nage: int\n```\n\n```rescript\ntype bar = {age: int}\n```" + }, + "kind": 5, + "label": "age", + "tags": [] + } +] Complete src/Hover.res 173:16 posCursor:[173:16] posNoWhite:[173:15] Found expr:[173:5->173:16] @@ -170,13 +287,20 @@ Path content CPPipe pathFromEnv: found:true Path Hover. Path -[{ - "label": "age", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nage: int\n```\n\n```rescript\ntype bar = {age: int}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nage: int\n```\n\n```rescript\ntype bar = {age: int}\n```" + }, + "kind": 5, + "label": "age", + "tags": [] + } +] Complete src/Hover.res 182:16 posCursor:[182:16] posNoWhite:[182:15] Found expr:[182:5->182:16] @@ -207,13 +331,20 @@ Path content CPPipe pathFromEnv: found:true Path Hover. Path -[{ - "label": "age", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nage: int\n```\n\n```rescript\ntype bar = {age: int}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nage: int\n```\n\n```rescript\ntype bar = {age: int}\n```" + }, + "kind": 5, + "label": "age", + "tags": [] + } +] Complete src/Hover.res 185:16 posCursor:[185:16] posNoWhite:[185:15] Found expr:[185:5->185:16] @@ -244,19 +375,36 @@ Path content CPPipe pathFromEnv: found:true Path Hover. Path -[{ - "label": "age", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nage: int\n```\n\n```rescript\ntype bar = {age: int}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nage: int\n```\n\n```rescript\ntype bar = {age: int}\n```" + }, + "kind": 5, + "label": "age", + "tags": [] + } +] Hover src/Hover.res 197:4 -{"contents": {"kind": "markdown", "value": "```rescript\nCompV4.props => React.element\n```\n\n---\n\n```\n \n```\n```rescript\ntype CompV4.props<'n, 's> = {n?: 'n, s: 's}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C190%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype React.element = Jsx.element\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C0%2C0%5D)\n"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nCompV4.props => React.element\n```\n\n---\n\n```\n \n```\n```rescript\ntype CompV4.props<'n, 's> = {n?: 'n, s: 's}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C190%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype React.element = Jsx.element\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C0%2C0%5D)\n" + } +} Hover src/Hover.res 202:16 -{"contents": {"kind": "markdown", "value": "```rescript\nuseR\n```\n\n---\n\n```\n \n```\n```rescript\ntype useR = {x: int, y: list>>}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C200%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype r<'a> = {i: 'a, f: float}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C101%2C0%5D)\n"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nuseR\n```\n\n---\n\n```\n \n```\n```rescript\ntype useR = {x: int, y: list>>}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C200%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype r<'a> = {i: 'a, f: float}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C101%2C0%5D)\n" + } +} Hover src/Hover.res 210:13 Nothing at that position. Now trying to use completion. @@ -269,13 +417,28 @@ ContextPath Value[usr] Path usr Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib -{"contents": {"kind": "markdown", "value": "```rescript\nuseR\n```\n\n---\n\n```\n \n```\n```rescript\ntype useR = {x: int, y: list>>}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C200%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype r<'a> = {i: 'a, f: float}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C101%2C0%5D)\n"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nuseR\n```\n\n---\n\n```\n \n```\n```rescript\ntype useR = {x: int, y: list>>}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C200%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype r<'a> = {i: 'a, f: float}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C101%2C0%5D)\n" + } +} Hover src/Hover.res 230:20 -{"contents": {"kind": "markdown", "value": "```rescript\nint\n```\n---\n More Stuff "}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nint\n```\n---\n More Stuff " + } +} Hover src/Hover.res 233:17 -{"contents": {"kind": "markdown", "value": "```rescript\nint\n```\n---\n More Stuff "}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nint\n```\n---\n More Stuff " + } +} Hover src/Hover.res 245:6 Nothing at that position. Now trying to use completion. @@ -295,22 +458,52 @@ Path Hover.someField Path someField Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib -{"contents": {"kind": "markdown", "value": "```rescript\nbool\n```\n---\n Mighty fine field here. "}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nbool\n```\n---\n Mighty fine field here. " + } +} Hover src/Hover.res 248:19 -{"contents": {"kind": "markdown", "value": "```rescript\nbool\n```\n---\n Mighty fine field here. "}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nbool\n```\n---\n Mighty fine field here. " + } +} Hover src/Hover.res 253:20 -{"contents": {"kind": "markdown", "value": "```rescript\nvariant\nCoolVariant\n```\n---\n Cool variant! \n\n---\n\n```\n \n```\n```rescript\ntype variant = CoolVariant | OtherCoolVariant\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C251%2C0%5D)\n"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nvariant\nCoolVariant\n```\n---\n Cool variant! \n\n---\n\n```\n \n```\n```rescript\ntype variant = CoolVariant | OtherCoolVariant\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C251%2C0%5D)\n" + } +} Hover src/Hover.res 258:22 -{"contents": {"kind": "markdown", "value": "```rescript\npayloadVariants\nInlineRecord({field1: int, field2: bool})\n```\n\n---\n\n```\n \n```\n```rescript\ntype payloadVariants =\n | InlineRecord({field1: int, field2: bool})\n | Args(int, bool)\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C256%2C0%5D)\n"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\npayloadVariants\nInlineRecord({field1: int, field2: bool})\n```\n\n---\n\n```\n \n```\n```rescript\ntype payloadVariants =\n | InlineRecord({field1: int, field2: bool})\n | Args(int, bool)\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C256%2C0%5D)\n" + } +} Hover src/Hover.res 261:23 -{"contents": {"kind": "markdown", "value": "```rescript\npayloadVariants\nArgs(int, bool)\n```\n\n---\n\n```\n \n```\n```rescript\ntype payloadVariants =\n | InlineRecord({field1: int, field2: bool})\n | Args(int, bool)\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C256%2C0%5D)\n"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\npayloadVariants\nArgs(int, bool)\n```\n\n---\n\n```\n \n```\n```rescript\ntype payloadVariants =\n | InlineRecord({field1: int, field2: bool})\n | Args(int, bool)\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C256%2C0%5D)\n" + } +} Hover src/Hover.res 268:42 -{"contents": {"kind": "markdown", "value": "```rescript\nRecursiveVariants.t\nAction1(int)\n```\n\n---\n\n```\n \n```\n```rescript\ntype RecursiveVariants.t =\n | Action1(int)\n | Action2(float)\n | Batch(array)\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C265%2C2%5D)\n"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nRecursiveVariants.t\nAction1(int)\n```\n\n---\n\n```\n \n```\n```rescript\ntype RecursiveVariants.t =\n | Action1(int)\n | Action2(float)\n | Batch(array)\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C265%2C2%5D)\n" + } +} Hover src/Hover.res 272:23 Nothing at that position. Now trying to use completion. @@ -324,7 +517,7 @@ Path fff Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath string -{"contents": {"kind": "markdown", "value": "```rescript\nstring\n```"}} +{ "contents": { "kind": "markdown", "value": "```rescript\nstring\n```" } } Hover src/Hover.res 275:33 Nothing at that position. Now trying to use completion. @@ -340,11 +533,21 @@ Resolved opens 1 Stdlib ContextPath CPatternPath(Value[x])->recordField(someField) ContextPath Value[x] Path x -{"contents": {"kind": "markdown", "value": "```rescript\nbool\n```"}} +{ "contents": { "kind": "markdown", "value": "```rescript\nbool\n```" } } Hover src/Hover.res 278:8 -{"contents": {"kind": "markdown", "value": "\n [`Belt.Array`]()\n\n **mutable array**: Utilities functions\n\n---\n\n```\n \n```\n```rescript\nmodule Array: {\n module Id\n module Array\n module SortArray\n module MutableQueue\n module MutableStack\n module List\n module Range\n module Set\n module Map\n module MutableSet\n module MutableMap\n module HashSet\n module HashMap\n module Option\n module Result\n module Int\n module Float\n}\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "\n [`Belt.Array`]()\n\n **mutable array**: Utilities functions\n\n---\n\n```\n \n```\n```rescript\nmodule Array: {\n module Id\n module Array\n module SortArray\n module MutableQueue\n module MutableStack\n module List\n module Range\n module Set\n module Map\n module MutableSet\n module MutableMap\n module HashSet\n module HashMap\n module Option\n module Result\n module Int\n module Float\n}\n```" + } +} Hover src/Hover.res 281:6 -{"contents": {"kind": "markdown", "value": "```rescript\ntype aliased = variant\n```\n\n---\n\n```\n \n```\n```rescript\ntype variant = CoolVariant | OtherCoolVariant\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C251%2C0%5D)\n"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\ntype aliased = variant\n```\n\n---\n\n```\n \n```\n```rescript\ntype variant = CoolVariant | OtherCoolVariant\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C251%2C0%5D)\n" + } +} diff --git a/tests/analysis_tests/tests/src/expected/IncludeModuleCompletion.res.txt b/tests/analysis_tests/tests/src/expected/IncludeModuleCompletion.res.txt index 57535091fe8..c5da0283602 100644 --- a/tests/analysis_tests/tests/src/expected/IncludeModuleCompletion.res.txt +++ b/tests/analysis_tests/tests/src/expected/IncludeModuleCompletion.res.txt @@ -1,3 +1,4 @@ +null Complete src/IncludeModuleCompletion.res 47:11 posCursor:[47:11] posNoWhite:[47:10] Found expr:[45:13->52:3] posCursor:[47:11] posNoWhite:[47:10] Found expr:[46:4->51:5] @@ -15,55 +16,88 @@ Path k CPPipe pathFromEnv:Types found:true Path Types. Path -[{ - "label": "->blah", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 11, "line": 47 }, + "start": { "character": 10, "line": 47 } + } + } + ], + "data": null, + "deprecated": false, "detail": "Types.context => string", - "documentation": null, - "sortText": "blah", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->blah", - "additionalTextEdits": [{ - "range": {"start": {"line": 47, "character": 10}, "end": {"line": 47, "character": 11}}, - "newText": "" - }] - }, { - "label": "->add", "kind": 12, - "tags": [], + "label": "->blah", + "sortText": "blah", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 11, "line": 47 }, + "start": { "character": 10, "line": 47 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(Types.context, array) => 't", - "documentation": null, - "sortText": "add", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->add", - "additionalTextEdits": [{ - "range": {"start": {"line": 47, "character": 10}, "end": {"line": 47, "character": 11}}, - "newText": "" - }] - }, { - "label": "->addPosFromVec2", "kind": 12, - "tags": [], + "label": "->add", + "sortText": "add", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 11, "line": 47 }, + "start": { "character": 10, "line": 47 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(Types.context, Types.vec2) => Types.comp", - "documentation": null, - "sortText": "addPosFromVec2", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->addPosFromVec2", - "additionalTextEdits": [{ - "range": {"start": {"line": 47, "character": 10}, "end": {"line": 47, "character": 11}}, - "newText": "" - }] - }, { - "label": "->addPos", "kind": 12, - "tags": [], + "label": "->addPosFromVec2", + "sortText": "addPosFromVec2", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 11, "line": 47 }, + "start": { "character": 10, "line": 47 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(Types.context, float, float) => Types.comp", - "documentation": null, - "sortText": "addPos", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->addPos", - "additionalTextEdits": [{ - "range": {"start": {"line": 47, "character": 10}, "end": {"line": 47, "character": 11}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->addPos", + "sortText": "addPos", + "tags": [] + } +] Complete src/IncludeModuleCompletion.res 49:12 posCursor:[49:12] posNoWhite:[49:11] Found expr:[45:13->52:3] @@ -75,25 +109,35 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[add] Path add -[{ - "label": "add", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(Types.context, array) => 't", - "documentation": null - }, { - "label": "addPosFromVec2", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "add", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(Types.context, Types.vec2) => Types.comp", - "documentation": null - }, { - "label": "addPos", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "addPosFromVec2", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(Types.context, float, float) => Types.comp", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "addPos", + "tags": [] + } +] Complete src/IncludeModuleCompletion.res 58:13 posCursor:[58:13] posNoWhite:[58:12] Found expr:[54:17->61:3] @@ -104,19 +148,26 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[add]($1) ContextPath Value[add] Path add -[{ - "label": "addPosFromVec2", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(Types.context, Types.vec2) => Types.comp", - "documentation": null - }, { - "label": "addPos", + "documentation": { "kind": "markdown", "value": "" }, "kind": 12, - "tags": [], + "label": "addPosFromVec2", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(Types.context, float, float) => Types.comp", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "addPos", + "tags": [] + } +] Complete src/IncludeModuleCompletion.res 70:13 posCursor:[70:13] posNoWhite:[70:12] Found expr:[68:15->73:5] @@ -135,67 +186,108 @@ Path k CPPipe pathFromEnv:Types found:true Path Types. Path -[{ - "label": "->blah", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 70 }, + "start": { "character": 12, "line": 70 } + } + } + ], + "data": null, + "deprecated": false, "detail": "Types.context => string", - "documentation": null, - "sortText": "blah", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->blah", - "additionalTextEdits": [{ - "range": {"start": {"line": 70, "character": 12}, "end": {"line": 70, "character": 13}}, - "newText": "" - }] - }, { - "label": "->add", "kind": 12, - "tags": [], + "label": "->blah", + "sortText": "blah", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 70 }, + "start": { "character": 12, "line": 70 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(Types.context, array) => 't", - "documentation": null, - "sortText": "add", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->add", - "additionalTextEdits": [{ - "range": {"start": {"line": 70, "character": 12}, "end": {"line": 70, "character": 13}}, - "newText": "" - }] - }, { - "label": "->addSprite", "kind": 12, - "tags": [], + "label": "->add", + "sortText": "add", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 70 }, + "start": { "character": 12, "line": 70 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(Types.context, string) => Types.comp", - "documentation": null, - "sortText": "addSprite", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->addSprite", - "additionalTextEdits": [{ - "range": {"start": {"line": 70, "character": 12}, "end": {"line": 70, "character": 13}}, - "newText": "" - }] - }, { - "label": "->addPosFromVec2", "kind": 12, - "tags": [], + "label": "->addSprite", + "sortText": "addSprite", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 70 }, + "start": { "character": 12, "line": 70 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(Types.context, Types.vec2) => Types.comp", - "documentation": null, - "sortText": "addPosFromVec2", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->addPosFromVec2", - "additionalTextEdits": [{ - "range": {"start": {"line": 70, "character": 12}, "end": {"line": 70, "character": 13}}, - "newText": "" - }] - }, { - "label": "->addPos", "kind": 12, - "tags": [], + "label": "->addPosFromVec2", + "sortText": "addPosFromVec2", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 13, "line": 70 }, + "start": { "character": 12, "line": 70 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(Types.context, float, float) => Types.comp", - "documentation": null, - "sortText": "addPos", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->addPos", - "additionalTextEdits": [{ - "range": {"start": {"line": 70, "character": 12}, "end": {"line": 70, "character": 13}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->addPos", + "sortText": "addPos", + "tags": [] + } +] Complete src/IncludeModuleCompletion.res 85:16 posCursor:[85:16] posNoWhite:[85:15] Found expr:[85:13->85:16] @@ -211,19 +303,28 @@ ContextPath Value[a] Path a Path Stdlib.Int.l Path l -[{ - "label": "->lex", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 15, "line": 85 }, + "start": { "character": 14, "line": 85 } + } + } + ], + "data": null, + "deprecated": false, "detail": "int => string", - "documentation": null, - "sortText": "lex", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->lex", - "additionalTextEdits": [{ - "range": {"start": {"line": 85, "character": 14}, "end": {"line": 85, "character": 15}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->lex", + "sortText": "lex", + "tags": [] + } +] Complete src/IncludeModuleCompletion.res 88:14 posCursor:[88:14] posNoWhite:[88:13] Found expr:[88:13->88:14] @@ -233,11 +334,15 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[l] Path l -[{ - "label": "lex", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int => string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "lex", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/InlayHint.res.txt b/tests/analysis_tests/tests/src/expected/InlayHint.res.txt index aad649db3b9..6c838cfeb3f 100644 --- a/tests/analysis_tests/tests/src/expected/InlayHint.res.txt +++ b/tests/analysis_tests/tests/src/expected/InlayHint.res.txt @@ -1,81 +1,96 @@ +null Inlay Hint src/InlayHint.res 1:34 -[{ - "position": {"line": 33, "character": 14}, - "label": ": int", +[ + { "kind": 1, + "label": ": int", "paddingLeft": true, - "paddingRight": false -}, { - "position": {"line": 33, "character": 9}, - "label": ": string", + "paddingRight": false, + "position": { "character": 14, "line": 33 } + }, + { "kind": 1, + "label": ": string", "paddingLeft": true, - "paddingRight": false -}, { - "position": {"line": 28, "character": 9}, - "label": ": foo", + "paddingRight": false, + "position": { "character": 9, "line": 33 } + }, + { "kind": 1, + "label": ": foo", "paddingLeft": true, - "paddingRight": false -}, { - "position": {"line": 26, "character": 23}, - "label": ": (string, string)", + "paddingRight": false, + "position": { "character": 9, "line": 28 } + }, + { "kind": 1, + "label": ": (string, string)", "paddingLeft": true, - "paddingRight": false -}, { - "position": {"line": 18, "character": 9}, - "label": ": string", + "paddingRight": false, + "position": { "character": 23, "line": 26 } + }, + { "kind": 1, + "label": ": string", "paddingLeft": true, - "paddingRight": false -}, { - "position": {"line": 16, "character": 9}, - "label": ": (string, string)", + "paddingRight": false, + "position": { "character": 9, "line": 18 } + }, + { "kind": 1, + "label": ": (string, string)", "paddingLeft": true, - "paddingRight": false -}, { - "position": {"line": 10, "character": 10}, - "label": ": (~xx: int) => int", + "paddingRight": false, + "position": { "character": 9, "line": 16 } + }, + { "kind": 1, + "label": ": (~xx: int) => int", "paddingLeft": true, - "paddingRight": false -}, { - "position": {"line": 8, "character": 10}, - "label": ": int", + "paddingRight": false, + "position": { "character": 10, "line": 10 } + }, + { "kind": 1, + "label": ": int", "paddingLeft": true, - "paddingRight": false -}, { - "position": {"line": 6, "character": 7}, - "label": ": (int, int) => int", + "paddingRight": false, + "position": { "character": 10, "line": 8 } + }, + { "kind": 1, + "label": ": (int, int) => int", "paddingLeft": true, - "paddingRight": false -}, { - "position": {"line": 4, "character": 8}, - "label": ": char", + "paddingRight": false, + "position": { "character": 7, "line": 6 } + }, + { "kind": 1, + "label": ": char", "paddingLeft": true, - "paddingRight": false -}, { - "position": {"line": 3, "character": 9}, - "label": ": float", + "paddingRight": false, + "position": { "character": 8, "line": 4 } + }, + { "kind": 1, + "label": ": float", "paddingLeft": true, - "paddingRight": false -}, { - "position": {"line": 2, "character": 10}, - "label": ": int", + "paddingRight": false, + "position": { "character": 9, "line": 3 } + }, + { "kind": 1, + "label": ": int", "paddingLeft": true, - "paddingRight": false -}, { - "position": {"line": 1, "character": 10}, - "label": ": string", + "paddingRight": false, + "position": { "character": 10, "line": 2 } + }, + { "kind": 1, + "label": ": string", "paddingLeft": true, - "paddingRight": false -}] + "paddingRight": false, + "position": { "character": 10, "line": 1 } + } +] diff --git a/tests/analysis_tests/tests/src/expected/Jsx2.res.txt b/tests/analysis_tests/tests/src/expected/Jsx2.res.txt index 66920cb6331..e8ba4c5bae4 100644 --- a/tests/analysis_tests/tests/src/expected/Jsx2.res.txt +++ b/tests/analysis_tests/tests/src/expected/Jsx2.res.txt @@ -1,5 +1,12 @@ +null Definition src/Jsx2.res 5:9 -{"uri": "Jsx2.res", "range": {"start": {"line": 2, "character": 6}, "end": {"line": 2, "character": 10}}} +{ + "range": { + "end": { "character": 10, "line": 2 }, + "start": { "character": 6, "line": 2 } + }, + "uri": "file:///Jsx2.res" +} Complete src/Jsx2.res 8:15 posCursor:[8:15] posNoWhite:[8:14] Found expr:[8:3->8:15] @@ -18,19 +25,26 @@ Completable: Cjsx([M], f, [second, f]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[{ - "label": "first", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }, { - "label": "fun", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "first", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "option", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "fun", + "tags": [] + } +] Complete src/Jsx2.res 14:13 posCursor:[14:13] posNoWhite:[14:12] Found expr:[14:11->14:13] @@ -40,35 +54,44 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Module[M] Path M -[{ - "label": "M", - "kind": 9, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "module M", - "documentation": null - }, { - "label": "Math", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], + "label": "M", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "module Math", - "documentation": null - }, { - "label": "Map", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], + "label": "Math", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "module Map", - "documentation": null - }, { - "label": "ModuleStuff", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], + "label": "Map", + "tags": [] + }, + { + "data": { "modulePath": "ModuleStuff", "filePath": "src/Jsx2.res" }, + "deprecated": false, "detail": "module ModuleStuff", - "documentation": null, - "data": { - "modulePath": "ModuleStuff", - "filePath": "src/Jsx2.res" - } - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 9, + "label": "ModuleStuff", + "tags": [] + } +] Complete src/Jsx2.res 22:19 posCursor:[22:19] posNoWhite:[22:18] Found expr:[22:3->22:19] @@ -77,13 +100,17 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[{ - "label": "key", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "key", + "tags": [] + } +] Complete src/Jsx2.res 25:17 posCursor:[25:17] posNoWhite:[25:16] Found expr:[25:3->25:17] @@ -92,13 +119,17 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[{ - "label": "key", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "key", + "tags": [] + } +] Complete src/Jsx2.res 28:21 posCursor:[28:21] posNoWhite:[28:20] Found expr:[28:3->28:21] @@ -107,13 +138,17 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[{ - "label": "key", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "key", + "tags": [] + } +] Complete src/Jsx2.res 31:24 posCursor:[31:24] posNoWhite:[31:23] Found expr:[31:3->31:24] @@ -122,13 +157,17 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[{ - "label": "key", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "key", + "tags": [] + } +] Complete src/Jsx2.res 34:18 posCursor:[34:18] posNoWhite:[34:17] Found expr:[34:3->34:18] @@ -137,13 +176,17 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[{ - "label": "key", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "key", + "tags": [] + } +] Complete src/Jsx2.res 37:16 posCursor:[37:16] posNoWhite:[37:15] Found expr:[37:3->37:16] @@ -152,13 +195,17 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[{ - "label": "key", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "key", + "tags": [] + } +] Complete src/Jsx2.res 40:17 posCursor:[40:17] posNoWhite:[40:16] Found expr:[40:3->40:17] @@ -167,13 +214,17 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[{ - "label": "key", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "key", + "tags": [] + } +] Complete src/Jsx2.res 43:18 posCursor:[43:18] posNoWhite:[43:17] Found expr:[43:3->43:18] @@ -182,13 +233,17 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[{ - "label": "key", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "key", + "tags": [] + } +] Complete src/Jsx2.res 46:16 posCursor:[46:16] posNoWhite:[46:15] Found expr:[46:3->46:16] @@ -197,13 +252,17 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[{ - "label": "key", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "key", + "tags": [] + } +] Complete src/Jsx2.res 49:27 posCursor:[49:27] posNoWhite:[49:26] Found expr:[49:3->49:27] @@ -212,13 +271,17 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[{ - "label": "key", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "key", + "tags": [] + } +] Complete src/Jsx2.res 52:38 posCursor:[52:38] posNoWhite:[52:37] Found expr:[52:3->52:38] @@ -227,13 +290,17 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[{ - "label": "key", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "key", + "tags": [] + } +] Complete src/Jsx2.res 55:25 posCursor:[55:25] posNoWhite:[55:24] Found expr:[55:3->55:25] @@ -242,16 +309,26 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[{ - "label": "key", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "key", + "tags": [] + } +] Definition src/Jsx2.res 58:11 -{"uri": "Component.res", "range": {"start": {"line": 1, "character": 4}, "end": {"line": 1, "character": 8}}} +{ + "range": { + "end": { "character": 8, "line": 1 }, + "start": { "character": 4, "line": 1 } + }, + "uri": "file:///Component.res" +} Complete src/Jsx2.res 68:10 posCursor:[68:10] posNoWhite:[68:9] Found expr:[68:3->68:10] @@ -260,13 +337,17 @@ Completable: Cjsx([Ext], al, [al]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path Ext.make -[{ - "label": "align", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "option", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "align", + "tags": [] + } +] Complete src/Jsx2.res 71:11 posCursor:[71:11] posNoWhite:[71:10] Found expr:[71:3->71:11] @@ -284,13 +365,17 @@ Completable: Cjsx([M], k, [first, k]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[{ - "label": "key", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "key", + "tags": [] + } +] Complete src/Jsx2.res 77:23 posCursor:[77:23] posNoWhite:[77:22] Found expr:[77:3->77:23] @@ -299,13 +384,17 @@ Completable: Cjsx([M], k, [first, k]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[{ - "label": "key", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "key", + "tags": [] + } +] Complete src/Jsx2.res 80:6 posCursor:[80:6] posNoWhite:[80:5] Found expr:[80:3->85:69] @@ -324,13 +413,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Module[WithChildren] Path WithChildren -[{ - "label": "WithChildren", - "kind": 9, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "module WithChildren", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 9, + "label": "WithChildren", + "tags": [] + } +] Complete src/Jsx2.res 91:18 posCursor:[91:18] posNoWhite:[91:17] Found expr:[91:3->91:18] @@ -339,13 +432,17 @@ Completable: Cjsx([WithChildren], n, [n]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path WithChildren.make -[{ - "label": "name", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "name", + "tags": [] + } +] Complete src/Jsx2.res 94:18 posCursor:[94:18] posNoWhite:[94:17] Found pattern:[94:7->94:18] @@ -356,13 +453,20 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Type[React, e] Path React.e -[{ - "label": "element", - "kind": 22, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "type element", - "documentation": {"kind": "markdown", "value": "```rescript\ntype element = Jsx.element\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype element = Jsx.element\n```" + }, + "kind": 22, + "label": "element", + "tags": [] + } +] Complete src/Jsx2.res 96:20 posCursor:[96:20] posNoWhite:[96:19] Found pattern:[96:7->99:6] @@ -396,13 +500,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[DefineSomeFields, ""] Path DefineSomeFields. -[{ - "label": "thisValue", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "thisValue", + "tags": [] + } +] Complete src/Jsx2.res 108:36 posCursor:[108:36] posNoWhite:[108:35] Found expr:[108:11->108:36] @@ -414,19 +522,32 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Module[DefineSomeFields].th Path DefineSomeFields.th -[{ - "label": "thisField", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nthisField: int\n```\n\n```rescript\ntype r = {thisField: int, thatField: string}\n```"} - }, { - "label": "thatField", + "documentation": { + "kind": "markdown", + "value": "```rescript\nthisField: int\n```\n\n```rescript\ntype r = {thisField: int, thatField: string}\n```" + }, "kind": 5, - "tags": [], + "label": "thisField", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nthatField: string\n```\n\n```rescript\ntype r = {thisField: int, thatField: string}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nthatField: string\n```\n\n```rescript\ntype r = {thisField: int, thatField: string}\n```" + }, + "kind": 5, + "label": "thatField", + "tags": [] + } +] Complete src/Jsx2.res 122:20 posCursor:[122:20] posNoWhite:[122:19] Found expr:[121:2->125:4] @@ -438,13 +559,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[Outer, Inner, h] Path Outer.Inner.h -[{ - "label": "hello", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "hello", + "tags": [] + } +] Complete src/Jsx2.res 129:19 posCursor:[129:19] posNoWhite:[129:18] Found expr:[128:2->131:9] @@ -456,13 +581,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[Outer, Inner, ""] Path Outer.Inner. -[{ - "label": "hello", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "hello", + "tags": [] + } +] Complete src/Jsx2.res 136:7 posCursor:[136:7] posNoWhite:[136:6] Found expr:[135:2->138:9] @@ -473,16 +602,20 @@ Resolved opens 1 Stdlib ContextPath CJsxPropValue [div] x Path ReactDOM.domProps Path JsxDOM.domProps -[{ - "label": "\"\"", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null, - "sortText": "A", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "{\"$0\"}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "\"\"", + "sortText": "A", + "tags": [] + } +] Complete src/Jsx2.res 150:21 posCursor:[150:21] posNoWhite:[150:20] Found expr:[150:11->150:32] @@ -492,13 +625,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Module[Nested, Co] Path Nested.Co -[{ - "label": "Comp", - "kind": 9, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "module Comp", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 9, + "label": "Comp", + "tags": [] + } +] Complete src/Jsx2.res 153:19 posCursor:[153:19] posNoWhite:[153:18] Found expr:[153:11->153:25] @@ -508,17 +645,31 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Module[Nested, ""] Path Nested. -[{ - "label": "Comp", - "kind": 9, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "module Comp", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 9, + "label": "Comp", + "tags": [] + } +] Hover src/Jsx2.res 162:12 -{"contents": {"kind": "markdown", "value": "```rescript\nComp.props\n```\n\n---\n\n```\n \n```\n```rescript\ntype Comp.props<'age> = {age: 'age}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Jsx2.res%22%2C157%2C2%5D)\n"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nComp.props\n```\n\n---\n\n```\n \n```\n```rescript\ntype Comp.props<'age> = {age: 'age}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Jsx2.res%22%2C157%2C2%5D)\n" + } +} Hover src/Jsx2.res 167:16 -{"contents": {"kind": "markdown", "value": "```rescript\nComp.props\n```\n\n---\n\n```\n \n```\n```rescript\ntype Comp.props<'age> = {age: 'age}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Jsx2.res%22%2C157%2C2%5D)\n"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nComp.props\n```\n\n---\n\n```\n \n```\n```rescript\ntype Comp.props<'age> = {age: 'age}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Jsx2.res%22%2C157%2C2%5D)\n" + } +} diff --git a/tests/analysis_tests/tests/src/expected/Jsx2.resi.txt b/tests/analysis_tests/tests/src/expected/Jsx2.resi.txt index c34ab6fca53..e74533fae77 100644 --- a/tests/analysis_tests/tests/src/expected/Jsx2.resi.txt +++ b/tests/analysis_tests/tests/src/expected/Jsx2.resi.txt @@ -1,8 +1,14 @@ +null Hover src/Jsx2.resi 1:4 -{"contents": {"kind": "markdown", "value": "```rescript\nprops\n```\n\n---\n\n```\n \n```\n```rescript\ntype props<'first> = {first: 'first}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Jsx2.resi%22%2C0%2C0%5D)\n"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nprops\n```\n\n---\n\n```\n \n```\n```rescript\ntype props<'first> = {first: 'first}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Jsx2.resi%22%2C0%2C0%5D)\n" + } +} Hover src/Jsx2.resi 4:4 -{"contents": {"kind": "markdown", "value": "```rescript\nint\n```"}} +{ "contents": { "kind": "markdown", "value": "```rescript\nint\n```" } } Complete src/Jsx2.resi 7:19 posCursor:[7:19] posNoWhite:[7:18] Found type:[7:12->7:19] @@ -12,13 +18,20 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Type[React, e] Path React.e -[{ - "label": "element", - "kind": 22, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "type element", - "documentation": {"kind": "markdown", "value": "```rescript\ntype element = Jsx.element\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype element = Jsx.element\n```" + }, + "kind": 22, + "label": "element", + "tags": [] + } +] Complete src/Jsx2.resi 10:18 posCursor:[10:18] posNoWhite:[10:17] Found type:[10:11->10:18] @@ -28,11 +41,18 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Type[React, e] Path React.e -[{ - "label": "element", - "kind": 22, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "type element", - "documentation": {"kind": "markdown", "value": "```rescript\ntype element = Jsx.element\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype element = Jsx.element\n```" + }, + "kind": 22, + "label": "element", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/JsxV4.res.txt b/tests/analysis_tests/tests/src/expected/JsxV4.res.txt index 5c8085c298a..db43a5685d3 100644 --- a/tests/analysis_tests/tests/src/expected/JsxV4.res.txt +++ b/tests/analysis_tests/tests/src/expected/JsxV4.res.txt @@ -1,5 +1,12 @@ +null Definition src/JsxV4.res 8:9 -{"uri": "JsxV4.res", "range": {"start": {"line": 5, "character": 6}, "end": {"line": 5, "character": 10}}} +{ + "range": { + "end": { "character": 10, "line": 5 }, + "start": { "character": 6, "line": 5 } + }, + "uri": "file:///JsxV4.res" +} Complete src/JsxV4.res 11:20 posCursor:[11:20] posNoWhite:[11:19] Found expr:[11:3->11:20] @@ -8,16 +15,25 @@ Completable: Cjsx([M4], f, [first, f]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M4.make -[{ - "label": "fun", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "option", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "fun", + "tags": [] + } +] Hover src/JsxV4.res 14:9 -{"contents": {"kind": "markdown", "value": "```rescript\nReact.component>\n```\n---\n Doc Comment For M4 \n\n---\n\n```\n \n```\n```rescript\ntype React.component<'props> = Jsx.component<'props>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C13%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype M4.props<'first, 'fun, 'second> = {\n first: 'first,\n fun?: 'fun,\n second?: 'second,\n}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxV4.res%22%2C3%2C2%5D)\n"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nReact.component>\n```\n---\n Doc Comment For M4 \n\n---\n\n```\n \n```\n```rescript\ntype React.component<'props> = Jsx.component<'props>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C13%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype M4.props<'first, 'fun, 'second> = {\n first: 'first,\n fun?: 'fun,\n second?: 'second,\n}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxV4.res%22%2C3%2C2%5D)\n" + } +} Create Interface src/JsxV4.res module M4: { diff --git a/tests/analysis_tests/tests/src/expected/LongIdentTest.res.txt b/tests/analysis_tests/tests/src/expected/LongIdentTest.res.txt index 1c12fccf8e1..e8dbb77f07f 100644 --- a/tests/analysis_tests/tests/src/expected/LongIdentTest.res.txt +++ b/tests/analysis_tests/tests/src/expected/LongIdentTest.res.txt @@ -1,3 +1,4 @@ +null Hover src/LongIdentTest.res 2:13 -{"contents": {"kind": "markdown", "value": "```rescript\nint\n```"}} +{ "contents": { "kind": "markdown", "value": "```rescript\nint\n```" } } diff --git a/tests/analysis_tests/tests/src/expected/ModuleStuff.res.txt b/tests/analysis_tests/tests/src/expected/ModuleStuff.res.txt index e69de29bb2d..19765bd501b 100644 --- a/tests/analysis_tests/tests/src/expected/ModuleStuff.res.txt +++ b/tests/analysis_tests/tests/src/expected/ModuleStuff.res.txt @@ -0,0 +1 @@ +null diff --git a/tests/analysis_tests/tests/src/expected/NestedRecords.res.txt b/tests/analysis_tests/tests/src/expected/NestedRecords.res.txt index c417c159323..58fe43964c1 100644 --- a/tests/analysis_tests/tests/src/expected/NestedRecords.res.txt +++ b/tests/analysis_tests/tests/src/expected/NestedRecords.res.txt @@ -1,3 +1,4 @@ +null Hover src/NestedRecords.res 17:5 Nothing at that position. Now trying to use completion. posCursor:[17:5] posNoWhite:[17:4] Found expr:[17:3->17:10] @@ -9,7 +10,12 @@ ContextPath Value[options] Path options Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib -{"contents": {"kind": "markdown", "value": "```rescript\noptions\n```\n\n---\n\n```\n \n```\n```rescript\ntype options = {\n extra: {name: string, superExtra: {age: int}},\n}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22NestedRecords.res%22%2C1%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype options.extra = {name: string, superExtra: {age: int}}\n```\n"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\noptions\n```\n\n---\n\n```\n \n```\n```rescript\ntype options = {\n extra: {name: string, superExtra: {age: int}},\n}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22NestedRecords.res%22%2C1%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype options.extra = {name: string, superExtra: {age: int}}\n```\n" + } +} Hover src/NestedRecords.res 20:13 Nothing at that position. Now trying to use completion. @@ -29,7 +35,12 @@ Path NestedRecords.extra Path extra Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib -{"contents": {"kind": "markdown", "value": "```rescript\ntype options.extra = {name: string, superExtra: {age: int}}\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\ntype options.extra = {name: string, superExtra: {age: int}}\n```" + } +} Hover src/NestedRecords.res 23:26 Nothing at that position. Now trying to use completion. @@ -63,7 +74,12 @@ Path NestedRecords.superExtra Path superExtra Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib -{"contents": {"kind": "markdown", "value": "```rescript\ntype options.extra.superExtra = {age: int}\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\ntype options.extra.superExtra = {age: int}\n```" + } +} Hover src/NestedRecords.res 26:29 Nothing at that position. Now trying to use completion. @@ -125,5 +141,5 @@ Path NestedRecords.age Path age Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib -{"contents": {"kind": "markdown", "value": "```rescript\nint\n```"}} +{ "contents": { "kind": "markdown", "value": "```rescript\nint\n```" } } diff --git a/tests/analysis_tests/tests/src/expected/NestedRecordsHover.res.txt b/tests/analysis_tests/tests/src/expected/NestedRecordsHover.res.txt index d0a0dc63b89..eab2e31737f 100644 --- a/tests/analysis_tests/tests/src/expected/NestedRecordsHover.res.txt +++ b/tests/analysis_tests/tests/src/expected/NestedRecordsHover.res.txt @@ -1,15 +1,41 @@ +null Hover src/NestedRecordsHover.res 8:7 -{"contents": {"kind": "markdown", "value": "```rescript\noptions\n```\n\n---\n\n```\n \n```\n```rescript\ntype options = {\n extra?: {\n name: string,\n superExtra?: {age: int},\n otherExtra: option<\n {\n test: bool,\n anotherInlined: {record: bool},\n },\n >,\n },\n}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22NestedRecordsHover.res%22%2C0%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype options.extra = {\n name: string,\n superExtra?: {age: int},\n otherExtra: option<\n {\n test: bool,\n anotherInlined: {record: bool},\n },\n >,\n}\n```\n"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\noptions\n```\n\n---\n\n```\n \n```\n```rescript\ntype options = {\n extra?: {\n name: string,\n superExtra?: {age: int},\n otherExtra: option<\n {\n test: bool,\n anotherInlined: {record: bool},\n },\n >,\n },\n}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22NestedRecordsHover.res%22%2C0%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype options.extra = {\n name: string,\n superExtra?: {age: int},\n otherExtra: option<\n {\n test: bool,\n anotherInlined: {record: bool},\n },\n >,\n}\n```\n" + } +} Hover src/NestedRecordsHover.res 11:6 -{"contents": {"kind": "markdown", "value": "```rescript\ntype options.extra = {\n name: string,\n superExtra?: {age: int},\n otherExtra: option<\n {\n test: bool,\n anotherInlined: {record: bool},\n },\n >,\n}\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\ntype options.extra = {\n name: string,\n superExtra?: {age: int},\n otherExtra: option<\n {\n test: bool,\n anotherInlined: {record: bool},\n },\n >,\n}\n```" + } +} Hover src/NestedRecordsHover.res 14:8 -{"contents": {"kind": "markdown", "value": "```rescript\ntype options.extra.superExtra = {age: int}\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\ntype options.extra.superExtra = {age: int}\n```" + } +} Hover src/NestedRecordsHover.res 18:9 -{"contents": {"kind": "markdown", "value": "```rescript\ntype options.extra.otherExtra = {\n test: bool,\n anotherInlined: {record: bool},\n}\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\ntype options.extra.otherExtra = {\n test: bool,\n anotherInlined: {record: bool},\n}\n```" + } +} Hover src/NestedRecordsHover.res 21:11 -{"contents": {"kind": "markdown", "value": "```rescript\ntype options.extra.otherExtra.anotherInlined = {\n record: bool,\n}\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\ntype options.extra.otherExtra.anotherInlined = {\n record: bool,\n}\n```" + } +} diff --git a/tests/analysis_tests/tests/src/expected/Objects.res.txt b/tests/analysis_tests/tests/src/expected/Objects.res.txt index e69de29bb2d..19765bd501b 100644 --- a/tests/analysis_tests/tests/src/expected/Objects.res.txt +++ b/tests/analysis_tests/tests/src/expected/Objects.res.txt @@ -0,0 +1 @@ +null diff --git a/tests/analysis_tests/tests/src/expected/Patterns.res.txt b/tests/analysis_tests/tests/src/expected/Patterns.res.txt index 43cb4b1fc26..dabc3548b61 100644 --- a/tests/analysis_tests/tests/src/expected/Patterns.res.txt +++ b/tests/analysis_tests/tests/src/expected/Patterns.res.txt @@ -1,12 +1,37 @@ +null Definition src/Patterns.res 19:10 -{"uri": "Patterns.res", "range": {"start": {"line": 3, "character": 7}, "end": {"line": 3, "character": 10}}} +{ + "range": { + "end": { "character": 10, "line": 3 }, + "start": { "character": 7, "line": 3 } + }, + "uri": "file:///Patterns.res" +} Definition src/Patterns.res 24:11 -{"uri": "Patterns.res", "range": {"start": {"line": 9, "character": 7}, "end": {"line": 9, "character": 11}}} +{ + "range": { + "end": { "character": 11, "line": 9 }, + "start": { "character": 7, "line": 9 } + }, + "uri": "file:///Patterns.res" +} Definition src/Patterns.res 27:11 -{"uri": "Patterns.res", "range": {"start": {"line": 11, "character": 7}, "end": {"line": 11, "character": 8}}} +{ + "range": { + "end": { "character": 8, "line": 11 }, + "start": { "character": 7, "line": 11 } + }, + "uri": "file:///Patterns.res" +} Definition src/Patterns.res 30:11 -{"uri": "Patterns.res", "range": {"start": {"line": 15, "character": 9}, "end": {"line": 15, "character": 11}}} +{ + "range": { + "end": { "character": 11, "line": 15 }, + "start": { "character": 9, "line": 15 } + }, + "uri": "file:///Patterns.res" +} diff --git a/tests/analysis_tests/tests/src/expected/PolyRec.res.txt b/tests/analysis_tests/tests/src/expected/PolyRec.res.txt index 64c790174bd..feaa6b1356f 100644 --- a/tests/analysis_tests/tests/src/expected/PolyRec.res.txt +++ b/tests/analysis_tests/tests/src/expected/PolyRec.res.txt @@ -1,3 +1,9 @@ +null Hover src/PolyRec.res 12:10 -{"contents": {"kind": "markdown", "value": "```rescript\n([#Leaf | #Node(int, 'a, 'a)] as 'a)\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\n([#Leaf | #Node(int, 'a, 'a)] as 'a)\n```" + } +} diff --git a/tests/analysis_tests/tests/src/expected/PrepareRename.res.txt b/tests/analysis_tests/tests/src/expected/PrepareRename.res.txt index bb418cc27a9..0249638ff38 100644 --- a/tests/analysis_tests/tests/src/expected/PrepareRename.res.txt +++ b/tests/analysis_tests/tests/src/expected/PrepareRename.res.txt @@ -1,12 +1,13 @@ +null PrepareRename src/PrepareRename.res 0:4 { - "range": {"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 5}}, - "placeholder": "x" - } + "end": { "character": 5, "line": 0 }, + "start": { "character": 4, "line": 0 } +} PrepareRename src/PrepareRename.res 3:19 { - "range": {"start": {"line": 3, "character": 19}, "end": {"line": 3, "character": 21}}, - "placeholder": "xx" - } + "end": { "character": 21, "line": 3 }, + "start": { "character": 19, "line": 3 } +} diff --git a/tests/analysis_tests/tests/src/expected/QueryFile.res.txt b/tests/analysis_tests/tests/src/expected/QueryFile.res.txt index e69de29bb2d..19765bd501b 100644 --- a/tests/analysis_tests/tests/src/expected/QueryFile.res.txt +++ b/tests/analysis_tests/tests/src/expected/QueryFile.res.txt @@ -0,0 +1 @@ +null diff --git a/tests/analysis_tests/tests/src/expected/RecModules.res.txt b/tests/analysis_tests/tests/src/expected/RecModules.res.txt index 62e3e825ce5..36ca3b53204 100644 --- a/tests/analysis_tests/tests/src/expected/RecModules.res.txt +++ b/tests/analysis_tests/tests/src/expected/RecModules.res.txt @@ -1,6 +1,17 @@ +null Hover src/RecModules.res 18:12 -{"contents": {"kind": "markdown", "value": "```rescript\nmodule C: {\n type t\n let createA: t => A.t\n}\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nmodule C: {\n type t\n let createA: t => A.t\n}\n```" + } +} Hover src/RecModules.res 20:12 -{"contents": {"kind": "markdown", "value": "```rescript\nmodule A: {\n type t\n let child: t => B.t\n}\n```"}} +{ + "contents": { + "kind": "markdown", + "value": "```rescript\nmodule A: {\n type t\n let child: t => B.t\n}\n```" + } +} diff --git a/tests/analysis_tests/tests/src/expected/RecordCompletion.res.txt b/tests/analysis_tests/tests/src/expected/RecordCompletion.res.txt index b4587be81af..8ef4eb227c2 100644 --- a/tests/analysis_tests/tests/src/expected/RecordCompletion.res.txt +++ b/tests/analysis_tests/tests/src/expected/RecordCompletion.res.txt @@ -1,3 +1,4 @@ +null Complete src/RecordCompletion.res 8:9 posCursor:[8:9] posNoWhite:[8:8] Found expr:[8:3->8:9] Completable: Cpath Value[t].n->m @@ -16,19 +17,32 @@ Path n Path Stdlib.Array.m Path ArrayUtils.m Path m -[{ - "label": "Array.map", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a => 'b) => array<'b>", - "documentation": {"kind": "markdown", "value": "\n`map(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray = array->Array.map(greeting => greeting ++ \" to you\")\n\nmappedArray == [\"Hello to you\", \"Hi to you\", \"Good bye to you\"]\n```\n"} - }, { - "label": "Array.mapWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`map(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray = array->Array.map(greeting => greeting ++ \" to you\")\n\nmappedArray == [\"Hello to you\", \"Hi to you\", \"Good bye to you\"]\n```\n" + }, "kind": 12, - "tags": [], + "label": "Array.map", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, ('a, int) => 'b) => array<'b>", - "documentation": {"kind": "markdown", "value": "\n`mapWithIndex(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray =\n array->Array.mapWithIndex((greeting, index) => greeting ++ \" at position \" ++ Int.toString(index))\n\nmappedArray == [\"Hello at position 0\", \"Hi at position 1\", \"Good bye at position 2\"]\n```\n"} - }] + "documentation": { + "kind": "markdown", + "value": "\n`mapWithIndex(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray =\n array->Array.mapWithIndex((greeting, index) => greeting ++ \" at position \" ++ Int.toString(index))\n\nmappedArray == [\"Hello at position 0\", \"Hi at position 1\", \"Good bye at position 2\"]\n```\n" + }, + "kind": 12, + "label": "Array.mapWithIndex", + "tags": [] + } +] Complete src/RecordCompletion.res 11:13 posCursor:[11:13] posNoWhite:[11:12] Found expr:[11:3->11:13] @@ -62,19 +76,32 @@ Path n Path Stdlib.Array.m Path ArrayUtils.m Path m -[{ - "label": "Array.map", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "(array<'a>, 'a => 'b) => array<'b>", - "documentation": {"kind": "markdown", "value": "\n`map(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray = array->Array.map(greeting => greeting ++ \" to you\")\n\nmappedArray == [\"Hello to you\", \"Hi to you\", \"Good bye to you\"]\n```\n"} - }, { - "label": "Array.mapWithIndex", + "documentation": { + "kind": "markdown", + "value": "\n`map(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray = array->Array.map(greeting => greeting ++ \" to you\")\n\nmappedArray == [\"Hello to you\", \"Hi to you\", \"Good bye to you\"]\n```\n" + }, "kind": 12, - "tags": [], + "label": "Array.map", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(array<'a>, ('a, int) => 'b) => array<'b>", - "documentation": {"kind": "markdown", "value": "\n`mapWithIndex(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray =\n array->Array.mapWithIndex((greeting, index) => greeting ++ \" at position \" ++ Int.toString(index))\n\nmappedArray == [\"Hello at position 0\", \"Hi at position 1\", \"Good bye at position 2\"]\n```\n"} - }] + "documentation": { + "kind": "markdown", + "value": "\n`mapWithIndex(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray =\n array->Array.mapWithIndex((greeting, index) => greeting ++ \" at position \" ++ Int.toString(index))\n\nmappedArray == [\"Hello at position 0\", \"Hi at position 1\", \"Good bye at position 2\"]\n```\n" + }, + "kind": 12, + "label": "Array.mapWithIndex", + "tags": [] + } +] Complete src/RecordCompletion.res 19:7 posCursor:[19:7] posNoWhite:[19:6] Found expr:[19:3->19:7] @@ -84,13 +111,20 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Module[R]."" Path R. -[{ - "label": "name", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nname: string\n```\n\n```rescript\ntype t = {name: string}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nname: string\n```\n\n```rescript\ntype t = {name: string}\n```" + }, + "kind": 5, + "label": "name", + "tags": [] + } +] Complete src/RecordCompletion.res 22:7 posCursor:[22:7] posNoWhite:[22:6] Found expr:[22:3->22:10] @@ -100,11 +134,18 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Module[R]."" Path R. -[{ - "label": "name", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "```rescript\nname: string\n```\n\n```rescript\ntype t = {name: string}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nname: string\n```\n\n```rescript\ntype t = {name: string}\n```" + }, + "kind": 5, + "label": "name", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/RecoveryOnProp.res.txt b/tests/analysis_tests/tests/src/expected/RecoveryOnProp.res.txt index 704c9ccc964..fcc4835083a 100644 --- a/tests/analysis_tests/tests/src/expected/RecoveryOnProp.res.txt +++ b/tests/analysis_tests/tests/src/expected/RecoveryOnProp.res.txt @@ -1,3 +1,4 @@ +null Complete src/RecoveryOnProp.res 6:26 posCursor:[6:26] posNoWhite:[6:25] Found expr:[3:2->11:8] JSX 3:6] onClick[4:4->4:11]=...[4:13->0:-1]> _children:None @@ -15,61 +16,75 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Type[Res] Path Res -[{ - "label": "Result", - "kind": 9, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "module Result", - "documentation": null - }, { - "label": "RescriptReactErrorBoundary", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module RescriptReactErrorBoundary", - "documentation": null, + "label": "Result", + "tags": [] + }, + { "data": { "modulePath": "RescriptReactErrorBoundary", "filePath": "src/RecoveryOnProp.res" - } - }, { - "label": "RescriptReactRouter", + }, + "deprecated": false, + "detail": "module RescriptReactErrorBoundary", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module RescriptReactRouter", - "documentation": null, + "label": "RescriptReactErrorBoundary", + "tags": [] + }, + { "data": { "modulePath": "RescriptReactRouter", "filePath": "src/RecoveryOnProp.res" - } - }, { - "label": "RescriptTools", + }, + "deprecated": false, + "detail": "module RescriptReactRouter", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module RescriptTools", - "documentation": null, + "label": "RescriptReactRouter", + "tags": [] + }, + { "data": { "modulePath": "RescriptTools", "filePath": "src/RecoveryOnProp.res" - } - }, { - "label": "RescriptTools_Docgen", + }, + "deprecated": false, + "detail": "module RescriptTools", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module RescriptTools_Docgen", - "documentation": null, + "label": "RescriptTools", + "tags": [] + }, + { "data": { "modulePath": "RescriptTools_Docgen", "filePath": "src/RecoveryOnProp.res" - } - }, { - "label": "RescriptTools_ExtractCodeBlocks", + }, + "deprecated": false, + "detail": "module RescriptTools_Docgen", + "documentation": { "kind": "markdown", "value": "" }, "kind": 9, - "tags": [], - "detail": "module RescriptTools_ExtractCodeBlocks", - "documentation": null, + "label": "RescriptTools_Docgen", + "tags": [] + }, + { "data": { "modulePath": "RescriptTools_ExtractCodeBlocks", "filePath": "src/RecoveryOnProp.res" - } - }] + }, + "deprecated": false, + "detail": "module RescriptTools_ExtractCodeBlocks", + "documentation": { "kind": "markdown", "value": "" }, + "kind": 9, + "label": "RescriptTools_ExtractCodeBlocks", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/References.res.txt b/tests/analysis_tests/tests/src/expected/References.res.txt index 842250d4521..c2aeeeaed48 100644 --- a/tests/analysis_tests/tests/src/expected/References.res.txt +++ b/tests/analysis_tests/tests/src/expected/References.res.txt @@ -1,31 +1,122 @@ +null References src/References.res 0:4 [ -{"uri": "Cross.res", "range": {"start": {"line": 0, "character": 26}, "end": {"line": 0, "character": 27}}}, -{"uri": "Cross.res", "range": {"start": {"line": 3, "character": 27}, "end": {"line": 3, "character": 28}}}, -{"uri": "Cross.res", "range": {"start": {"line": 7, "character": 27}, "end": {"line": 7, "character": 28}}}, -{"uri": "References.res", "range": {"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 5}}}, -{"uri": "References.res", "range": {"start": {"line": 3, "character": 8}, "end": {"line": 3, "character": 9}}}, -{"uri": "References.res", "range": {"start": {"line": 7, "character": 8}, "end": {"line": 7, "character": 9}}} + { + "range": { + "end": { "character": 27, "line": 0 }, + "start": { "character": 26, "line": 0 } + }, + "uri": "file:///Cross.res" + }, + { + "range": { + "end": { "character": 28, "line": 3 }, + "start": { "character": 27, "line": 3 } + }, + "uri": "file:///Cross.res" + }, + { + "range": { + "end": { "character": 28, "line": 7 }, + "start": { "character": 27, "line": 7 } + }, + "uri": "file:///Cross.res" + }, + { + "range": { + "end": { "character": 5, "line": 0 }, + "start": { "character": 4, "line": 0 } + }, + "uri": "file:///References.res" + }, + { + "range": { + "end": { "character": 9, "line": 3 }, + "start": { "character": 8, "line": 3 } + }, + "uri": "file:///References.res" + }, + { + "range": { + "end": { "character": 9, "line": 7 }, + "start": { "character": 8, "line": 7 } + }, + "uri": "file:///References.res" + } ] References src/References.res 9:19 [ -{"uri": "References.res", "range": {"start": {"line": 9, "character": 11}, "end": {"line": 9, "character": 14}}}, -{"uri": "References.res", "range": {"start": {"line": 9, "character": 19}, "end": {"line": 9, "character": 21}}} + { + "range": { + "end": { "character": 14, "line": 9 }, + "start": { "character": 11, "line": 9 } + }, + "uri": "file:///References.res" + }, + { + "range": { + "end": { "character": 21, "line": 9 }, + "start": { "character": 19, "line": 9 } + }, + "uri": "file:///References.res" + } ] References src/References.res 20:12 [ -{"uri": "References.res", "range": {"start": {"line": 13, "character": 2}, "end": {"line": 13, "character": 13}}}, -{"uri": "References.res", "range": {"start": {"line": 18, "character": 11}, "end": {"line": 18, "character": 13}}}, -{"uri": "References.res", "range": {"start": {"line": 20, "character": 11}, "end": {"line": 20, "character": 13}}} + { + "range": { + "end": { "character": 13, "line": 13 }, + "start": { "character": 2, "line": 13 } + }, + "uri": "file:///References.res" + }, + { + "range": { + "end": { "character": 13, "line": 18 }, + "start": { "character": 11, "line": 18 } + }, + "uri": "file:///References.res" + }, + { + "range": { + "end": { "character": 13, "line": 20 }, + "start": { "character": 11, "line": 20 } + }, + "uri": "file:///References.res" + } ] References src/References.res 23:15 [ -{"uri": "ReferencesInner.res", "range": {"start": {"line": 1, "character": 28}, "end": {"line": 1, "character": 32}}}, -{"uri": "References.res", "range": {"start": {"line": 23, "character": 19}, "end": {"line": 23, "character": 23}}}, -{"uri": "ComponentInner.res", "range": {"start": {"line": 1, "character": 4}, "end": {"line": 1, "character": 8}}}, -{"uri": "ComponentInner.resi", "range": {"start": {"line": 1, "character": 4}, "end": {"line": 1, "character": 8}}} + { + "range": { + "end": { "character": 32, "line": 1 }, + "start": { "character": 28, "line": 1 } + }, + "uri": "file:///ReferencesInner.res" + }, + { + "range": { + "end": { "character": 23, "line": 23 }, + "start": { "character": 19, "line": 23 } + }, + "uri": "file:///References.res" + }, + { + "range": { + "end": { "character": 8, "line": 1 }, + "start": { "character": 4, "line": 1 } + }, + "uri": "file:///ComponentInner.res" + }, + { + "range": { + "end": { "character": 8, "line": 1 }, + "start": { "character": 4, "line": 1 } + }, + "uri": "file:///ComponentInner.resi" + } ] diff --git a/tests/analysis_tests/tests/src/expected/ReferencesWithInterface.res.txt b/tests/analysis_tests/tests/src/expected/ReferencesWithInterface.res.txt index 33f2d105d6b..addfa960ae0 100644 --- a/tests/analysis_tests/tests/src/expected/ReferencesWithInterface.res.txt +++ b/tests/analysis_tests/tests/src/expected/ReferencesWithInterface.res.txt @@ -1,9 +1,40 @@ +null References src/ReferencesWithInterface.res 0:4 [ -{"uri": "Cross.res", "range": {"start": {"line": 9, "character": 52}, "end": {"line": 9, "character": 53}}}, -{"uri": "Cross.res", "range": {"start": {"line": 12, "character": 53}, "end": {"line": 12, "character": 54}}}, -{"uri": "Cross.res", "range": {"start": {"line": 16, "character": 53}, "end": {"line": 16, "character": 54}}}, -{"uri": "ReferencesWithInterface.resi", "range": {"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 5}}}, -{"uri": "ReferencesWithInterface.res", "range": {"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 5}}} + { + "range": { + "end": { "character": 53, "line": 9 }, + "start": { "character": 52, "line": 9 } + }, + "uri": "file:///Cross.res" + }, + { + "range": { + "end": { "character": 54, "line": 12 }, + "start": { "character": 53, "line": 12 } + }, + "uri": "file:///Cross.res" + }, + { + "range": { + "end": { "character": 54, "line": 16 }, + "start": { "character": 53, "line": 16 } + }, + "uri": "file:///Cross.res" + }, + { + "range": { + "end": { "character": 5, "line": 0 }, + "start": { "character": 4, "line": 0 } + }, + "uri": "file:///ReferencesWithInterface.resi" + }, + { + "range": { + "end": { "character": 5, "line": 0 }, + "start": { "character": 4, "line": 0 } + }, + "uri": "file:///ReferencesWithInterface.res" + } ] diff --git a/tests/analysis_tests/tests/src/expected/ReferencesWithInterface.resi.txt b/tests/analysis_tests/tests/src/expected/ReferencesWithInterface.resi.txt index 3e96fbc75c2..2445ae67cce 100644 --- a/tests/analysis_tests/tests/src/expected/ReferencesWithInterface.resi.txt +++ b/tests/analysis_tests/tests/src/expected/ReferencesWithInterface.resi.txt @@ -1,9 +1,40 @@ +null References src/ReferencesWithInterface.resi 0:4 [ -{"uri": "Cross.res", "range": {"start": {"line": 9, "character": 52}, "end": {"line": 9, "character": 53}}}, -{"uri": "Cross.res", "range": {"start": {"line": 12, "character": 53}, "end": {"line": 12, "character": 54}}}, -{"uri": "Cross.res", "range": {"start": {"line": 16, "character": 53}, "end": {"line": 16, "character": 54}}}, -{"uri": "ReferencesWithInterface.res", "range": {"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 5}}}, -{"uri": "ReferencesWithInterface.resi", "range": {"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 5}}} + { + "range": { + "end": { "character": 53, "line": 9 }, + "start": { "character": 52, "line": 9 } + }, + "uri": "file:///Cross.res" + }, + { + "range": { + "end": { "character": 54, "line": 12 }, + "start": { "character": 53, "line": 12 } + }, + "uri": "file:///Cross.res" + }, + { + "range": { + "end": { "character": 54, "line": 16 }, + "start": { "character": 53, "line": 16 } + }, + "uri": "file:///Cross.res" + }, + { + "range": { + "end": { "character": 5, "line": 0 }, + "start": { "character": 4, "line": 0 } + }, + "uri": "file:///ReferencesWithInterface.res" + }, + { + "range": { + "end": { "character": 5, "line": 0 }, + "start": { "character": 4, "line": 0 } + }, + "uri": "file:///ReferencesWithInterface.resi" + } ] diff --git a/tests/analysis_tests/tests/src/expected/Rename.res.txt b/tests/analysis_tests/tests/src/expected/Rename.res.txt index 92c381452c9..3600b451cb3 100644 --- a/tests/analysis_tests/tests/src/expected/Rename.res.txt +++ b/tests/analysis_tests/tests/src/expected/Rename.res.txt @@ -1,37 +1,54 @@ +null Rename src/Rename.res 0:4 y [ -{ - "textDocument": { - "version": null, - "uri": "Rename.res" - }, - "edits": [{ - "range": {"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 5}}, - "newText": "y" - }, { - "range": {"start": {"line": 3, "character": 8}, "end": {"line": 3, "character": 9}}, - "newText": "y" - }, { - "range": {"start": {"line": 7, "character": 8}, "end": {"line": 7, "character": 9}}, - "newText": "y" - }] + { + "edits": [ + { + "newText": "y", + "range": { + "end": { "character": 5, "line": 0 }, + "start": { "character": 4, "line": 0 } + } + }, + { + "newText": "y", + "range": { + "end": { "character": 9, "line": 3 }, + "start": { "character": 8, "line": 3 } + } + }, + { + "newText": "y", + "range": { + "end": { "character": 9, "line": 7 }, + "start": { "character": 8, "line": 7 } + } + } + ], + "textDocument": { "uri": "file:///Rename.res" } } ] Rename src/Rename.res 9:19 yy [ -{ - "textDocument": { - "version": null, - "uri": "Rename.res" - }, - "edits": [{ - "range": {"start": {"line": 9, "character": 11}, "end": {"line": 9, "character": 14}}, - "newText": "yy" - }, { - "range": {"start": {"line": 9, "character": 19}, "end": {"line": 9, "character": 21}}, - "newText": "yy" - }] + { + "edits": [ + { + "newText": "yy", + "range": { + "end": { "character": 14, "line": 9 }, + "start": { "character": 11, "line": 9 } + } + }, + { + "newText": "yy", + "range": { + "end": { "character": 21, "line": 9 }, + "start": { "character": 19, "line": 9 } + } + } + ], + "textDocument": { "uri": "file:///Rename.res" } } ] diff --git a/tests/analysis_tests/tests/src/expected/RenameWithInterface.res.txt b/tests/analysis_tests/tests/src/expected/RenameWithInterface.res.txt index 48ecdabc568..5712a9b25b7 100644 --- a/tests/analysis_tests/tests/src/expected/RenameWithInterface.res.txt +++ b/tests/analysis_tests/tests/src/expected/RenameWithInterface.res.txt @@ -1,37 +1,48 @@ +null Rename src/RenameWithInterface.res 0:4 y [ -{ - "textDocument": { - "version": null, - "uri": "RenameWithInterface.resi" + { + "edits": [ + { + "newText": "y", + "range": { + "end": { "character": 5, "line": 0 }, + "start": { "character": 4, "line": 0 } + } + } + ], + "textDocument": { "uri": "file:///RenameWithInterface.resi" } }, - "edits": [{ - "range": {"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 5}}, - "newText": "y" - }] + { + "edits": [ + { + "newText": "y", + "range": { + "end": { "character": 5, "line": 0 }, + "start": { "character": 4, "line": 0 } + } + } + ], + "textDocument": { "uri": "file:///RenameWithInterface.res" } }, -{ - "textDocument": { - "version": null, - "uri": "RenameWithInterface.res" - }, - "edits": [{ - "range": {"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 5}}, - "newText": "y" - }] - }, -{ - "textDocument": { - "version": null, - "uri": "Cross.res" - }, - "edits": [{ - "range": {"start": {"line": 18, "character": 28}, "end": {"line": 18, "character": 29}}, - "newText": "y" - }, { - "range": {"start": {"line": 21, "character": 28}, "end": {"line": 21, "character": 29}}, - "newText": "y" - }] + { + "edits": [ + { + "newText": "y", + "range": { + "end": { "character": 29, "line": 18 }, + "start": { "character": 28, "line": 18 } + } + }, + { + "newText": "y", + "range": { + "end": { "character": 29, "line": 21 }, + "start": { "character": 28, "line": 21 } + } + } + ], + "textDocument": { "uri": "file:///Cross.res" } } ] diff --git a/tests/analysis_tests/tests/src/expected/RenameWithInterface.resi.txt b/tests/analysis_tests/tests/src/expected/RenameWithInterface.resi.txt index 3c5d529093e..3c40ade795a 100644 --- a/tests/analysis_tests/tests/src/expected/RenameWithInterface.resi.txt +++ b/tests/analysis_tests/tests/src/expected/RenameWithInterface.resi.txt @@ -1,37 +1,48 @@ +null Rename src/RenameWithInterface.resi 0:4 y [ -{ - "textDocument": { - "version": null, - "uri": "RenameWithInterface.resi" + { + "edits": [ + { + "newText": "y", + "range": { + "end": { "character": 5, "line": 0 }, + "start": { "character": 4, "line": 0 } + } + } + ], + "textDocument": { "uri": "file:///RenameWithInterface.resi" } }, - "edits": [{ - "range": {"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 5}}, - "newText": "y" - }] + { + "edits": [ + { + "newText": "y", + "range": { + "end": { "character": 5, "line": 0 }, + "start": { "character": 4, "line": 0 } + } + } + ], + "textDocument": { "uri": "file:///RenameWithInterface.res" } }, -{ - "textDocument": { - "version": null, - "uri": "RenameWithInterface.res" - }, - "edits": [{ - "range": {"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 5}}, - "newText": "y" - }] - }, -{ - "textDocument": { - "version": null, - "uri": "Cross.res" - }, - "edits": [{ - "range": {"start": {"line": 18, "character": 28}, "end": {"line": 18, "character": 29}}, - "newText": "y" - }, { - "range": {"start": {"line": 21, "character": 28}, "end": {"line": 21, "character": 29}}, - "newText": "y" - }] + { + "edits": [ + { + "newText": "y", + "range": { + "end": { "character": 29, "line": 18 }, + "start": { "character": 28, "line": 18 } + } + }, + { + "newText": "y", + "range": { + "end": { "character": 29, "line": 21 }, + "start": { "character": 28, "line": 21 } + } + } + ], + "textDocument": { "uri": "file:///Cross.res" } } ] diff --git a/tests/analysis_tests/tests/src/expected/Reprod.res.txt b/tests/analysis_tests/tests/src/expected/Reprod.res.txt index 08783543a54..49708d973b2 100644 --- a/tests/analysis_tests/tests/src/expected/Reprod.res.txt +++ b/tests/analysis_tests/tests/src/expected/Reprod.res.txt @@ -1,3 +1,4 @@ +null Complete src/Reprod.res 7:53 posCursor:[7:53] posNoWhite:[7:52] Found expr:[7:11->7:56] Pexp_apply ...[7:11->7:20] (~variables7:22->7:31=...[7:32->7:55]) @@ -7,16 +8,23 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[Query, use](~variables) ContextPath Value[Query, use] Path Query.use -[{ - "label": "{}", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "input_ByAddress", - "documentation": {"kind": "markdown", "value": "```rescript\ntype input_ByAddress = {city: string}\n```"}, - "sortText": "A", + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype input_ByAddress = {city: string}\n```" + }, "insertText": "{$0}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "{}", + "sortText": "A", + "tags": [] + } +] Complete src/Reprod.res 33:28 posCursor:[33:28] posNoWhite:[33:27] Found pattern:[33:21->33:31] @@ -25,31 +33,50 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[record] Path record -[{ - "label": "One", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "One", - "documentation": {"kind": "markdown", "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```" + }, "insertText": "One", - "insertTextFormat": 2 - }, { - "label": "Two(_)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "One", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Two(bool)", - "documentation": {"kind": "markdown", "value": "```rescript\nTwo(bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nTwo(bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```" + }, "insertText": "Two(${1:_})", - "insertTextFormat": 2 - }, { - "label": "Three(_, _)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "Two(_)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Three(someRecord, bool)", - "documentation": {"kind": "markdown", "value": "```rescript\nThree(someRecord, bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nThree(someRecord, bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```" + }, "insertText": "Three(${1:_}, ${2:_})", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "Three(_, _)", + "tags": [] + } +] Complete src/Reprod.res 36:29 posCursor:[36:29] posNoWhite:[36:28] Found pattern:[36:21->36:32] @@ -58,16 +85,23 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[record] Path record -[{ - "label": "{}", - "kind": 22, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "SchemaAssets.input_ByAddress", - "documentation": {"kind": "markdown", "value": "```rescript\ntype SchemaAssets.input_ByAddress = {city: string}\n```"}, - "sortText": "A", + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype SchemaAssets.input_ByAddress = {city: string}\n```" + }, "insertText": "{$0}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 22, + "label": "{}", + "sortText": "A", + "tags": [] + } +] Complete src/Reprod.res 43:21 posCursor:[43:21] posNoWhite:[43:20] Found pattern:[43:18->43:22] @@ -79,31 +113,50 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[res] Path res -[{ - "label": "One", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "One", - "documentation": {"kind": "markdown", "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```" + }, "insertText": "One", - "insertTextFormat": 2 - }, { - "label": "Two(_)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "One", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Two(bool)", - "documentation": {"kind": "markdown", "value": "```rescript\nTwo(bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nTwo(bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```" + }, "insertText": "Two(${1:_})", - "insertTextFormat": 2 - }, { - "label": "Three(_, _)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "Two(_)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Three(someRecord, bool)", - "documentation": {"kind": "markdown", "value": "```rescript\nThree(someRecord, bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nThree(someRecord, bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```" + }, "insertText": "Three(${1:_}, ${2:_})", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "Three(_, _)", + "tags": [] + } +] Complete src/Reprod.res 46:24 posCursor:[46:24] posNoWhite:[46:23] Found pattern:[46:18->46:25] @@ -115,31 +168,50 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[res] Path res -[{ - "label": "#one", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "#one", - "documentation": {"kind": "markdown", "value": "```rescript\n#one\n```\n\n```rescript\n[#one | #three(someRecord, bool) | #two(bool)]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#one\n```\n\n```rescript\n[#one | #three(someRecord, bool) | #two(bool)]\n```" + }, "insertText": "#one", - "insertTextFormat": 2 - }, { - "label": "#three(_, _)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "#one", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "#three(someRecord, bool)", - "documentation": {"kind": "markdown", "value": "```rescript\n#three(someRecord, bool)\n```\n\n```rescript\n[#one | #three(someRecord, bool) | #two(bool)]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#three(someRecord, bool)\n```\n\n```rescript\n[#one | #three(someRecord, bool) | #two(bool)]\n```" + }, "insertText": "#three(${1:_}, ${2:_})", - "insertTextFormat": 2 - }, { - "label": "#two(_)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "#three(_, _)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "#two(bool)", - "documentation": {"kind": "markdown", "value": "```rescript\n#two(bool)\n```\n\n```rescript\n[#one | #three(someRecord, bool) | #two(bool)]\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\n#two(bool)\n```\n\n```rescript\n[#one | #three(someRecord, bool) | #two(bool)]\n```" + }, "insertText": "#two(${1:_})", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "#two(_)", + "tags": [] + } +] Complete src/Reprod.res 51:24 posCursor:[51:24] posNoWhite:[51:23] Found pattern:[51:21->51:25] @@ -151,45 +223,76 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[resOpt] Path resOpt -[{ - "label": "None", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "someVariant", - "documentation": {"kind": "markdown", "value": "```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```"} - }, { - "label": "Some(_)", + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```" + }, "kind": 12, - "tags": [], + "label": "None", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "someVariant", - "documentation": {"kind": "markdown", "value": "```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```" + }, "insertText": "Some(${1:_})", - "insertTextFormat": 2 - }, { - "label": "Some(One)", - "kind": 4, - "tags": [], + "insertTextFormat": 2, + "kind": 12, + "label": "Some(_)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "One", - "documentation": {"kind": "markdown", "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```" + }, "insertText": "Some(One)", - "insertTextFormat": 2 - }, { - "label": "Some(Two(_))", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "Some(One)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Two(bool)", - "documentation": {"kind": "markdown", "value": "```rescript\nTwo(bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nTwo(bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```" + }, "insertText": "Some(Two(${1:_}))", - "insertTextFormat": 2 - }, { - "label": "Some(Three(_, _))", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "Some(Two(_))", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Three(someRecord, bool)", - "documentation": {"kind": "markdown", "value": "```rescript\nThree(someRecord, bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nThree(someRecord, bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```" + }, "insertText": "Some(Three(${1:_}, ${2:_}))", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "Some(Three(_, _))", + "tags": [] + } +] Complete src/Reprod.res 54:29 posCursor:[54:29] posNoWhite:[54:28] Found pattern:[54:21->54:31] @@ -203,29 +306,48 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[resOpt] Path resOpt -[{ - "label": "One", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "One", - "documentation": {"kind": "markdown", "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nOne\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```" + }, "insertText": "One", - "insertTextFormat": 2 - }, { - "label": "Two(_)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "One", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Two(bool)", - "documentation": {"kind": "markdown", "value": "```rescript\nTwo(bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nTwo(bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```" + }, "insertText": "Two(${1:_})", - "insertTextFormat": 2 - }, { - "label": "Three(_, _)", + "insertTextFormat": 2, "kind": 4, - "tags": [], + "label": "Two(_)", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "Three(someRecord, bool)", - "documentation": {"kind": "markdown", "value": "```rescript\nThree(someRecord, bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```"}, + "documentation": { + "kind": "markdown", + "value": "```rescript\nThree(someRecord, bool)\n```\n\n```rescript\ntype someVariant = One | Two(bool) | Three(someRecord, bool)\n```" + }, "insertText": "Three(${1:_}, ${2:_})", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 4, + "label": "Three(_, _)", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/Rxjs.res.txt b/tests/analysis_tests/tests/src/expected/Rxjs.res.txt index e69de29bb2d..19765bd501b 100644 --- a/tests/analysis_tests/tests/src/expected/Rxjs.res.txt +++ b/tests/analysis_tests/tests/src/expected/Rxjs.res.txt @@ -0,0 +1 @@ +null diff --git a/tests/analysis_tests/tests/src/expected/RxjsCompletion.res.txt b/tests/analysis_tests/tests/src/expected/RxjsCompletion.res.txt index 9ab09fb9993..d587d1bc4c9 100644 --- a/tests/analysis_tests/tests/src/expected/RxjsCompletion.res.txt +++ b/tests/analysis_tests/tests/src/expected/RxjsCompletion.res.txt @@ -1,3 +1,4 @@ +null Complete src/RxjsCompletion.res 26:29 posCursor:[26:29] posNoWhite:[26:28] Found expr:[10:17->38:1] posCursor:[26:29] posNoWhite:[26:28] Found expr:[11:2->32:78] @@ -22,67 +23,108 @@ CPPipe pathFromEnv:Observable found:true Path Rxjs.Observable. Path Rxjs. Path -[{ - "label": "->Observable.subscribe", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 29, "line": 26 }, + "start": { "character": 28, "line": 26 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'t>, 't => unit) => subscription", - "documentation": null, - "sortText": "subscribe", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->Observable.subscribe", - "additionalTextEdits": [{ - "range": {"start": {"line": 26, "character": 28}, "end": {"line": 26, "character": 29}}, - "newText": "" - }] - }, { - "label": "->pipe", "kind": 12, - "tags": [], + "label": "->Observable.subscribe", + "sortText": "subscribe", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 29, "line": 26 }, + "start": { "character": 28, "line": 26 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(Observable.t<'t>, operation<'t, 'u>) => Observable.t<'u>", - "documentation": null, - "sortText": "pipe", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->pipe", - "additionalTextEdits": [{ - "range": {"start": {"line": 26, "character": 28}, "end": {"line": 26, "character": 29}}, - "newText": "" - }] - }, { - "label": "->combineLatest", "kind": 12, - "tags": [], + "label": "->pipe", + "sortText": "pipe", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 29, "line": 26 }, + "start": { "character": 28, "line": 26 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(\n Observable.t<'a>,\n Observable.t<'b>,\n) => Observable.t<('a, 'b)>", - "documentation": null, - "sortText": "combineLatest", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->combineLatest", - "additionalTextEdits": [{ - "range": {"start": {"line": 26, "character": 28}, "end": {"line": 26, "character": 29}}, - "newText": "" - }] - }, { - "label": "->merge", "kind": 12, - "tags": [], + "label": "->combineLatest", + "sortText": "combineLatest", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 29, "line": 26 }, + "start": { "character": 28, "line": 26 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(Observable.t<'t>, Observable.t<'t>) => Observable.t<'t>", - "documentation": null, - "sortText": "merge", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->merge", - "additionalTextEdits": [{ - "range": {"start": {"line": 26, "character": 28}, "end": {"line": 26, "character": 29}}, - "newText": "" - }] - }, { - "label": "->pipe2", "kind": 12, - "tags": [], + "label": "->merge", + "sortText": "merge", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 29, "line": 26 }, + "start": { "character": 28, "line": 26 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(\n Observable.t<'t>,\n operation<'t, 'u>,\n operation<'u, 'i>,\n) => Observable.t<'i>", - "documentation": null, - "sortText": "pipe2", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->pipe2", - "additionalTextEdits": [{ - "range": {"start": {"line": 26, "character": 28}, "end": {"line": 26, "character": 29}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->pipe2", + "sortText": "pipe2", + "tags": [] + } +] Complete src/RxjsCompletion.res 34:30 posCursor:[34:30] posNoWhite:[34:29] Found expr:[10:17->38:1] @@ -105,65 +147,106 @@ CPPipe pathFromEnv:Observable found:true Path Rxjs.Observable. Path Rxjs. Path -[{ - "label": "->Rxjs.Observable.subscribe", - "kind": 12, - "tags": [], +[ + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 30, "line": 34 }, + "start": { "character": 29, "line": 34 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(t<'t>, 't => unit) => subscription", - "documentation": null, - "sortText": "subscribe", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->Rxjs.Observable.subscribe", - "additionalTextEdits": [{ - "range": {"start": {"line": 34, "character": 29}, "end": {"line": 34, "character": 30}}, - "newText": "" - }] - }, { - "label": "->Rxjs.pipe", "kind": 12, - "tags": [], + "label": "->Rxjs.Observable.subscribe", + "sortText": "subscribe", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 30, "line": 34 }, + "start": { "character": 29, "line": 34 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(Observable.t<'t>, operation<'t, 'u>) => Observable.t<'u>", - "documentation": null, - "sortText": "pipe", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->Rxjs.pipe", - "additionalTextEdits": [{ - "range": {"start": {"line": 34, "character": 29}, "end": {"line": 34, "character": 30}}, - "newText": "" - }] - }, { - "label": "->Rxjs.combineLatest", "kind": 12, - "tags": [], + "label": "->Rxjs.pipe", + "sortText": "pipe", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 30, "line": 34 }, + "start": { "character": 29, "line": 34 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(\n Observable.t<'a>,\n Observable.t<'b>,\n) => Observable.t<('a, 'b)>", - "documentation": null, - "sortText": "combineLatest", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->Rxjs.combineLatest", - "additionalTextEdits": [{ - "range": {"start": {"line": 34, "character": 29}, "end": {"line": 34, "character": 30}}, - "newText": "" - }] - }, { - "label": "->Rxjs.merge", "kind": 12, - "tags": [], + "label": "->Rxjs.combineLatest", + "sortText": "combineLatest", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 30, "line": 34 }, + "start": { "character": 29, "line": 34 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(Observable.t<'t>, Observable.t<'t>) => Observable.t<'t>", - "documentation": null, - "sortText": "merge", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->Rxjs.merge", - "additionalTextEdits": [{ - "range": {"start": {"line": 34, "character": 29}, "end": {"line": 34, "character": 30}}, - "newText": "" - }] - }, { - "label": "->Rxjs.pipe2", "kind": 12, - "tags": [], + "label": "->Rxjs.merge", + "sortText": "merge", + "tags": [] + }, + { + "additionalTextEdits": [ + { + "newText": "", + "range": { + "end": { "character": 30, "line": 34 }, + "start": { "character": 29, "line": 34 } + } + } + ], + "data": null, + "deprecated": false, "detail": "(\n Observable.t<'t>,\n operation<'t, 'u>,\n operation<'u, 'i>,\n) => Observable.t<'i>", - "documentation": null, - "sortText": "pipe2", + "documentation": { "kind": "markdown", "value": "" }, "insertText": "->Rxjs.pipe2", - "additionalTextEdits": [{ - "range": {"start": {"line": 34, "character": 29}, "end": {"line": 34, "character": 30}}, - "newText": "" - }] - }] + "kind": 12, + "label": "->Rxjs.pipe2", + "sortText": "pipe2", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/SchemaAssets.res.txt b/tests/analysis_tests/tests/src/expected/SchemaAssets.res.txt index e69de29bb2d..19765bd501b 100644 --- a/tests/analysis_tests/tests/src/expected/SchemaAssets.res.txt +++ b/tests/analysis_tests/tests/src/expected/SchemaAssets.res.txt @@ -0,0 +1 @@ +null diff --git a/tests/analysis_tests/tests/src/expected/ShadowedBelt.res.txt b/tests/analysis_tests/tests/src/expected/ShadowedBelt.res.txt index e69de29bb2d..19765bd501b 100644 --- a/tests/analysis_tests/tests/src/expected/ShadowedBelt.res.txt +++ b/tests/analysis_tests/tests/src/expected/ShadowedBelt.res.txt @@ -0,0 +1 @@ +null diff --git a/tests/analysis_tests/tests/src/expected/SignatureHelp.res.txt b/tests/analysis_tests/tests/src/expected/SignatureHelp.res.txt index cdb8f9a2047..7d6c9cd00f6 100644 --- a/tests/analysis_tests/tests/src/expected/SignatureHelp.res.txt +++ b/tests/analysis_tests/tests/src/expected/SignatureHelp.res.txt @@ -1,3 +1,4 @@ +null Signature help src/SignatureHelp.res 16:20 posCursor:[16:19] posNoWhite:[16:18] Found expr:[16:11->16:20] Pexp_apply ...[16:11->16:19] (...[46:0->16:20]) @@ -13,13 +14,40 @@ extracted params: [( int, ~two: string=?, ~three: unit => unit, ~four: someVariant, unit] { - "signatures": [{ - "label": "(\n int,\n ~two: string=?,\n ~three: unit => unit,\n ~four: someVariant,\n unit,\n) => unit", - "parameters": [{"label": [0, 7], "documentation": {"kind": "markdown", "value": ""}}, {"label": [11, 25], "documentation": {"kind": "markdown", "value": ""}}, {"label": [29, 49], "documentation": {"kind": "markdown", "value": ""}}, {"label": [53, 71], "documentation": {"kind": "markdown", "value": "```rescript\ntype someVariant = One | Two | Three\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C0%2C0%5D)"}}, {"label": [75, 79], "documentation": {"kind": "markdown", "value": ""}}], - "documentation": {"kind": "markdown", "value": " Does stuff. "} - }], + "activeParameter": 0, "activeSignature": 0, - "activeParameter": 0 + "signatures": [ + { + "activeParameter": 0, + "documentation": { "kind": "markdown", "value": " Does stuff. " }, + "label": "(\n int,\n ~two: string=?,\n ~three: unit => unit,\n ~four: someVariant,\n unit,\n) => unit", + "parameters": [ + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 0, 7 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 11, 25 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 29, 49 ] + }, + { + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype someVariant = One | Two | Three\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C0%2C0%5D)" + }, + "label": [ 53, 71 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 75, 79 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 19:21 @@ -37,13 +65,40 @@ extracted params: [( int, ~two: string=?, ~three: unit => unit, ~four: someVariant, unit] { - "signatures": [{ - "label": "(\n int,\n ~two: string=?,\n ~three: unit => unit,\n ~four: someVariant,\n unit,\n) => unit", - "parameters": [{"label": [0, 7], "documentation": {"kind": "markdown", "value": ""}}, {"label": [11, 25], "documentation": {"kind": "markdown", "value": ""}}, {"label": [29, 49], "documentation": {"kind": "markdown", "value": ""}}, {"label": [53, 71], "documentation": {"kind": "markdown", "value": "```rescript\ntype someVariant = One | Two | Three\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C0%2C0%5D)"}}, {"label": [75, 79], "documentation": {"kind": "markdown", "value": ""}}], - "documentation": {"kind": "markdown", "value": " Does stuff. "} - }], + "activeParameter": 0, "activeSignature": 0, - "activeParameter": 0 + "signatures": [ + { + "activeParameter": 0, + "documentation": { "kind": "markdown", "value": " Does stuff. " }, + "label": "(\n int,\n ~two: string=?,\n ~three: unit => unit,\n ~four: someVariant,\n unit,\n) => unit", + "parameters": [ + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 0, 7 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 11, 25 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 29, 49 ] + }, + { + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype someVariant = One | Two | Three\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C0%2C0%5D)" + }, + "label": [ 53, 71 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 75, 79 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 22:29 @@ -61,13 +116,40 @@ extracted params: [( int, ~two: string=?, ~three: unit => unit, ~four: someVariant, unit] { - "signatures": [{ - "label": "(\n int,\n ~two: string=?,\n ~three: unit => unit,\n ~four: someVariant,\n unit,\n) => unit", - "parameters": [{"label": [0, 7], "documentation": {"kind": "markdown", "value": ""}}, {"label": [11, 25], "documentation": {"kind": "markdown", "value": ""}}, {"label": [29, 49], "documentation": {"kind": "markdown", "value": ""}}, {"label": [53, 71], "documentation": {"kind": "markdown", "value": "```rescript\ntype someVariant = One | Two | Three\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C0%2C0%5D)"}}, {"label": [75, 79], "documentation": {"kind": "markdown", "value": ""}}], - "documentation": {"kind": "markdown", "value": " Does stuff. "} - }], + "activeParameter": 1, "activeSignature": 0, - "activeParameter": 1 + "signatures": [ + { + "activeParameter": 1, + "documentation": { "kind": "markdown", "value": " Does stuff. " }, + "label": "(\n int,\n ~two: string=?,\n ~three: unit => unit,\n ~four: someVariant,\n unit,\n) => unit", + "parameters": [ + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 0, 7 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 11, 25 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 29, 49 ] + }, + { + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype someVariant = One | Two | Three\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C0%2C0%5D)" + }, + "label": [ 53, 71 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 75, 79 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 25:33 @@ -85,13 +167,40 @@ extracted params: [( int, ~two: string=?, ~three: unit => unit, ~four: someVariant, unit] { - "signatures": [{ - "label": "(\n int,\n ~two: string=?,\n ~three: unit => unit,\n ~four: someVariant,\n unit,\n) => unit", - "parameters": [{"label": [0, 7], "documentation": {"kind": "markdown", "value": ""}}, {"label": [11, 25], "documentation": {"kind": "markdown", "value": ""}}, {"label": [29, 49], "documentation": {"kind": "markdown", "value": ""}}, {"label": [53, 71], "documentation": {"kind": "markdown", "value": "```rescript\ntype someVariant = One | Two | Three\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C0%2C0%5D)"}}, {"label": [75, 79], "documentation": {"kind": "markdown", "value": ""}}], - "documentation": {"kind": "markdown", "value": " Does stuff. "} - }], + "activeParameter": 1, "activeSignature": 0, - "activeParameter": 1 + "signatures": [ + { + "activeParameter": 1, + "documentation": { "kind": "markdown", "value": " Does stuff. " }, + "label": "(\n int,\n ~two: string=?,\n ~three: unit => unit,\n ~four: someVariant,\n unit,\n) => unit", + "parameters": [ + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 0, 7 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 11, 25 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 29, 49 ] + }, + { + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype someVariant = One | Two | Three\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C0%2C0%5D)" + }, + "label": [ 53, 71 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 75, 79 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 28:38 @@ -109,13 +218,40 @@ extracted params: [( int, ~two: string=?, ~three: unit => unit, ~four: someVariant, unit] { - "signatures": [{ - "label": "(\n int,\n ~two: string=?,\n ~three: unit => unit,\n ~four: someVariant,\n unit,\n) => unit", - "parameters": [{"label": [0, 7], "documentation": {"kind": "markdown", "value": ""}}, {"label": [11, 25], "documentation": {"kind": "markdown", "value": ""}}, {"label": [29, 49], "documentation": {"kind": "markdown", "value": ""}}, {"label": [53, 71], "documentation": {"kind": "markdown", "value": "```rescript\ntype someVariant = One | Two | Three\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C0%2C0%5D)"}}, {"label": [75, 79], "documentation": {"kind": "markdown", "value": ""}}], - "documentation": {"kind": "markdown", "value": " Does stuff. "} - }], + "activeParameter": 3, "activeSignature": 0, - "activeParameter": 3 + "signatures": [ + { + "activeParameter": 3, + "documentation": { "kind": "markdown", "value": " Does stuff. " }, + "label": "(\n int,\n ~two: string=?,\n ~three: unit => unit,\n ~four: someVariant,\n unit,\n) => unit", + "parameters": [ + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 0, 7 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 11, 25 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 29, 49 ] + }, + { + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype someVariant = One | Two | Three\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C0%2C0%5D)" + }, + "label": [ 53, 71 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 75, 79 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 31:42 @@ -133,13 +269,40 @@ extracted params: [( int, ~two: string=?, ~three: unit => unit, ~four: someVariant, unit] { - "signatures": [{ - "label": "(\n int,\n ~two: string=?,\n ~three: unit => unit,\n ~four: someVariant,\n unit,\n) => unit", - "parameters": [{"label": [0, 7], "documentation": {"kind": "markdown", "value": ""}}, {"label": [11, 25], "documentation": {"kind": "markdown", "value": ""}}, {"label": [29, 49], "documentation": {"kind": "markdown", "value": ""}}, {"label": [53, 71], "documentation": {"kind": "markdown", "value": "```rescript\ntype someVariant = One | Two | Three\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C0%2C0%5D)"}}, {"label": [75, 79], "documentation": {"kind": "markdown", "value": ""}}], - "documentation": {"kind": "markdown", "value": " Does stuff. "} - }], + "activeParameter": 3, "activeSignature": 0, - "activeParameter": 3 + "signatures": [ + { + "activeParameter": 3, + "documentation": { "kind": "markdown", "value": " Does stuff. " }, + "label": "(\n int,\n ~two: string=?,\n ~three: unit => unit,\n ~four: someVariant,\n unit,\n) => unit", + "parameters": [ + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 0, 7 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 11, 25 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 29, 49 ] + }, + { + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype someVariant = One | Two | Three\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C0%2C0%5D)" + }, + "label": [ 53, 71 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 75, 79 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 34:21 @@ -156,12 +319,28 @@ argAtCursor: unlabelled<0> extracted params: [(string, int, float] { - "signatures": [{ - "label": "(string, int, float) => unit", - "parameters": [{"label": [0, 7], "documentation": {"kind": "markdown", "value": ""}}, {"label": [9, 12], "documentation": {"kind": "markdown", "value": ""}}, {"label": [14, 19], "documentation": {"kind": "markdown", "value": ""}}] - }], + "activeParameter": 0, "activeSignature": 0, - "activeParameter": 0 + "signatures": [ + { + "activeParameter": 0, + "label": "(string, int, float) => unit", + "parameters": [ + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 0, 7 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 9, 12 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 14, 19 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 37:24 @@ -178,12 +357,28 @@ argAtCursor: unlabelled<0> extracted params: [(string, int, float] { - "signatures": [{ - "label": "(string, int, float) => unit", - "parameters": [{"label": [0, 7], "documentation": {"kind": "markdown", "value": ""}}, {"label": [9, 12], "documentation": {"kind": "markdown", "value": ""}}, {"label": [14, 19], "documentation": {"kind": "markdown", "value": ""}}] - }], + "activeParameter": 0, "activeSignature": 0, - "activeParameter": 0 + "signatures": [ + { + "activeParameter": 0, + "label": "(string, int, float) => unit", + "parameters": [ + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 0, 7 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 9, 12 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 14, 19 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 40:35 @@ -200,12 +395,28 @@ argAtCursor: unlabelled<2> extracted params: [(string, int, float] { - "signatures": [{ - "label": "(string, int, float) => unit", - "parameters": [{"label": [0, 7], "documentation": {"kind": "markdown", "value": ""}}, {"label": [9, 12], "documentation": {"kind": "markdown", "value": ""}}, {"label": [14, 19], "documentation": {"kind": "markdown", "value": ""}}] - }], + "activeParameter": 2, "activeSignature": 0, - "activeParameter": 2 + "signatures": [ + { + "activeParameter": 2, + "label": "(string, int, float) => unit", + "parameters": [ + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 0, 7 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 9, 12 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 14, 19 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 43:33 @@ -222,12 +433,24 @@ argAtCursor: ~age extracted params: [(~age: int, ~name: string] { - "signatures": [{ - "label": "(~age: int, ~name: string) => string", - "parameters": [{"label": [0, 10], "documentation": {"kind": "markdown", "value": ""}}, {"label": [12, 25], "documentation": {"kind": "markdown", "value": ""}}] - }], + "activeParameter": 0, "activeSignature": 0, - "activeParameter": 0 + "signatures": [ + { + "activeParameter": 0, + "label": "(~age: int, ~name: string) => string", + "parameters": [ + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 0, 10 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 12, 25 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 50:24 @@ -244,12 +467,20 @@ argAtCursor: unlabelled<0> extracted params: [string] { - "signatures": [{ - "label": "string => unit", - "parameters": [{"label": [0, 6], "documentation": {"kind": "markdown", "value": ""}}] - }], + "activeParameter": 0, "activeSignature": 0, - "activeParameter": 0 + "signatures": [ + { + "activeParameter": 0, + "label": "string => unit", + "parameters": [ + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 0, 6 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 53:31 @@ -267,12 +498,28 @@ argAtCursor: unlabelled<1> extracted params: [(string, int, float] { - "signatures": [{ - "label": "(string, int, float) => unit", - "parameters": [{"label": [0, 7], "documentation": {"kind": "markdown", "value": ""}}, {"label": [9, 12], "documentation": {"kind": "markdown", "value": ""}}, {"label": [14, 19], "documentation": {"kind": "markdown", "value": ""}}] - }], + "activeParameter": 1, "activeSignature": 0, - "activeParameter": 1 + "signatures": [ + { + "activeParameter": 1, + "label": "(string, int, float) => unit", + "parameters": [ + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 0, 7 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 9, 12 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 14, 19 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 62:17 @@ -289,12 +536,28 @@ argAtCursor: unlabelled<1> extracted params: [(int, string, int] { - "signatures": [{ - "label": "(int, string, int) => unit", - "parameters": [{"label": [0, 4], "documentation": {"kind": "markdown", "value": ""}}, {"label": [6, 12], "documentation": {"kind": "markdown", "value": ""}}, {"label": [14, 17], "documentation": {"kind": "markdown", "value": ""}}] - }], + "activeParameter": 1, "activeSignature": 0, - "activeParameter": 1 + "signatures": [ + { + "activeParameter": 1, + "label": "(int, string, int) => unit", + "parameters": [ + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 0, 4 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 6, 12 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 14, 17 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 65:17 @@ -311,12 +574,28 @@ argAtCursor: unlabelled<1> extracted params: [(int, string, int] { - "signatures": [{ - "label": "(int, string, int) => unit", - "parameters": [{"label": [0, 4], "documentation": {"kind": "markdown", "value": ""}}, {"label": [6, 12], "documentation": {"kind": "markdown", "value": ""}}, {"label": [14, 17], "documentation": {"kind": "markdown", "value": ""}}] - }], + "activeParameter": 1, "activeSignature": 0, - "activeParameter": 1 + "signatures": [ + { + "activeParameter": 1, + "label": "(int, string, int) => unit", + "parameters": [ + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 0, 4 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 6, 12 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 14, 17 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 68:26 @@ -333,12 +612,28 @@ argAtCursor: unlabelled<2> extracted params: [(int, string, int] { - "signatures": [{ - "label": "(int, string, int) => unit", - "parameters": [{"label": [0, 4], "documentation": {"kind": "markdown", "value": ""}}, {"label": [6, 12], "documentation": {"kind": "markdown", "value": ""}}, {"label": [14, 17], "documentation": {"kind": "markdown", "value": ""}}] - }], + "activeParameter": 2, "activeSignature": 0, - "activeParameter": 2 + "signatures": [ + { + "activeParameter": 2, + "label": "(int, string, int) => unit", + "parameters": [ + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 0, 4 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 6, 12 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 14, 17 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 71:29 @@ -357,12 +652,20 @@ argAtCursor: unlabelled<0> extracted params: [string] { - "signatures": [{ - "label": "string => unit", - "parameters": [{"label": [0, 6], "documentation": {"kind": "markdown", "value": ""}}] - }], + "activeParameter": 0, "activeSignature": 0, - "activeParameter": 0 + "signatures": [ + { + "activeParameter": 0, + "label": "string => unit", + "parameters": [ + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 0, 6 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 74:40 @@ -384,90 +687,238 @@ extracted params: [( int, ~two: string=?, ~three: unit => unit, ~four: someVariant, unit] { - "signatures": [{ - "label": "(\n int,\n ~two: string=?,\n ~three: unit => unit,\n ~four: someVariant,\n unit,\n) => unit", - "parameters": [{"label": [0, 7], "documentation": {"kind": "markdown", "value": ""}}, {"label": [11, 25], "documentation": {"kind": "markdown", "value": ""}}, {"label": [29, 49], "documentation": {"kind": "markdown", "value": ""}}, {"label": [53, 71], "documentation": {"kind": "markdown", "value": "```rescript\ntype someVariant = One | Two | Three\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C0%2C0%5D)"}}, {"label": [75, 79], "documentation": {"kind": "markdown", "value": ""}}], - "documentation": {"kind": "markdown", "value": " Does stuff. "} - }], + "activeParameter": 0, "activeSignature": 0, - "activeParameter": 0 + "signatures": [ + { + "activeParameter": 0, + "documentation": { "kind": "markdown", "value": " Does stuff. " }, + "label": "(\n int,\n ~two: string=?,\n ~three: unit => unit,\n ~four: someVariant,\n unit,\n) => unit", + "parameters": [ + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 0, 7 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 11, 25 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 29, 49 ] + }, + { + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype someVariant = One | Two | Three\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C0%2C0%5D)" + }, + "label": [ 53, 71 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 75, 79 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 85:16 { - "signatures": [{ - "label": "One({miss?: bool, hit?: bool, stuff?: string})", - "parameters": [{"label": [0, 0], "documentation": {"kind": "markdown", "value": ""}}, {"label": [5, 16], "documentation": {"kind": "markdown", "value": ""}}, {"label": [18, 28], "documentation": {"kind": "markdown", "value": ""}}, {"label": [30, 44], "documentation": {"kind": "markdown", "value": ""}}], - "documentation": {"kind": "markdown", "value": " One is cool. "} - }], + "activeParameter": -1, "activeSignature": 0, - "activeParameter": -1 + "signatures": [ + { + "activeParameter": -1, + "documentation": { "kind": "markdown", "value": " One is cool. " }, + "label": "One({miss?: bool, hit?: bool, stuff?: string})", + "parameters": [ + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 0, 0 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 5, 16 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 18, 28 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 30, 44 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 88:18 { - "signatures": [{ - "label": "One({miss?: bool, hit?: bool, stuff?: string})", - "parameters": [{"label": [0, 0], "documentation": {"kind": "markdown", "value": ""}}, {"label": [5, 16], "documentation": {"kind": "markdown", "value": ""}}, {"label": [18, 28], "documentation": {"kind": "markdown", "value": ""}}, {"label": [30, 44], "documentation": {"kind": "markdown", "value": ""}}], - "documentation": {"kind": "markdown", "value": " One is cool. "} - }], + "activeParameter": 1, "activeSignature": 0, - "activeParameter": 1 + "signatures": [ + { + "activeParameter": 1, + "documentation": { "kind": "markdown", "value": " One is cool. " }, + "label": "One({miss?: bool, hit?: bool, stuff?: string})", + "parameters": [ + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 0, 0 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 5, 16 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 18, 28 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 30, 44 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 91:23 { - "signatures": [{ - "label": "One({miss?: bool, hit?: bool, stuff?: string})", - "parameters": [{"label": [0, 0], "documentation": {"kind": "markdown", "value": ""}}, {"label": [5, 16], "documentation": {"kind": "markdown", "value": ""}}, {"label": [18, 28], "documentation": {"kind": "markdown", "value": ""}}, {"label": [30, 44], "documentation": {"kind": "markdown", "value": ""}}], - "documentation": {"kind": "markdown", "value": " One is cool. "} - }], + "activeParameter": 2, "activeSignature": 0, - "activeParameter": 2 + "signatures": [ + { + "activeParameter": 2, + "documentation": { "kind": "markdown", "value": " One is cool. " }, + "label": "One({miss?: bool, hit?: bool, stuff?: string})", + "parameters": [ + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 0, 0 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 5, 16 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 18, 28 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 30, 44 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 94:15 { - "signatures": [{ - "label": "Two(mySpecialThing)", - "parameters": [{"label": [4, 18], "documentation": {"kind": "markdown", "value": "```rescript\ntype mySpecialThing = string\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C78%2C0%5D)"}}], - "documentation": {"kind": "markdown", "value": " Two is fun! "} - }], + "activeParameter": 0, "activeSignature": 0, - "activeParameter": 0 + "signatures": [ + { + "activeParameter": 0, + "documentation": { "kind": "markdown", "value": " Two is fun! " }, + "label": "Two(mySpecialThing)", + "parameters": [ + { + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype mySpecialThing = string\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C78%2C0%5D)" + }, + "label": [ 4, 18 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 97:19 { - "signatures": [{ - "label": "Three(mySpecialThing, array>)", - "parameters": [{"label": [6, 20], "documentation": {"kind": "markdown", "value": "```rescript\ntype mySpecialThing = string\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C78%2C0%5D)"}}, {"label": [22, 43], "documentation": {"kind": "markdown", "value": ""}}], - "documentation": {"kind": "markdown", "value": " Three is... three "} - }], + "activeParameter": 0, "activeSignature": 0, - "activeParameter": 0 + "signatures": [ + { + "activeParameter": 0, + "documentation": { "kind": "markdown", "value": " Three is... three " }, + "label": "Three(mySpecialThing, array>)", + "parameters": [ + { + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype mySpecialThing = string\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C78%2C0%5D)" + }, + "label": [ 6, 20 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 22, 43 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 100:24 { - "signatures": [{ - "label": "Three(mySpecialThing, array>)", - "parameters": [{"label": [6, 20], "documentation": {"kind": "markdown", "value": "```rescript\ntype mySpecialThing = string\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C78%2C0%5D)"}}, {"label": [22, 43], "documentation": {"kind": "markdown", "value": ""}}], - "documentation": {"kind": "markdown", "value": " Three is... three "} - }], + "activeParameter": 1, "activeSignature": 0, - "activeParameter": 1 + "signatures": [ + { + "activeParameter": 1, + "documentation": { "kind": "markdown", "value": " Three is... three " }, + "label": "Three(mySpecialThing, array>)", + "parameters": [ + { + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype mySpecialThing = string\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C78%2C0%5D)" + }, + "label": [ 6, 20 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 22, 43 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 105:9 { - "signatures": [{ - "label": "One({miss?: bool, hit?: bool, stuff?: string})", - "parameters": [{"label": [0, 0], "documentation": {"kind": "markdown", "value": ""}}, {"label": [5, 16], "documentation": {"kind": "markdown", "value": ""}}, {"label": [18, 28], "documentation": {"kind": "markdown", "value": ""}}, {"label": [30, 44], "documentation": {"kind": "markdown", "value": ""}}], - "documentation": {"kind": "markdown", "value": " One is cool. "} - }], + "activeParameter": -1, "activeSignature": 0, - "activeParameter": -1 + "signatures": [ + { + "activeParameter": -1, + "documentation": { "kind": "markdown", "value": " One is cool. " }, + "label": "One({miss?: bool, hit?: bool, stuff?: string})", + "parameters": [ + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 0, 0 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 5, 16 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 18, 28 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 30, 44 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 113:42 @@ -475,13 +926,28 @@ argAtCursor: unlabelled<1> extracted params: [(array, int => int] { - "signatures": [{ - "label": "(array, int => int) => array", - "parameters": [{"label": [0, 11], "documentation": {"kind": "markdown", "value": ""}}, {"label": [13, 23], "documentation": {"kind": "markdown", "value": ""}}], - "documentation": {"kind": "markdown", "value": "\n`map(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray = array->Array.map(greeting => greeting ++ \" to you\")\n\nmappedArray == [\"Hello to you\", \"Hi to you\", \"Good bye to you\"]\n```\n"} - }], + "activeParameter": 1, "activeSignature": 0, - "activeParameter": 1 + "signatures": [ + { + "activeParameter": 1, + "documentation": { + "kind": "markdown", + "value": "\n`map(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray = array->Array.map(greeting => greeting ++ \" to you\")\n\nmappedArray == [\"Hello to you\", \"Hi to you\", \"Good bye to you\"]\n```\n" + }, + "label": "(array, int => int) => array", + "parameters": [ + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 0, 11 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 13, 23 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 132:18 @@ -489,13 +955,31 @@ argAtCursor: unlabelled<0> extracted params: [(x, tt] { - "signatures": [{ - "label": "(x, tt) => string", - "parameters": [{"label": [0, 2], "documentation": {"kind": "markdown", "value": "```rescript\ntype x = {age?: int, name?: string}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C117%2C0%5D)"}}, {"label": [4, 6], "documentation": {"kind": "markdown", "value": "```rescript\ntype tt = One\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C123%2C0%5D)"}}], - "documentation": {"kind": "markdown", "value": " Some stuff "} - }], + "activeParameter": 0, "activeSignature": 0, - "activeParameter": 0 + "signatures": [ + { + "activeParameter": 0, + "documentation": { "kind": "markdown", "value": " Some stuff " }, + "label": "(x, tt) => string", + "parameters": [ + { + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype x = {age?: int, name?: string}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C117%2C0%5D)" + }, + "label": [ 0, 2 ] + }, + { + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype tt = One\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C123%2C0%5D)" + }, + "label": [ 4, 6 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 135:22 @@ -503,100 +987,232 @@ argAtCursor: unlabelled<1> extracted params: [(x, tt] { - "signatures": [{ - "label": "(x, tt) => string", - "parameters": [{"label": [0, 2], "documentation": {"kind": "markdown", "value": "```rescript\ntype x = {age?: int, name?: string}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C117%2C0%5D)"}}, {"label": [4, 6], "documentation": {"kind": "markdown", "value": "```rescript\ntype tt = One\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C123%2C0%5D)"}}], - "documentation": {"kind": "markdown", "value": " Some stuff "} - }], + "activeParameter": 1, "activeSignature": 0, - "activeParameter": 1 + "signatures": [ + { + "activeParameter": 1, + "documentation": { "kind": "markdown", "value": " Some stuff " }, + "label": "(x, tt) => string", + "parameters": [ + { + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype x = {age?: int, name?: string}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C117%2C0%5D)" + }, + "label": [ 0, 2 ] + }, + { + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype tt = One\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C123%2C0%5D)" + }, + "label": [ 4, 6 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 139:8 { - "signatures": [{ - "label": "One({miss?: bool, hit?: bool, stuff?: string})", - "parameters": [{"label": [0, 0], "documentation": {"kind": "markdown", "value": ""}}, {"label": [5, 16], "documentation": {"kind": "markdown", "value": ""}}, {"label": [18, 28], "documentation": {"kind": "markdown", "value": ""}}, {"label": [30, 44], "documentation": {"kind": "markdown", "value": ""}}], - "documentation": {"kind": "markdown", "value": " One is cool. "} - }], + "activeParameter": 2, "activeSignature": 0, - "activeParameter": 2 + "signatures": [ + { + "activeParameter": 2, + "documentation": { "kind": "markdown", "value": " One is cool. " }, + "label": "One({miss?: bool, hit?: bool, stuff?: string})", + "parameters": [ + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 0, 0 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 5, 16 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 18, 28 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 30, 44 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 141:7 { - "signatures": [{ - "label": "One({miss?: bool, hit?: bool, stuff?: string})", - "parameters": [{"label": [0, 0], "documentation": {"kind": "markdown", "value": ""}}, {"label": [5, 16], "documentation": {"kind": "markdown", "value": ""}}, {"label": [18, 28], "documentation": {"kind": "markdown", "value": ""}}, {"label": [30, 44], "documentation": {"kind": "markdown", "value": ""}}], - "documentation": {"kind": "markdown", "value": " One is cool. "} - }], + "activeParameter": 0, "activeSignature": 0, - "activeParameter": 0 + "signatures": [ + { + "activeParameter": 0, + "documentation": { "kind": "markdown", "value": " One is cool. " }, + "label": "One({miss?: bool, hit?: bool, stuff?: string})", + "parameters": [ + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 0, 0 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 5, 16 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 18, 28 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 30, 44 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 143:7 { - "signatures": [{ - "label": "Two(mySpecialThing)", - "parameters": [{"label": [4, 18], "documentation": {"kind": "markdown", "value": "```rescript\ntype mySpecialThing = string\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C78%2C0%5D)"}}], - "documentation": {"kind": "markdown", "value": " Two is fun! "} - }], + "activeParameter": 0, "activeSignature": 0, - "activeParameter": 0 + "signatures": [ + { + "activeParameter": 0, + "documentation": { "kind": "markdown", "value": " Two is fun! " }, + "label": "Two(mySpecialThing)", + "parameters": [ + { + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype mySpecialThing = string\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C78%2C0%5D)" + }, + "label": [ 4, 18 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 145:9 { - "signatures": [{ - "label": "Three(mySpecialThing, array>)", - "parameters": [{"label": [6, 20], "documentation": {"kind": "markdown", "value": "```rescript\ntype mySpecialThing = string\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C78%2C0%5D)"}}, {"label": [22, 43], "documentation": {"kind": "markdown", "value": ""}}], - "documentation": {"kind": "markdown", "value": " Three is... three "} - }], + "activeParameter": 0, "activeSignature": 0, - "activeParameter": 0 + "signatures": [ + { + "activeParameter": 0, + "documentation": { "kind": "markdown", "value": " Three is... three " }, + "label": "Three(mySpecialThing, array>)", + "parameters": [ + { + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype mySpecialThing = string\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C78%2C0%5D)" + }, + "label": [ 6, 20 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 22, 43 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 147:12 { - "signatures": [{ - "label": "Three(mySpecialThing, array>)", - "parameters": [{"label": [6, 20], "documentation": {"kind": "markdown", "value": "```rescript\ntype mySpecialThing = string\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C78%2C0%5D)"}}, {"label": [22, 43], "documentation": {"kind": "markdown", "value": ""}}], - "documentation": {"kind": "markdown", "value": " Three is... three "} - }], + "activeParameter": 1, "activeSignature": 0, - "activeParameter": 1 + "signatures": [ + { + "activeParameter": 1, + "documentation": { "kind": "markdown", "value": " Three is... three " }, + "label": "Three(mySpecialThing, array>)", + "parameters": [ + { + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype mySpecialThing = string\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C78%2C0%5D)" + }, + "label": [ 6, 20 ] + }, + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 22, 43 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 151:14 { - "signatures": [{ - "label": "Ok(bool)", - "parameters": [{"label": [3, 7], "documentation": {"kind": "markdown", "value": ""}}], - "documentation": {"kind": "markdown", "value": "```rescript\nresult\n```"} - }], + "activeParameter": 0, "activeSignature": 0, - "activeParameter": 0 + "signatures": [ + { + "activeParameter": 0, + "documentation": { + "kind": "markdown", + "value": "```rescript\nresult\n```" + }, + "label": "Ok(bool)", + "parameters": [ + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 3, 7 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 154:19 { - "signatures": [{ - "label": "Error(string)", - "parameters": [{"label": [6, 12], "documentation": {"kind": "markdown", "value": ""}}], - "documentation": {"kind": "markdown", "value": "```rescript\nresult<'a, string>\n```"} - }], + "activeParameter": 0, "activeSignature": 0, - "activeParameter": 0 + "signatures": [ + { + "activeParameter": 0, + "documentation": { + "kind": "markdown", + "value": "```rescript\nresult<'a, string>\n```" + }, + "label": "Error(string)", + "parameters": [ + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 6, 12 ] + } + ] + } + ] } Signature help src/SignatureHelp.res 157:16 { - "signatures": [{ - "label": "Some(bool)", - "parameters": [{"label": [5, 9], "documentation": {"kind": "markdown", "value": ""}}], - "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"} - }], + "activeParameter": 0, "activeSignature": 0, - "activeParameter": 0 + "signatures": [ + { + "activeParameter": 0, + "documentation": { + "kind": "markdown", + "value": "```rescript\noption\n```" + }, + "label": "Some(bool)", + "parameters": [ + { + "documentation": { "kind": "markdown", "value": "" }, + "label": [ 5, 9 ] + } + ] + } + ] } diff --git a/tests/analysis_tests/tests/src/expected/Support.res.txt b/tests/analysis_tests/tests/src/expected/Support.res.txt index e69de29bb2d..19765bd501b 100644 --- a/tests/analysis_tests/tests/src/expected/Support.res.txt +++ b/tests/analysis_tests/tests/src/expected/Support.res.txt @@ -0,0 +1 @@ +null diff --git a/tests/analysis_tests/tests/src/expected/TableclothMap.res.txt b/tests/analysis_tests/tests/src/expected/TableclothMap.res.txt index e69de29bb2d..19765bd501b 100644 --- a/tests/analysis_tests/tests/src/expected/TableclothMap.res.txt +++ b/tests/analysis_tests/tests/src/expected/TableclothMap.res.txt @@ -0,0 +1 @@ +null diff --git a/tests/analysis_tests/tests/src/expected/TableclothMap.resi.txt b/tests/analysis_tests/tests/src/expected/TableclothMap.resi.txt index e69de29bb2d..19765bd501b 100644 --- a/tests/analysis_tests/tests/src/expected/TableclothMap.resi.txt +++ b/tests/analysis_tests/tests/src/expected/TableclothMap.resi.txt @@ -0,0 +1 @@ +null diff --git a/tests/analysis_tests/tests/src/expected/TypeArgCtx.res.txt b/tests/analysis_tests/tests/src/expected/TypeArgCtx.res.txt index be53ba25ba4..b25c3cc3298 100644 --- a/tests/analysis_tests/tests/src/expected/TypeArgCtx.res.txt +++ b/tests/analysis_tests/tests/src/expected/TypeArgCtx.res.txt @@ -1,3 +1,4 @@ +null Complete src/TypeArgCtx.res 7:36 posCursor:[7:36] posNoWhite:[7:35] Found pattern:[7:26->7:39] Ppat_construct Ok:[7:26->7:28] @@ -7,14 +8,21 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[catchResult] Path catchResult -[{ - "label": "{}", - "kind": 22, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "someTyp", - "documentation": {"kind": "markdown", "value": "```rescript\ntype someTyp = {test: bool}\n```"}, - "sortText": "A", + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype someTyp = {test: bool}\n```" + }, "insertText": "{$0}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 22, + "label": "{}", + "sortText": "A", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/TypeAtPosCompletion.res.txt b/tests/analysis_tests/tests/src/expected/TypeAtPosCompletion.res.txt index 499d5fa4b12..a3a546b7c58 100644 --- a/tests/analysis_tests/tests/src/expected/TypeAtPosCompletion.res.txt +++ b/tests/analysis_tests/tests/src/expected/TypeAtPosCompletion.res.txt @@ -1,22 +1,36 @@ +null Complete src/TypeAtPosCompletion.res 7:17 posCursor:[7:17] posNoWhite:[7:15] Found expr:[6:16->9:1] Completable: Cexpression CTypeAtPos()->recordBody Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath CTypeAtPos() -[{ - "label": "age", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nage?: int\n```\n\n```rescript\ntype optRecord = {name: string, age: option, online: option}\n```"} - }, { - "label": "online", + "documentation": { + "kind": "markdown", + "value": "```rescript\nage?: int\n```\n\n```rescript\ntype optRecord = {name: string, age: option, online: option}\n```" + }, "kind": 5, - "tags": [], + "label": "age", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": {"kind": "markdown", "value": "```rescript\nonline?: bool\n```\n\n```rescript\ntype optRecord = {name: string, age: option, online: option}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nonline?: bool\n```\n\n```rescript\ntype optRecord = {name: string, age: option, online: option}\n```" + }, + "kind": 5, + "label": "online", + "tags": [] + } +] Complete src/TypeAtPosCompletion.res 16:18 posCursor:[16:18] posNoWhite:[16:16] Found expr:[13:8->19:1] @@ -26,19 +40,32 @@ Completable: Cexpression CTypeAtPos()->variantPayload::One($1), recordBody Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath CTypeAtPos() -[{ - "label": "age", - "kind": 5, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": {"kind": "markdown", "value": "```rescript\nage?: int\n```\n\n```rescript\ntype optRecord = {name: string, age: option, online: option}\n```"} - }, { - "label": "online", + "documentation": { + "kind": "markdown", + "value": "```rescript\nage?: int\n```\n\n```rescript\ntype optRecord = {name: string, age: option, online: option}\n```" + }, "kind": 5, - "tags": [], + "label": "age", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": {"kind": "markdown", "value": "```rescript\nonline?: bool\n```\n\n```rescript\ntype optRecord = {name: string, age: option, online: option}\n```"} - }] + "documentation": { + "kind": "markdown", + "value": "```rescript\nonline?: bool\n```\n\n```rescript\ntype optRecord = {name: string, age: option, online: option}\n```" + }, + "kind": 5, + "label": "online", + "tags": [] + } +] Complete src/TypeAtPosCompletion.res 22:12 posCursor:[22:12] posNoWhite:[22:11] Found expr:[21:10->24:1] @@ -46,14 +73,21 @@ Completable: Cexpression CTypeAtPos()->array Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath CTypeAtPos() -[{ - "label": "{}", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "optRecord", - "documentation": {"kind": "markdown", "value": "```rescript\ntype optRecord = {name: string, age: option, online: option}\n```"}, - "sortText": "A", + "documentation": { + "kind": "markdown", + "value": "```rescript\ntype optRecord = {name: string, age: option, online: option}\n```" + }, "insertText": "{$0}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "{}", + "sortText": "A", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests/src/expected/TypeDefinition.res.txt b/tests/analysis_tests/tests/src/expected/TypeDefinition.res.txt index 46a968e8f35..0ef64e8dc8b 100644 --- a/tests/analysis_tests/tests/src/expected/TypeDefinition.res.txt +++ b/tests/analysis_tests/tests/src/expected/TypeDefinition.res.txt @@ -1,18 +1,55 @@ +null TypeDefinition src/TypeDefinition.res 2:9 -{"uri": "TypeDefinition.res", "range": {"start": {"line": 2, "character": 5}, "end": {"line": 2, "character": 11}}} +{ + "range": { + "end": { "character": 11, "line": 2 }, + "start": { "character": 5, "line": 2 } + }, + "uri": "file:///TypeDefinition.res" +} TypeDefinition src/TypeDefinition.res 5:4 -{"uri": "TypeDefinition.res", "range": {"start": {"line": 0, "character": 0}, "end": {"line": 0, "character": 24}}} +{ + "range": { + "end": { "character": 24, "line": 0 }, + "start": { "character": 0, "line": 0 } + }, + "uri": "file:///TypeDefinition.res" +} TypeDefinition src/TypeDefinition.res 8:4 -{"uri": "TypeDefinition.res", "range": {"start": {"line": 2, "character": 0}, "end": {"line": 2, "character": 28}}} +{ + "range": { + "end": { "character": 28, "line": 2 }, + "start": { "character": 0, "line": 2 } + }, + "uri": "file:///TypeDefinition.res" +} TypeDefinition src/TypeDefinition.res 13:4 -{"uri": "TypeDefinition.res", "range": {"start": {"line": 11, "character": 0}, "end": {"line": 11, "character": 26}}} +{ + "range": { + "end": { "character": 26, "line": 11 }, + "start": { "character": 0, "line": 11 } + }, + "uri": "file:///TypeDefinition.res" +} TypeDefinition src/TypeDefinition.res 16:13 -{"uri": "TypeDefinition.res", "range": {"start": {"line": 2, "character": 0}, "end": {"line": 2, "character": 28}}} +{ + "range": { + "end": { "character": 28, "line": 2 }, + "start": { "character": 0, "line": 2 } + }, + "uri": "file:///TypeDefinition.res" +} TypeDefinition src/TypeDefinition.res 20:9 -{"uri": "TypeDefinition.res", "range": {"start": {"line": 0, "character": 0}, "end": {"line": 0, "character": 24}}} +{ + "range": { + "end": { "character": 24, "line": 0 }, + "start": { "character": 0, "line": 0 } + }, + "uri": "file:///TypeDefinition.res" +} diff --git a/tests/analysis_tests/tests/src/expected/Xform.res.txt b/tests/analysis_tests/tests/src/expected/Xform.res.txt index 606adcdd07e..2a7b331cbb4 100644 --- a/tests/analysis_tests/tests/src/expected/Xform.res.txt +++ b/tests/analysis_tests/tests/src/expected/Xform.res.txt @@ -1,3 +1,4 @@ +null Xform src/Xform.res 6:5 posCursor:[6:3] posNoWhite:[6:1] Found expr:[6:0->11:1] Completable: Cpath Value[kind] @@ -9,8 +10,8 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Hit: Replace with switch -TextDocumentEdit: Xform.res -{"start": {"line": 6, "character": 0}, "end": {"line": 11, "character": 1}} +TextDocumentEdit: file:///src/Xform.res +{"end":{"character":1,"line":11},"start":{"character":0,"line":6}} newText: <--here switch kind { @@ -23,8 +24,8 @@ switch kind { Xform src/Xform.res 13:15 Hit: Replace with switch -TextDocumentEdit: Xform.res -{"start": {"line": 13, "character": 0}, "end": {"line": 13, "character": 79}} +TextDocumentEdit: file:///src/Xform.res +{"end":{"character":79,"line":13},"start":{"character":0,"line":13}} newText: <--here switch kind { @@ -35,15 +36,15 @@ switch kind { Xform src/Xform.res 16:5 Hit: Add type annotation -TextDocumentEdit: Xform.res -{"start": {"line": 16, "character": 8}, "end": {"line": 16, "character": 8}} +TextDocumentEdit: file:///src/Xform.res +{"end":{"character":8,"line":16},"start":{"character":8,"line":16}} newText: <--here : string Hit: Add Documentation template -TextDocumentEdit: Xform.res -{"start": {"line": 16, "character": 0}, "end": {"line": 16, "character": 18}} +TextDocumentEdit: file:///src/Xform.res +{"end":{"character":18,"line":16},"start":{"character":0,"line":16}} newText: <--here /** @@ -54,8 +55,8 @@ let name = "hello" Xform src/Xform.res 19:5 Hit: Add Documentation template -TextDocumentEdit: Xform.res -{"start": {"line": 19, "character": 0}, "end": {"line": 19, "character": 23}} +TextDocumentEdit: file:///src/Xform.res +{"end":{"character":23,"line":19},"start":{"character":0,"line":19}} newText: <--here /** @@ -66,8 +67,8 @@ let annotated: int = 34 Xform src/Xform.res 26:10 Hit: Add type annotation -TextDocumentEdit: Xform.res -{"start": {"line": 26, "character": 10}, "end": {"line": 26, "character": 11}} +TextDocumentEdit: file:///src/Xform.res +{"end":{"character":11,"line":26},"start":{"character":10,"line":26}} newText: <--here (x: option) @@ -75,8 +76,8 @@ newText: Xform src/Xform.res 30:9 Hit: Add braces to function -TextDocumentEdit: Xform.res -{"start": {"line": 26, "character": 0}, "end": {"line": 32, "character": 3}} +TextDocumentEdit: file:///src/Xform.res +{"end":{"character":3,"line":32},"start":{"character":0,"line":26}} newText: <--here let foo = x => { @@ -91,8 +92,8 @@ let foo = x => { Xform src/Xform.res 34:21 Hit: Add type annotation -TextDocumentEdit: Xform.res -{"start": {"line": 34, "character": 24}, "end": {"line": 34, "character": 24}} +TextDocumentEdit: file:///src/Xform.res +{"end":{"character":24,"line":34},"start":{"character":24,"line":34}} newText: <--here : int @@ -100,8 +101,8 @@ newText: Xform src/Xform.res 38:5 Hit: Add Documentation template -TextDocumentEdit: Xform.res -{"start": {"line": 37, "character": 0}, "end": {"line": 38, "character": 40}} +TextDocumentEdit: file:///src/Xform.res +{"end":{"character":40,"line":38},"start":{"character":0,"line":37}} newText: <--here /** @@ -113,8 +114,8 @@ let make = (~name) => React.string(name) Xform src/Xform.res 41:9 Hit: Add type annotation -TextDocumentEdit: Xform.res -{"start": {"line": 41, "character": 11}, "end": {"line": 41, "character": 11}} +TextDocumentEdit: file:///src/Xform.res +{"end":{"character":11,"line":41},"start":{"character":11,"line":41}} newText: <--here : int @@ -130,8 +131,8 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Hit: Add braces to function -TextDocumentEdit: Xform.res -{"start": {"line": 48, "character": 0}, "end": {"line": 48, "character": 25}} +TextDocumentEdit: file:///src/Xform.res +{"end":{"character":25,"line":48},"start":{"character":0,"line":48}} newText: <--here let noBraces = () => { @@ -141,8 +142,8 @@ let noBraces = () => { Xform src/Xform.res 52:34 Hit: Add braces to function -TextDocumentEdit: Xform.res -{"start": {"line": 51, "character": 0}, "end": {"line": 54, "character": 1}} +TextDocumentEdit: file:///src/Xform.res +{"end":{"character":1,"line":54},"start":{"character":0,"line":51}} newText: <--here let nested = () => { @@ -155,8 +156,8 @@ let nested = () => { Xform src/Xform.res 62:6 Hit: Add braces to function -TextDocumentEdit: Xform.res -{"start": {"line": 58, "character": 4}, "end": {"line": 62, "character": 7}} +TextDocumentEdit: file:///src/Xform.res +{"end":{"character":7,"line":62},"start":{"character":4,"line":58}} newText: <--here let foo = (_x, y, _z) => { @@ -169,10 +170,10 @@ newText: Xform src/Xform.res 72:5 Hit: Extract local module "ExtractableModule" to file "ExtractableModule.res" -CreateFile: ExtractableModule.res +CreateFile: file:///src/ExtractableModule.res -TextDocumentEdit: ExtractableModule.res -{"start": {"line": 0, "character": 0}, "end": {"line": 0, "character": 0}} +TextDocumentEdit: file:///src/ExtractableModule.res +{"end":{"character":1,"line":74},"start":{"character":0,"line":68}} newText: <--here /** Doc comment. */ @@ -182,8 +183,8 @@ let doStuff = a => a + 1 // ^xfm -TextDocumentEdit: src/Xform.res -{"start": {"line": 68, "character": 0}, "end": {"line": 74, "character": 1}} +TextDocumentEdit: file:///src/Xform.res +{"end":{"character":1,"line":74},"start":{"character":0,"line":68}} newText: <--here @@ -199,8 +200,8 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Hit: Expand catch-all -TextDocumentEdit: Xform.res -{"start": {"line": 80, "character": 2}, "end": {"line": 80, "character": 3}} +TextDocumentEdit: file:///src/Xform.res +{"end":{"character":3,"line":80},"start":{"character":2,"line":80}} newText: <--here Second | Third | Fourth(_) @@ -216,8 +217,8 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Hit: Expand catch-all -TextDocumentEdit: Xform.res -{"start": {"line": 86, "character": 2}, "end": {"line": 86, "character": 3}} +TextDocumentEdit: file:///src/Xform.res +{"end":{"character":3,"line":86},"start":{"character":2,"line":86}} newText: <--here Third | Fourth(_) @@ -233,8 +234,8 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Hit: Expand catch-all -TextDocumentEdit: Xform.res -{"start": {"line": 93, "character": 2}, "end": {"line": 93, "character": 3}} +TextDocumentEdit: file:///src/Xform.res +{"end":{"character":3,"line":93},"start":{"character":2,"line":93}} newText: <--here First | Third | Fourth(_) @@ -250,8 +251,8 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Hit: Expand catch-all -TextDocumentEdit: Xform.res -{"start": {"line": 101, "character": 2}, "end": {"line": 101, "character": 3}} +TextDocumentEdit: file:///src/Xform.res +{"end":{"character":3,"line":101},"start":{"character":2,"line":101}} newText: <--here #second | #"illegal identifier" | #third(_) @@ -267,8 +268,8 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Hit: Expand catch-all -TextDocumentEdit: Xform.res -{"start": {"line": 107, "character": 2}, "end": {"line": 107, "character": 3}} +TextDocumentEdit: file:///src/Xform.res +{"end":{"character":3,"line":107},"start":{"character":2,"line":107}} newText: <--here #"illegal identifier" | #third(_) @@ -284,8 +285,8 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Hit: Expand catch-all -TextDocumentEdit: Xform.res -{"start": {"line": 115, "character": 2}, "end": {"line": 115, "character": 3}} +TextDocumentEdit: file:///src/Xform.res +{"end":{"character":3,"line":115},"start":{"character":2,"line":115}} newText: <--here Some(Second | Third | Fourth(_)) | None @@ -301,8 +302,8 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Hit: Expand catch-all -TextDocumentEdit: Xform.res -{"start": {"line": 121, "character": 2}, "end": {"line": 121, "character": 3}} +TextDocumentEdit: file:///src/Xform.res +{"end":{"character":3,"line":121},"start":{"character":2,"line":121}} newText: <--here Some(Third | Fourth(_)) | None @@ -318,8 +319,8 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Hit: Expand catch-all -TextDocumentEdit: Xform.res -{"start": {"line": 127, "character": 2}, "end": {"line": 127, "character": 3}} +TextDocumentEdit: file:///src/Xform.res +{"end":{"character":3,"line":127},"start":{"character":2,"line":127}} newText: <--here Some(Third | Fourth(_)) | None @@ -335,8 +336,8 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Hit: Expand catch-all -TextDocumentEdit: Xform.res -{"start": {"line": 136, "character": 2}, "end": {"line": 136, "character": 3}} +TextDocumentEdit: file:///src/Xform.res +{"end":{"character":3,"line":136},"start":{"character":2,"line":136}} newText: <--here Some(#"illegal identifier" | #second | #third(_)) @@ -352,8 +353,8 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Hit: Expand catch-all -TextDocumentEdit: Xform.res -{"start": {"line": 142, "character": 2}, "end": {"line": 142, "character": 3}} +TextDocumentEdit: file:///src/Xform.res +{"end":{"character":3,"line":142},"start":{"character":2,"line":142}} newText: <--here Some(#"illegal identifier" | #third(_)) | None diff --git a/tests/analysis_tests/tests/src/expected/typeConstraint.res.txt b/tests/analysis_tests/tests/src/expected/typeConstraint.res.txt index e69de29bb2d..19765bd501b 100644 --- a/tests/analysis_tests/tests/src/expected/typeConstraint.res.txt +++ b/tests/analysis_tests/tests/src/expected/typeConstraint.res.txt @@ -0,0 +1 @@ +null diff --git a/tests/docstring_tests/DocTest.res.js b/tests/docstring_tests/DocTest.res.js index dbe11a97ee1..d9ef83c5ae2 100644 --- a/tests/docstring_tests/DocTest.res.js +++ b/tests/docstring_tests/DocTest.res.js @@ -15,6 +15,7 @@ import * as Primitive_string from "@rescript/runtime/lib/es6/Primitive_string.mj import * as Promises from "node:fs/promises"; import * as Primitive_exceptions from "@rescript/runtime/lib/es6/Primitive_exceptions.mjs"; import * as BinsJs from "../../cli/common/bins.js"; +import * as RescriptTools_ExtractCodeBlocks from "@rescript/runtime/lib/es6/RescriptTools_ExtractCodeBlocks.mjs"; let rescript_tools_exe = BinsJs.rescript_tools_exe; @@ -45,7 +46,7 @@ async function extractDocFromFile(file) { "--transform-assert-equal" ], undefined); try { - return JSON.parse(getOutput(match.stdout)); + return RescriptTools_ExtractCodeBlocks.decodeFromJson(JSON.parse(getOutput(match.stdout))); } catch (raw_e) { let e = Primitive_exceptions.internalToException(raw_e); if (e.RE_EXN_ID === "JsExn") { diff --git a/tests/ounit_tests/ounit_json_tests.ml b/tests/ounit_tests/ounit_json_tests.ml index e096bce0757..c33b4068e7e 100644 --- a/tests/ounit_tests/ounit_json_tests.ml +++ b/tests/ounit_tests/ounit_json_tests.ml @@ -4,11 +4,11 @@ let suites = __FILE__ >::: [ ( "escape 'hello'" >:: fun _ -> - let escaped = Json.escape "hello" in - let expected = "hello" in + let escaped = `String "hello" |> Yojson.Safe.to_string in + let expected = "\"hello\"" in OUnit.assert_equal escaped expected ); ( "escape \\x17" >:: fun _ -> - let escaped = Json.escape "\x17" in - let expected = "\\u0017" in + let escaped = `String "\x17" |> Yojson.Safe.to_string in + let expected = "\"\\u0017\"" in OUnit.assert_equal escaped expected ); ] diff --git a/tools/bin/main.ml b/tools/bin/main.ml index 130ce24ac74..dcc1a3b71bf 100644 --- a/tools/bin/main.ml +++ b/tools/bin/main.ml @@ -155,21 +155,14 @@ let main () = | "extract-codeblocks" :: rest -> ( match rest with | ["-h"] | ["--help"] -> logAndExit (Ok extractCodeblocksHelp) - | path :: args -> ( + | path :: args -> let transformAssertEqual = List.mem "--transform-assert-equal" args in Clflags.color := Some Misc.Color.Never; (* TODO: Add result/JSON mode *) - match - Tools.ExtractCodeblocks.extractCodeblocksFromFile ~transformAssertEqual - ~entryPointFile:path - with - | Ok _ as r -> - print_endline (Analysis.Protocol.stringifyResult r); - exit 0 - | Error _ as r -> - print_endline (Analysis.Protocol.stringifyResult r); - exit 1) + Tools.ExtractCodeblocks.extractCodeblocksFromFile ~transformAssertEqual + ~entryPointFile:path + |> logAndExit | _ -> logAndExit (Error extractCodeblocksHelp)) | "reanalyze" :: _ -> if Sys.getenv_opt "RESCRIPT_REANALYZE_NO_SERVER" = Some "1" then ( diff --git a/tools/src/tools.ml b/tools/src/tools.ml index eb591aa9123..7d611c21da6 100644 --- a/tools/src/tools.ml +++ b/tools/src/tools.ml @@ -77,244 +77,196 @@ and docsForModule = { } let stringifyDocstrings docstrings = - let open Protocol in - docstrings - |> List.map (fun docstring -> docstring |> String.trim |> wrapInQuotes) - |> array + `List + (docstrings + |> List.map (fun docstring -> `String (docstring |> String.trim))) -let stringifyFieldDoc ~indentation (fieldDoc : fieldDoc) = - let open Protocol in - stringifyObject ~indentation:(indentation + 1) +let stringifyFieldDoc (fieldDoc : fieldDoc) = + `Assoc [ - ("name", Some (wrapInQuotes fieldDoc.fieldName)); + ("name", `String fieldDoc.fieldName); ( "deprecated", match fieldDoc.deprecated with - | Some d -> Some (wrapInQuotes d) - | None -> None ); - ("optional", Some (string_of_bool fieldDoc.optional)); - ("docstrings", Some (stringifyDocstrings fieldDoc.docstrings)); - ("signature", Some (wrapInQuotes fieldDoc.signature)); + | Some d -> `String d + | None -> `Null ); + ("optional", `String (string_of_bool fieldDoc.optional)); + ("docstrings", stringifyDocstrings fieldDoc.docstrings); + ("signature", `String fieldDoc.signature); ] -let stringifyConstructorPayload ~indentation - (constructorPayload : constructorPayload) = - let open Protocol in +let stringifyConstructorPayload (constructorPayload : constructorPayload) = match constructorPayload with | InlineRecord {fieldDocs} -> - stringifyObject ~indentation:(indentation + 1) + `Assoc [ - ("kind", Some (wrapInQuotes "inlineRecord")); - ( "fields", - Some - (fieldDocs - |> List.map (stringifyFieldDoc ~indentation:(indentation + 1)) - |> array) ); + ("kind", `String "inlineRecord"); + ("fields", `List (fieldDocs |> List.map stringifyFieldDoc)); ] -let rec stringifyTypeDoc ~indentation (td : typeDoc) : string = - let open Protocol in +let rec stringifyTypeDoc (td : typeDoc) = let ps = match td.genericParameters with - | [] -> None - | ts -> - ts |> List.map (stringifyTypeDoc ~indentation:(indentation + 1)) - |> fun ts -> Some (array ts) + | [] -> `List [] + | ts -> ts |> List.map stringifyTypeDoc |> fun ts -> `List ts in + `Assoc [("path", `String td.path); ("genericTypeParameters", ps)] - stringifyObject ~indentation:(indentation + 1) - [("path", Some (wrapInQuotes td.path)); ("genericTypeParameters", ps)] - -let stringifyDetail ?(indentation = 0) (detail : docItemDetail) = - let open Protocol in +let stringifyDetail (detail : docItemDetail) = match detail with | Record {fieldDocs} -> - stringifyObject ~startOnNewline:true ~indentation + `Assoc [ - ("kind", Some (wrapInQuotes "record")); - ( "items", - Some (fieldDocs |> List.map (stringifyFieldDoc ~indentation) |> array) - ); + ("kind", `String "record"); + ("items", `List (fieldDocs |> List.map stringifyFieldDoc)); ] | Variant {constructorDocs} -> - stringifyObject ~startOnNewline:true ~indentation + `Assoc [ - ("kind", Some (wrapInQuotes "variant")); + ("kind", `String "variant"); ( "items", - Some + `List (constructorDocs |> List.map (fun constructorDoc -> - stringifyObject ~startOnNewline:true - ~indentation:(indentation + 1) + `Assoc [ - ( "name", - Some (wrapInQuotes constructorDoc.constructorName) ); + ("name", `String constructorDoc.constructorName); ( "deprecated", match constructorDoc.deprecated with - | Some d -> Some (wrapInQuotes d) - | None -> None ); + | Some d -> `String d + | None -> `Null ); ( "docstrings", - Some (stringifyDocstrings constructorDoc.docstrings) ); - ( "signature", - Some (wrapInQuotes constructorDoc.signature) ); + stringifyDocstrings constructorDoc.docstrings ); + ("signature", `String constructorDoc.signature); ( "payload", match constructorDoc.items with - | None -> None + | None -> `Null | Some constructorPayload -> - Some - (stringifyConstructorPayload - ~indentation:(indentation + 1) - constructorPayload) ); - ]) - |> array) ); + stringifyConstructorPayload constructorPayload ); + ])) ); ] | Signature {parameters; returnType} -> let ps = match parameters with - | [] -> None - | ps -> - ps |> List.map (stringifyTypeDoc ~indentation:(indentation + 1)) - |> fun ps -> Some (array ps) + | [] -> `List [] + | ps -> ps |> List.map stringifyTypeDoc |> fun ps -> `List ps in - stringifyObject ~startOnNewline:true ~indentation + `Assoc [ - ("kind", Some (wrapInQuotes "signature")); + ("kind", `String "signature"); ( "details", - Some - (stringifyObject ~startOnNewline:false ~indentation - [ - ("parameters", ps); - ("returnType", Some (stringifyTypeDoc ~indentation returnType)); - ]) ); + `Assoc + [("parameters", ps); ("returnType", stringifyTypeDoc returnType)] ); ] -let stringifySource ~indentation source = - let open Protocol in - stringifyObject ~startOnNewline:false ~indentation +let stringifySource source = + `Assoc [ - ("filepath", Some (source.filepath |> wrapInQuotes)); - ("line", Some (source.line |> string_of_int)); - ("col", Some (source.col |> string_of_int)); + ("filepath", `String source.filepath); + ("line", `Int source.line); + ("col", `Int source.col); ] -let rec stringifyDocItem ?(indentation = 0) ~originalEnv (item : docItem) = - let open Protocol in +let rec stringifyDocItem ~originalEnv (item : docItem) = match item with | Value {id; docstring; signature; name; deprecated; source; detail} -> - stringifyObject ~startOnNewline:true ~indentation + `Assoc [ - ("id", Some (wrapInQuotes id)); - ("kind", Some (wrapInQuotes "value")); - ("name", Some (name |> wrapInQuotes)); + ("id", `String id); + ("kind", `String "value"); + ("name", `String name); ( "deprecated", match deprecated with - | Some d -> Some (wrapInQuotes d) - | None -> None ); - ("signature", Some (signature |> String.trim |> wrapInQuotes)); - ("docstrings", Some (stringifyDocstrings docstring)); - ("source", Some (stringifySource ~indentation:(indentation + 1) source)); + | Some d -> `String d + | None -> `Null ); + ("signature", `String (signature |> String.trim)); + ("docstrings", stringifyDocstrings docstring); + ("source", stringifySource source); ( "detail", match detail with - | None -> None - | Some detail -> - Some (stringifyDetail ~indentation:(indentation + 1) detail) ); + | None -> `Null + | Some detail -> stringifyDetail detail ); ] | Type {id; docstring; signature; name; deprecated; detail; source} -> - stringifyObject ~startOnNewline:true ~indentation + `Assoc [ - ("id", Some (wrapInQuotes id)); - ("kind", Some (wrapInQuotes "type")); - ("name", Some (name |> wrapInQuotes)); + ("id", `String id); + ("kind", `String "type"); + ("name", `String name); ( "deprecated", match deprecated with - | Some d -> Some (wrapInQuotes d) - | None -> None ); - ("signature", Some (signature |> wrapInQuotes)); - ("docstrings", Some (stringifyDocstrings docstring)); - ("source", Some (stringifySource ~indentation:(indentation + 1) source)); + | Some d -> `String d + | None -> `Null ); + ("signature", `String signature); + ("docstrings", stringifyDocstrings docstring); + ("source", stringifySource source); ( "detail", match detail with - | None -> None - | Some detail -> - Some (stringifyDetail ~indentation:(indentation + 1) detail) ); + | None -> `Null + | Some detail -> stringifyDetail detail ); ] | Module m -> - stringifyObject ~startOnNewline:true ~indentation + `Assoc [ - ("id", Some (wrapInQuotes m.id)); - ("name", Some (wrapInQuotes m.name)); - ("kind", Some (wrapInQuotes "module")); + ("id", `String m.id); + ("name", `String m.name); + ("kind", `String "module"); ( "deprecated", match m.deprecated with - | Some d -> Some (wrapInQuotes d) - | None -> None ); + | Some d -> `String d + | None -> `Null ); ( "moduletypeid", match m.moduletypeid with - | Some path -> Some (wrapInQuotes path) - | None -> None ); - ("docstrings", Some (stringifyDocstrings m.docstring)); - ( "source", - Some (stringifySource ~indentation:(indentation + 1) m.source) ); + | Some path -> `String path + | None -> `Null ); + ("docstrings", stringifyDocstrings m.docstring); + ("source", stringifySource m.source); ( "items", - Some + `List (m.items - |> List.map - (stringifyDocItem ~originalEnv ~indentation:(indentation + 1)) - |> array) ); + |> List.map (fun item -> stringifyDocItem ~originalEnv item)) ); ] | ModuleType m -> - stringifyObject ~startOnNewline:true ~indentation + `Assoc [ - ("id", Some (wrapInQuotes m.id)); - ("name", Some (wrapInQuotes m.name)); - ("kind", Some (wrapInQuotes "moduleType")); + ("id", `String m.id); + ("name", `String m.name); + ("kind", `String "moduleType"); ( "deprecated", match m.deprecated with - | Some d -> Some (wrapInQuotes d) - | None -> None ); - ("docstrings", Some (stringifyDocstrings m.docstring)); - ( "source", - Some (stringifySource ~indentation:(indentation + 1) m.source) ); + | Some d -> `String d + | None -> `Null ); + ("docstrings", stringifyDocstrings m.docstring); + ("source", stringifySource m.source); ( "items", - Some + `List (m.items - |> List.map - (stringifyDocItem ~originalEnv ~indentation:(indentation + 1)) - |> array) ); + |> List.map (fun item -> stringifyDocItem ~originalEnv item)) ); ] | ModuleAlias m -> - stringifyObject ~startOnNewline:true ~indentation + `Assoc [ - ("id", Some (wrapInQuotes m.id)); - ("kind", Some (wrapInQuotes "moduleAlias")); - ("name", Some (wrapInQuotes m.name)); - ("docstrings", Some (stringifyDocstrings m.docstring)); - ( "source", - Some (stringifySource ~indentation:(indentation + 1) m.source) ); - ( "items", - Some - (m.items - |> List.map - (stringifyDocItem ~originalEnv ~indentation:(indentation + 1)) - |> array) ); + ("id", `String m.id); + ("kind", `String "moduleAlias"); + ("name", `String m.name); + ("docstrings", stringifyDocstrings m.docstring); + ("source", stringifySource m.source); + ("items", `List (m.items |> List.map (stringifyDocItem ~originalEnv))); ] -and stringifyDocsForModule ?(indentation = 0) ~originalEnv (d : docsForModule) = - let open Protocol in - stringifyObject ~startOnNewline:true ~indentation +and stringifyDocsForModule ~originalEnv (d : docsForModule) = + `Assoc [ - ("name", Some (wrapInQuotes d.name)); + ("name", `String d.name); ( "deprecated", match d.deprecated with - | Some d -> Some (wrapInQuotes d) - | None -> None ); - ("docstrings", Some (stringifyDocstrings d.docstring)); - ("source", Some (stringifySource ~indentation:(indentation + 1) d.source)); + | Some d -> `String d + | None -> `Null ); + ("docstrings", stringifyDocstrings d.docstring); + ("source", stringifySource d.source); ( "items", - Some - (d.items - |> List.map - (stringifyDocItem ~originalEnv ~indentation:(indentation + 1)) - |> array) ); + `List + (d.items |> List.map (fun item -> stringifyDocItem ~originalEnv item)) + ); ] let fieldToFieldDoc (field : SharedTypes.field) : fieldDoc = @@ -629,7 +581,9 @@ let extractDocs ~entryPointFile ~debug = } in let docs = extractDocsForModule structure in - Ok (stringifyDocsForModule ~originalEnv:env docs)) + Ok + (stringifyDocsForModule ~originalEnv:env docs + |> Yojson.Safe.pretty_to_string)) | true -> Error (Printf.sprintf @@ -666,16 +620,20 @@ let extractEmbedded ~extensionPoints ~filename = in let iterator = {Ast_iterator.default_iterator with extension} in iterator.structure iterator structure; - let open Analysis.Protocol in - !content - |> List.map (fun (loc, extensionName, contents) -> - stringifyObject - [ - ("extensionName", Some (wrapInQuotes extensionName)); - ("contents", Some (wrapInQuotes contents)); - ("loc", Some (Analysis.Utils.cmtLocToRange loc |> stringifyRange)); - ]) - |> List.rev |> array + let result = + !content + |> List.map (fun (loc, extensionName, contents) -> + `Assoc + [ + ("extensionName", `String extensionName); + ("contents", `String contents); + ( "loc", + Analysis.Utils.cmtLocToRange loc |> Lsp.Types.Range.yojson_of_t + ); + ]) + |> List.rev + in + Yojson.Safe.pretty_to_string (`List result) let readFile path = let ic = open_in path in @@ -1276,21 +1234,20 @@ module ExtractCodeblocks = struct | Ok codeBlocks -> let errors = !errors in if List.length errors > 0 then - let errors = - errors |> List.rev |> String.concat "\n" |> Protocol.wrapInQuotes - in + let errors = errors |> List.rev |> String.concat "\n" in Error errors else Ok - (codeBlocks - |> List.map (fun codeBlock -> - Protocol.stringifyObject - [ - ("id", Some (Protocol.wrapInQuotes codeBlock.id)); - ("name", Some (Protocol.wrapInQuotes codeBlock.name)); - ("code", Some (Protocol.wrapInQuotes codeBlock.code)); - ]) - |> Protocol.array) + (Yojson.Safe.pretty_to_string ~std:true + (`List + (codeBlocks + |> List.map (fun codeBlock -> + `Assoc + [ + ("id", `String codeBlock.id); + ("name", `String codeBlock.name); + ("code", `String codeBlock.code); + ])))) end module Migrate = Migrate From e3b78bafa403af178c3a9768e97142d4426a06aa Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sat, 23 May 2026 00:59:34 -0300 Subject: [PATCH 02/24] Delete Protocol.ml --- analysis/src/Protocol.ml | 388 --------------------------------------- 1 file changed, 388 deletions(-) delete mode 100644 analysis/src/Protocol.ml diff --git a/analysis/src/Protocol.ml b/analysis/src/Protocol.ml deleted file mode 100644 index 870b77c74bc..00000000000 --- a/analysis/src/Protocol.ml +++ /dev/null @@ -1,388 +0,0 @@ -(* type position = {line: int; character: int} -type range = {start: position; end_: position} -type markupContent = {kind: string; value: string} - -(* https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#command *) -type command = {title: string; command: string} - -(* https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#codeLens *) -type codeLens = {range: range; command: command option} - -type inlayHint = { - position: position; - label: string; - kind: int; - paddingLeft: bool; - paddingRight: bool; -} - -(* https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#parameterInformation *) -type parameterInformation = {label: int * int; documentation: markupContent} - -(* https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#signatureInformation *) -type signatureInformation = { - label: string; - parameters: parameterInformation list; - documentation: markupContent option; -} - -(* https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#signatureHelp *) -type signatureHelp = { - signatures: signatureInformation list; - activeSignature: int option; - activeParameter: int option; -} - -(* https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#insertTextFormat *) -type insertTextFormat = Snippet - -let insertTextFormatToInt f = - match f with - | Snippet -> 2 - -type textEdit = {range: range; newText: string} - -type completionItem = { - label: string; - kind: int; - tags: int list; - detail: string; - sortText: string option; - filterText: string option; - insertTextFormat: insertTextFormat option; - insertText: string option; - documentation: markupContent option; - data: (string * string) list option; - additionalTextEdits: textEdit list option; -} - -type location = {uri: string; range: range} -type documentSymbolItem = { - name: string; - kind: int; - range: range; - children: documentSymbolItem list; -} -type prepareRenameWithPlaceholder = {range: range; placeholder: string} -type prepareRename = - | Range of range - | Placeholder of prepareRenameWithPlaceholder -type renameFile = {oldUri: string; newUri: string} -type diagnostic = {range: range; message: string; severity: int} - -type optionalVersionedTextDocumentIdentifier = { - version: int option; - uri: string; -} - -type textDocumentEdit = { - textDocument: optionalVersionedTextDocumentIdentifier; - edits: textEdit list; -} - -type createFileOptions = {overwrite: bool option; ignoreIfExists: bool option} -type createFile = {uri: string; options: createFileOptions option} - -type documentChange = - | TextDocumentEdit of textDocumentEdit - | CreateFile of createFile - -type codeActionEdit = {documentChanges: documentChange list} -type codeActionKind = RefactorRewrite - -type codeAction = { - title: string; - codeActionKind: codeActionKind; - edit: codeActionEdit; -} - -type semanticTokens = {data: int array} - -(* let wrapInQuotes s = "\"" ^ Json.escape s ^ "\"" *) - -let null = "null" -let array l = "[" ^ String.concat ", " l ^ "]" - -let stringifyPosition p = - Printf.sprintf {|{"line": %i, "character": %i}|} p.line p.character - -let stringifyRange r = - Printf.sprintf {|{"start": %s, "end": %s}|} - (stringifyPosition r.start) - (stringifyPosition r.end_) - -let stringifyRangeWithPlaceholder (r : prepareRenameWithPlaceholder) = - Printf.sprintf - {|{ - "range": %s, - "placeholder": %s - }|} - (stringifyRange r.range) - (wrapInQuotes r.placeholder) - -let stringifyTextEdit (te : textEdit) = - Printf.sprintf - {|{ - "range": %s, - "newText": %s - }|} - (stringifyRange te.range) (wrapInQuotes te.newText) - -let stringifyMarkupContent (m : markupContent) = - Printf.sprintf {|{"kind": %s, "value": %s}|} (wrapInQuotes m.kind) - (wrapInQuotes m.value) - -(** None values are not emitted in the output. *) -let stringifyObject ?(startOnNewline = false) ?(indentation = 1) properties = - let indentationStr = String.make (indentation * 2) ' ' in - (if startOnNewline then "\n" ^ indentationStr else "") - ^ {|{ -|} - ^ (properties - |> List.filter_map (fun (key, value) -> - match value with - | None -> None - | Some v -> - Some (Printf.sprintf {|%s "%s": %s|} indentationStr key v)) - |> String.concat ",\n") - ^ "\n" ^ indentationStr ^ "}" - -let optWrapInQuotes s = - match s with - | None -> None - | Some s -> Some (wrapInQuotes s) - -let stringifyResult = function - | Ok r -> stringifyObject [("TAG", Some (wrapInQuotes "Ok")); ("_0", Some r)] - | Error e -> - stringifyObject [("TAG", Some (wrapInQuotes "Error")); ("_0", Some e)] - -let stringifyCompletionItem c = - stringifyObject - [ - ("label", Some (wrapInQuotes c.label)); - ("kind", Some (string_of_int c.kind)); - ("tags", Some (c.tags |> List.map string_of_int |> array)); - ("detail", Some (wrapInQuotes c.detail)); - ( "documentation", - Some - (match c.documentation with - | None -> null - | Some doc -> stringifyMarkupContent doc) ); - ("sortText", optWrapInQuotes c.sortText); - ("filterText", optWrapInQuotes c.filterText); - ("insertText", optWrapInQuotes c.insertText); - ( "insertTextFormat", - match c.insertTextFormat with - | None -> None - | Some insertTextFormat -> - Some (Printf.sprintf "%i" (insertTextFormatToInt insertTextFormat)) ); - ( "data", - match c.data with - | None -> None - | Some fields -> - Some - (fields - |> List.map (fun (key, value) -> (key, Some (wrapInQuotes value))) - |> stringifyObject ~indentation:2) ); - ( "additionalTextEdits", - match c.additionalTextEdits with - | Some additionalTextEdits -> - Some (additionalTextEdits |> List.map stringifyTextEdit |> array) - | None -> None ); - ] - -let stringifyHover value = - Printf.sprintf {|{"contents": %s}|} - (stringifyMarkupContent {kind = "markdown"; value}) - -let stringifyLocation (h : location) = - Printf.sprintf {|{"uri": %s, "range": %s}|} (wrapInQuotes h.uri) - (stringifyRange h.range) - -let stringifyDocumentSymbolItems items = - let buf = Buffer.create 10 in - let stringifyName name = Printf.sprintf "\"%s\"" (Json.escape name) in - let stringifyKind kind = string_of_int kind in - let emitStr = Buffer.add_string buf in - let emitSep () = emitStr ",\n" in - let rec emitItem ~indent item = - let openBrace = Printf.sprintf "%s{\n" indent in - let closeBrace = Printf.sprintf "\n%s}" indent in - let indent = indent ^ " " in - let emitField name s = - emitStr (Printf.sprintf "%s\"%s\": %s" indent name s) - in - emitStr openBrace; - emitField "name" (stringifyName item.name); - emitSep (); - emitField "kind" (stringifyKind item.kind); - emitSep (); - emitField "range" (stringifyRange item.range); - emitSep (); - emitField "selectionRange" (stringifyRange item.range); - if item.children <> [] then ( - emitSep (); - emitField "children" "[\n"; - emitBody ~indent (List.rev item.children); - emitStr "]"); - emitStr closeBrace - and emitBody ~indent items = - match items with - | [] -> () - | item :: rest -> - emitItem ~indent item; - if rest <> [] then emitSep (); - emitBody ~indent rest - in - let indent = "" in - emitStr "[\n"; - emitBody ~indent (List.rev items); - emitStr "\n]"; - Buffer.contents buf - -let stringifyRenameFile {oldUri; newUri} = - Printf.sprintf {|{ - "kind": "rename", - "oldUri": %s, - "newUri": %s -}|} - (wrapInQuotes oldUri) (wrapInQuotes newUri) - -let stringifyoptionalVersionedTextDocumentIdentifier td = - Printf.sprintf {|{ - "version": %s, - "uri": %s - }|} - (match td.version with - | None -> null - | Some v -> string_of_int v) - (wrapInQuotes td.uri) - -let stringifyTextDocumentEdit tde = - Printf.sprintf {|{ - "textDocument": %s, - "edits": %s - }|} - (stringifyoptionalVersionedTextDocumentIdentifier tde.textDocument) - (tde.edits |> List.map stringifyTextEdit |> array) - -let stringifyCreateFile cf = - stringifyObject - [ - ("kind", Some (wrapInQuotes "create")); - ("uri", Some (wrapInQuotes cf.uri)); - ( "options", - match cf.options with - | None -> None - | Some options -> - Some - (stringifyObject - [ - ( "overwrite", - match options.overwrite with - | None -> None - | Some ov -> Some (string_of_bool ov) ); - ( "ignoreIfExists", - match options.ignoreIfExists with - | None -> None - | Some i -> Some (string_of_bool i) ); - ]) ); - ] - -let stringifyDocumentChange dc = - match dc with - | TextDocumentEdit tde -> stringifyTextDocumentEdit tde - | CreateFile cf -> stringifyCreateFile cf - -let codeActionKindToString kind = - match kind with - | RefactorRewrite -> "refactor.rewrite" - -let stringifyCodeActionEdit cae = - Printf.sprintf {|{"documentChanges": %s}|} - (cae.documentChanges |> List.map stringifyDocumentChange |> array) - -let stringifyCodeAction ca = - Printf.sprintf {|{"title": %s, "kind": %s, "edit": %s}|} - (wrapInQuotes ca.title) - (wrapInQuotes (codeActionKindToString ca.codeActionKind)) - (ca.edit |> stringifyCodeActionEdit) - -let stringifyHint (hint : inlayHint) = - Printf.sprintf - {|{ - "position": %s, - "label": %s, - "kind": %i, - "paddingLeft": %b, - "paddingRight": %b -}|} - (stringifyPosition hint.position) - (wrapInQuotes hint.label) hint.kind hint.paddingLeft hint.paddingRight - -let stringifyCommand (command : command) = - Printf.sprintf {|{"title": %s, "command": %s}|} - (wrapInQuotes command.title) - (wrapInQuotes command.command) - -let stringifyCodeLens (codeLens : codeLens) = - Printf.sprintf - {|{ - "range": %s, - "command": %s - }|} - (stringifyRange codeLens.range) - (match codeLens.command with - | None -> "" - | Some command -> stringifyCommand command) - -let stringifyParameterInformation (parameterInformation : parameterInformation) - = - Printf.sprintf {|{"label": %s, "documentation": %s}|} - (let line, chr = parameterInformation.label in - "[" ^ string_of_int line ^ ", " ^ string_of_int chr ^ "]") - (stringifyMarkupContent parameterInformation.documentation) - -let stringifySignatureInformation (signatureInformation : signatureInformation) - = - Printf.sprintf - {|{ - "label": %s, - "parameters": %s%s - }|} - (wrapInQuotes signatureInformation.label) - (signatureInformation.parameters - |> List.map stringifyParameterInformation - |> array) - (match signatureInformation.documentation with - | None -> "" - | Some docs -> - Printf.sprintf ",\n \"documentation\": %s" - (stringifyMarkupContent docs)) - -let stringifySignatureHelp (signatureHelp : signatureHelp) = - Printf.sprintf - {|{ - "signatures": %s, - "activeSignature": %s, - "activeParameter": %s -}|} - (signatureHelp.signatures |> List.map stringifySignatureInformation |> array) - (match signatureHelp.activeSignature with - | None -> null - | Some activeSignature -> activeSignature |> string_of_int) - (match signatureHelp.activeParameter with - | None -> null - | Some activeParameter -> activeParameter |> string_of_int) - -(* https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#diagnostic *) -let stringifyDiagnostic d = - Printf.sprintf - {|{ - "range": %s, - "message": %s, - "severity": %d, - "source": "ReScript" -}|} - (stringifyRange d.range) (wrapInQuotes d.message) d.severity *) From 1079ce55035c37bd17cb65772fdd3800b6e28acd Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sat, 23 May 2026 01:04:04 -0300 Subject: [PATCH 03/24] Delete comments --- analysis/src/CodeActions.ml | 15 --------------- analysis/src/DocumentSymbol.ml | 15 --------------- analysis/src/Hint.ml | 10 ---------- analysis/src/Loc.ml | 1 - analysis/src/SignatureHelp.ml | 19 +------------------ analysis/src/Utils.ml | 1 - 6 files changed, 1 insertion(+), 60 deletions(-) diff --git a/analysis/src/CodeActions.ml b/analysis/src/CodeActions.ml index f068939cd93..98fab0004fa 100644 --- a/analysis/src/CodeActions.ml +++ b/analysis/src/CodeActions.ml @@ -18,21 +18,6 @@ let make ~title ~kind ~(uri : string) ~newText ~range = () in Lsp.Types.CodeAction.create ~title ~kind ~edit () -(* { - Protocol.title; - codeActionKind = kind; - edit = - { - documentChanges = - [ - TextDocumentEdit - { - Protocol.textDocument = {version = None; uri}; - edits = [{newText; range}]; - }; - ]; - }; - } *) let makeWithDocumentChanges ~title ~kind ~documentChanges = let edit = Lsp.Types.WorkspaceEdit.create ~documentChanges () in diff --git a/analysis/src/DocumentSymbol.ml b/analysis/src/DocumentSymbol.ml index c588fabad46..5cedc9e41c7 100644 --- a/analysis/src/DocumentSymbol.ml +++ b/analysis/src/DocumentSymbol.ml @@ -12,18 +12,6 @@ type kind = | EnumMember | TypeParameter -(* let kindNumber = function - | Module -> 2 - | Property -> 7 - | Constructor -> 9 - | Function -> 12 - | Variable -> 13 - | Constant -> 14 - | String -> 15 - | Number -> 16 - | EnumMember -> 22 - | TypeParameter -> 26 *) - let command ~path = let symbols = ref [] in let addSymbol name loc kind = @@ -37,9 +25,6 @@ let command ~path = Lsp.Types.DocumentSymbol.create ~name ~range ~selectionRange:range ~children:[] ~kind () in - (* let symbol : Protocol.documentSymbolItem = - {name; range; kind = kindNumber kind; children = []} - in *) symbols := symbol :: !symbols in let rec exprKind (exp : Parsetree.expression) = diff --git a/analysis/src/Hint.ml b/analysis/src/Hint.ml index 26d0525713e..7e5953a6899 100644 --- a/analysis/src/Hint.ml +++ b/analysis/src/Hint.ml @@ -103,16 +103,6 @@ let inlay ~source ~kindFile ~pos ~maxLength ~full ~debug = Lsp.Types.InlayHint.create ~position ~kind ~paddingLeft:true ~paddingRight:false ~label:(`String label) () in - (* let result = - Protocol. - { - kind = inlayKindToNumber hintKind; - position; - paddingLeft = true; - paddingRight = false; - label = ": " ^ label; - } - in *) match maxlen with | Some value -> if String.length label > value then None else Some result diff --git a/analysis/src/Loc.ml b/analysis/src/Loc.ml index 754a2ff28e5..6febb9a6267 100644 --- a/analysis/src/Loc.ml +++ b/analysis/src/Loc.ml @@ -21,7 +21,6 @@ let rangeOfLoc (loc : t) = let start = loc |> start |> mkPosition in let end_ = loc |> end_ |> mkPosition in Lsp.Types.Range.create ~start ~end_ -(* {Protocol.start; end_} *) let isInside (x : t) (y : t) = x.loc_start.pos_cnum >= y.loc_start.pos_cnum diff --git a/analysis/src/SignatureHelp.ml b/analysis/src/SignatureHelp.ml index d38c636217a..27a53a0ccbb 100644 --- a/analysis/src/SignatureHelp.ml +++ b/analysis/src/SignatureHelp.ml @@ -773,22 +773,5 @@ let signatureHelp ~debug ~source ~kindFile ~pos ~allowForConstructorPayloads Lsp.Types.SignatureHelp.create ~signatures:[signatures] ~activeParameter:(Some activeParameter) ~activeSignature:0 () in - Some signature - (* { - Protocol.signatures = - [ - { - label; - parameters = params; - documentation = - (match List.nth_opt constructor.docstring 0 with - | None -> None - | Some docs -> - Some {Protocol.kind = "markdown"; value = docs}); - }; - ]; - activeSignature = Some 0; - activeParameter = Some activeParameter; - } *) - )) + Some signature)) | _ -> None)) diff --git a/analysis/src/Utils.ml b/analysis/src/Utils.ml index 393c6b1f379..a4bfc33bec2 100644 --- a/analysis/src/Utils.ml +++ b/analysis/src/Utils.ml @@ -19,7 +19,6 @@ let isFirstCharUppercase s = String.length s > 0 && Char.equal s.[0] (Char.uppercase_ascii s.[0]) let cmtPosToPosition {Lexing.pos_lnum; pos_cnum; pos_bol} = - (* Protocol.{line = pos_lnum - 1; character = pos_cnum - pos_bol} *) Lsp.Types.Position.create ~line:(pos_lnum - 1) ~character:(pos_cnum - pos_bol) let cmtLocToRange {Location.loc_start; loc_end} = From cd65777a962e0ecc5c24f2ba47802fbfdc753d2d Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sat, 23 May 2026 12:15:40 -0300 Subject: [PATCH 04/24] Fix LSP JSON serialization Serialize analysis command results with Yojson output helpers instead of string extraction, fixing document symbols so they return JSON arrays instead of crashing. Also use typed LSP enum constructors for completion and inlay hint kinds, clean up JSON config parsing, and update analysis test snapshots. --- analysis/reanalyze/src/Paths.ml | 20 +- analysis/src/Cli.ml | 8 +- analysis/src/CodeActions.ml | 3 +- analysis/src/Commands.ml | 2 +- analysis/src/CompletionBackEnd.ml | 4 +- analysis/src/DocumentSymbol.ml | 19 +- analysis/src/FindFiles.ml | 2 +- analysis/src/Hint.ml | 4 +- analysis/src/SharedTypes.ml | 2 +- analysis/src/Xform.ml | 3 +- .../not_compiled/expected/DocTemplate.res.txt | 55 ++++- .../expected/DocTemplate.resi.txt | 35 ++- .../tests/src/expected/DocumentSymbol.res.txt | 217 +++++++++++++++++- .../src/expected/ExhaustiveSwitch.res.txt | 10 +- .../tests/src/expected/Xform.res.txt | 125 ++++++++-- 15 files changed, 418 insertions(+), 91 deletions(-) diff --git a/analysis/reanalyze/src/Paths.ml b/analysis/reanalyze/src/Paths.ml index e8a83d8793b..f47282ee089 100644 --- a/analysis/reanalyze/src/Paths.ml +++ b/analysis/reanalyze/src/Paths.ml @@ -1,6 +1,7 @@ let rescriptJson = "rescript.json" -let get key (t : Yojson.Safe.t) : Yojson.Safe.t option = +(** If `t` is an object (`Assoc), get the value associated with the given string key *) +let get key t = match t with | `Assoc items -> List.assoc_opt key items | _ -> None @@ -37,7 +38,7 @@ let setProjectRootFromCwd () = let setReScriptProjectRoot = lazy (setProjectRootFromCwd ()) module Config = struct - let readSuppress (conf : Yojson.Safe.t) = + let readSuppress conf = match conf |> get "suppress" with | Some (`List elements) -> let names = @@ -50,7 +51,7 @@ module Config = struct runConfig.suppress <- names @ runConfig.suppress | _ -> () - let readUnsuppress (conf : Yojson.Safe.t) = + let readUnsuppress conf = match conf |> get "unsuppress" with | Some (`List elements) -> let names = @@ -80,8 +81,7 @@ module Config = struct let readTransitive conf = match conf |> get "transitive" with - | Some (`Bool true) -> RunConfig.transitive true - | Some (`Bool false) -> RunConfig.transitive false + | Some (`Bool bool) -> RunConfig.transitive bool | _ -> () (* Read the config from rescript.json and apply it to runConfig and suppress and unsuppress *) @@ -158,13 +158,9 @@ let readCmtScan () = json |> get_fn "build_root" Yojson.Safe.Util.to_string_option in let scan_dirs = - match - json - |> get_fn "scan_dirs" (function - | `List f -> Some f - | _ -> None) - with - | [arr] -> arr |> List.filter_map Yojson.Safe.Util.to_string_option + match json |> get "scan_dirs" with + | Some (`List arr) -> + arr |> List.filter_map Yojson.Safe.Util.to_string_option | _ -> [] in let also_scan_build_root = diff --git a/analysis/src/Cli.ml b/analysis/src/Cli.ml index 2cc0bd6cb1b..62cb4769941 100644 --- a/analysis/src/Cli.ml +++ b/analysis/src/Cli.ml @@ -1,9 +1,7 @@ -let print_null = - `Null |> Yojson.Safe.pretty_to_string ~std:true |> print_endline -let print_list l = - `List l |> Yojson.Safe.pretty_to_string ~std:true |> print_endline let print_string json = Yojson.Safe.pretty_to_string ~std:true json |> print_endline +let print_null = `Null |> print_string +let print_list l = `List l |> print_string let completion ~debug ~path ~pos ~currentFile = let full = Cmt.loadFullCmtFromPath ~path in @@ -359,7 +357,7 @@ let test ~path = Printf.printf "%s\nnewText:\n%s<--here\n%s%s\n" (Lsp.Types.Range.yojson_of_t range - |> Yojson.Safe.to_string) + |> Yojson.Safe.pretty_to_string) indent indent newText) | `CreateFile cf -> Printf.printf "\nCreateFile: %s\n" diff --git a/analysis/src/CodeActions.ml b/analysis/src/CodeActions.ml index 98fab0004fa..62b8126752a 100644 --- a/analysis/src/CodeActions.ml +++ b/analysis/src/CodeActions.ml @@ -1,7 +1,6 @@ (* This is the return that's expected when resolving code actions *) -let make ~title ~kind ~(uri : string) ~newText ~range = - (* let uri = uri |> Uri.fromPath |> Uri.toString in *) +let make ~title ~kind ~uri ~newText ~range = let textDocument = Lsp.Types.OptionalVersionedTextDocumentIdentifier.create ~uri:(Lsp.Uri.of_string uri) () diff --git a/analysis/src/Commands.ml b/analysis/src/Commands.ml index 1ee630ee920..c8a39ffbe2d 100644 --- a/analysis/src/Commands.ml +++ b/analysis/src/Commands.ml @@ -259,7 +259,7 @@ let prepareRename ~full ~pos ~debug = (match placeholderOpt with | None -> range | Some _placeholder -> - (* NOTE: lsp dont have PrepareRename.create with placeholder *) + (* NOTE: ocaml lsp library dont have Lsp.Types.PrepareRename.create *) range)) let format ~source ~kindFile = diff --git a/analysis/src/CompletionBackEnd.ml b/analysis/src/CompletionBackEnd.ml index f8d17dc9b76..209736b886e 100644 --- a/analysis/src/CompletionBackEnd.ml +++ b/analysis/src/CompletionBackEnd.ml @@ -825,7 +825,7 @@ let mkItem ?data ?additionalTextEdits name ~kind ~detail ~deprecated ~docstring (`MarkupContent (Lsp.Types.MarkupContent.create ~kind:Lsp.Types.MarkupKind.Markdown ~value:docContent)) - ~deprecated:(Option.is_some deprecated) + ?deprecated:(Some (Option.is_some deprecated)) ?data ?additionalTextEdits ?sortText:None ?insertText:None ?insertTextFormat:None ?filterText:None () @@ -846,7 +846,7 @@ let completionToItem let item = mkItem name ?additionalTextEdits ?data:(kindToData (full.file.uri |> Uri.toPath) kind) - ~kind:(Completion.kindToInt kind) + ~kind:(Completion.kindToLspCompletionItem kind) ~deprecated ~detail: (match detail with diff --git a/analysis/src/DocumentSymbol.ml b/analysis/src/DocumentSymbol.ml index 5cedc9e41c7..856b0299063 100644 --- a/analysis/src/DocumentSymbol.ml +++ b/analysis/src/DocumentSymbol.ml @@ -1,17 +1,5 @@ (* https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_documentSymbol *) -type kind = - | Module - | Property - | Constructor - | Function - | Variable - | Constant - | String - | Number - | EnumMember - | TypeParameter - let command ~path = let symbols = ref [] in let addSymbol name loc kind = @@ -179,10 +167,6 @@ let command ~path = in newLast :: rest | _ -> rest - (* let newLast = - {last with children = last.children |> addSymbolToChildren ~symbol} - in - newLast :: rest *) else symbol :: children in let rec addSortedSymbolsToChildren ~sortedSymbols children = @@ -196,4 +180,5 @@ let command ~path = let sortedSymbols = !symbols |> List.sort compareSymbol in let symbolsWithChildren = [] |> addSortedSymbolsToChildren ~sortedSymbols in `List (symbolsWithChildren |> List.map Lsp.Types.DocumentSymbol.yojson_of_t) - |> Yojson.Safe.Util.to_string |> print_endline + |> Yojson.Safe.pretty_to_string ~std:true + |> print_endline diff --git a/analysis/src/FindFiles.ml b/analysis/src/FindFiles.ml index 9f0b9c50798..9457640f958 100644 --- a/analysis/src/FindFiles.ml +++ b/analysis/src/FindFiles.ml @@ -4,7 +4,7 @@ let bind f x = Option.bind x f (* Returns a list of paths, relative to the provided `base` *) let getSourceDirectories ~includeDev ~baseDir config = - let rec handleItem current (item : Yojson.Safe.t) = + let rec handleItem current item = match item with | `List contents -> List.map (handleItem current) contents |> List.concat | `String text -> [current /+ text] diff --git a/analysis/src/Hint.ml b/analysis/src/Hint.ml index 7e5953a6899..d5f10838077 100644 --- a/analysis/src/Hint.ml +++ b/analysis/src/Hint.ml @@ -1,7 +1,7 @@ open SharedTypes type inlayHintKind = Type -let inlayKindToNumber = function +let inlayKindToLspInlayHint = function | Type -> Lsp.Types.InlayHintKind.Type let locItemToTypeHint ~full:{file; package} locItem = @@ -97,7 +97,7 @@ let inlay ~source ~kindFile ~pos ~maxLength ~full ~debug = in match locItemToTypeHint locItem ~full with | Some label -> ( - let kind = inlayKindToNumber hintKind in + let kind = inlayKindToLspInlayHint hintKind in let label = ": " ^ label in let result = Lsp.Types.InlayHint.create ~position ~kind ~paddingLeft:true diff --git a/analysis/src/SharedTypes.ml b/analysis/src/SharedTypes.ml index 8427ae1668d..cce06e969e9 100644 --- a/analysis/src/SharedTypes.ml +++ b/analysis/src/SharedTypes.ml @@ -870,7 +870,7 @@ module Completion = struct (* https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_completion *) (* https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionItemKind *) - let kindToInt kind = + let kindToLspCompletionItem kind = match kind with | Module _ -> Lsp.Types.CompletionItemKind.Module | FileModule _ -> Lsp.Types.CompletionItemKind.Module diff --git a/analysis/src/Xform.ml b/analysis/src/Xform.ml index 0f9bf5a79c2..cc520ef2eee 100644 --- a/analysis/src/Xform.ml +++ b/analysis/src/Xform.ml @@ -897,8 +897,7 @@ let parseInterface ~source = in (structure, printSignatureItem) -let extractCodeActions ~(path : string) ~startPos ~endPos ~source ~kindFile - ~debug = +let extractCodeActions ~path ~startPos ~endPos ~source ~kindFile ~debug = let pos = startPos in let codeActions = ref [] in match kindFile with diff --git a/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.res.txt b/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.res.txt index 825e8726f65..67c9e3ba27f 100644 --- a/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.res.txt +++ b/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.res.txt @@ -4,7 +4,10 @@ can't find module DocTemplate Hit: Add Documentation template TextDocumentEdit: file:///not_compiled/DocTemplate.res -{"end":{"character":9,"line":5},"start":{"character":0,"line":3}} +{ + "end": { "character": 9, "line": 5 }, + "start": { "character": 0, "line": 3 } +} newText: <--here /** @@ -19,7 +22,10 @@ can't find module DocTemplate Hit: Add Documentation template TextDocumentEdit: file:///not_compiled/DocTemplate.res -{"end":{"character":33,"line":6},"start":{"character":0,"line":6}} +{ + "end": { "character": 33, "line": 6 }, + "start": { "character": 0, "line": 6 } +} newText: <--here /** @@ -32,7 +38,10 @@ can't find module DocTemplate Hit: Add Documentation template TextDocumentEdit: file:///not_compiled/DocTemplate.res -{"end":{"character":9,"line":8},"start":{"character":0,"line":8}} +{ + "end": { "character": 9, "line": 8 }, + "start": { "character": 0, "line": 8 } +} newText: <--here /** @@ -45,7 +54,10 @@ can't find module DocTemplate Hit: Add Documentation template TextDocumentEdit: file:///not_compiled/DocTemplate.res -{"end":{"character":20,"line":10},"start":{"character":0,"line":10}} +{ + "end": { "character": 20, "line": 10 }, + "start": { "character": 0, "line": 10 } +} newText: <--here /** @@ -58,7 +70,10 @@ can't find module DocTemplate Hit: Add Documentation template TextDocumentEdit: file:///not_compiled/DocTemplate.res -{"end":{"character":1,"line":16},"start":{"character":0,"line":12}} +{ + "end": { "character": 1, "line": 16 }, + "start": { "character": 0, "line": 12 } +} newText: <--here /** @@ -74,7 +89,10 @@ Hit: Extract local module "T" to file "T.res" CreateFile: file:///not_compiled/T.res TextDocumentEdit: file:///not_compiled/T.res -{"end":{"character":1,"line":16},"start":{"character":0,"line":12}} +{ + "end": { "character": 1, "line": 16 }, + "start": { "character": 0, "line": 12 } +} newText: <--here // ^xfm @@ -83,7 +101,10 @@ let b = 1 TextDocumentEdit: file:///not_compiled/DocTemplate.res -{"end":{"character":1,"line":16},"start":{"character":0,"line":12}} +{ + "end": { "character": 1, "line": 16 }, + "start": { "character": 0, "line": 12 } +} newText: <--here @@ -93,7 +114,10 @@ can't find module DocTemplate Hit: Add Documentation template TextDocumentEdit: file:///not_compiled/DocTemplate.res -{"end":{"character":11,"line":14},"start":{"character":2,"line":14}} +{ + "end": { "character": 11, "line": 14 }, + "start": { "character": 2, "line": 14 } +} newText: <--here /** @@ -105,7 +129,10 @@ Hit: Extract local module "T" to file "T.res" CreateFile: file:///not_compiled/T.res TextDocumentEdit: file:///not_compiled/T.res -{"end":{"character":1,"line":16},"start":{"character":0,"line":12}} +{ + "end": { "character": 1, "line": 16 }, + "start": { "character": 0, "line": 12 } +} newText: <--here // ^xfm @@ -114,7 +141,10 @@ let b = 1 TextDocumentEdit: file:///not_compiled/DocTemplate.res -{"end":{"character":1,"line":16},"start":{"character":0,"line":12}} +{ + "end": { "character": 1, "line": 16 }, + "start": { "character": 0, "line": 12 } +} newText: <--here @@ -124,7 +154,10 @@ can't find module DocTemplate Hit: Add Documentation template TextDocumentEdit: file:///not_compiled/DocTemplate.res -{"end":{"character":46,"line":18},"start":{"character":0,"line":17}} +{ + "end": { "character": 46, "line": 18 }, + "start": { "character": 0, "line": 17 } +} newText: <--here /** diff --git a/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.resi.txt b/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.resi.txt index 5d00b2d3e67..0c57744efc7 100644 --- a/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.resi.txt +++ b/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.resi.txt @@ -3,7 +3,10 @@ Xform not_compiled/DocTemplate.resi 3:3 Hit: Add Documentation template TextDocumentEdit: file:///not_compiled/DocTemplate.resi -{"end":{"character":9,"line":5},"start":{"character":0,"line":3}} +{ + "end": { "character": 9, "line": 5 }, + "start": { "character": 0, "line": 3 } +} newText: <--here /** @@ -17,7 +20,10 @@ Xform not_compiled/DocTemplate.resi 6:15 Hit: Add Documentation template TextDocumentEdit: file:///not_compiled/DocTemplate.resi -{"end":{"character":33,"line":6},"start":{"character":0,"line":6}} +{ + "end": { "character": 33, "line": 6 }, + "start": { "character": 0, "line": 6 } +} newText: <--here /** @@ -29,7 +35,10 @@ Xform not_compiled/DocTemplate.resi 8:4 Hit: Add Documentation template TextDocumentEdit: file:///not_compiled/DocTemplate.resi -{"end":{"character":10,"line":8},"start":{"character":0,"line":8}} +{ + "end": { "character": 10, "line": 8 }, + "start": { "character": 0, "line": 8 } +} newText: <--here /** @@ -41,7 +50,10 @@ Xform not_compiled/DocTemplate.resi 10:4 Hit: Add Documentation template TextDocumentEdit: file:///not_compiled/DocTemplate.resi -{"end":{"character":19,"line":10},"start":{"character":0,"line":10}} +{ + "end": { "character": 19, "line": 10 }, + "start": { "character": 0, "line": 10 } +} newText: <--here /** @@ -53,7 +65,10 @@ Xform not_compiled/DocTemplate.resi 12:7 Hit: Add Documentation template TextDocumentEdit: file:///not_compiled/DocTemplate.resi -{"end":{"character":1,"line":16},"start":{"character":0,"line":12}} +{ + "end": { "character": 1, "line": 16 }, + "start": { "character": 0, "line": 12 } +} newText: <--here /** @@ -69,7 +84,10 @@ Xform not_compiled/DocTemplate.resi 14:6 Hit: Add Documentation template TextDocumentEdit: file:///not_compiled/DocTemplate.resi -{"end":{"character":12,"line":14},"start":{"character":2,"line":14}} +{ + "end": { "character": 12, "line": 14 }, + "start": { "character": 2, "line": 14 } +} newText: <--here /** @@ -81,7 +99,10 @@ Xform not_compiled/DocTemplate.resi 18:2 Hit: Add Documentation template TextDocumentEdit: file:///not_compiled/DocTemplate.resi -{"end":{"character":46,"line":18},"start":{"character":0,"line":17}} +{ + "end": { "character": 46, "line": 18 }, + "start": { "character": 0, "line": 17 } +} newText: <--here /** diff --git a/tests/analysis_tests/tests/src/expected/DocumentSymbol.res.txt b/tests/analysis_tests/tests/src/expected/DocumentSymbol.res.txt index 9c188827e52..4ecd801db03 100644 --- a/tests/analysis_tests/tests/src/expected/DocumentSymbol.res.txt +++ b/tests/analysis_tests/tests/src/expected/DocumentSymbol.res.txt @@ -1,3 +1,218 @@ null DocumentSymbol src/DocumentSymbol.res -Fatal error: exception Yojson__Safe.Util.Type_error("Expected string, got array", _) +[ + { + "children": [], + "kind": 16, + "name": "zzz", + "range": { + "end": { "character": 12, "line": 31 }, + "start": { "character": 0, "line": 31 } + }, + "selectionRange": { + "end": { "character": 12, "line": 31 }, + "start": { "character": 0, "line": 31 } + } + }, + { + "children": [ + { + "children": [ + { + "children": [], + "kind": 12, + "name": "make", + "range": { + "end": { "character": 97, "line": 27 }, + "start": { "character": 4, "line": 26 } + }, + "selectionRange": { + "end": { "character": 97, "line": 27 }, + "start": { "character": 4, "line": 26 } + } + } + ], + "kind": 2, + "name": "Comp", + "range": { + "end": { "character": 3, "line": 28 }, + "start": { "character": 9, "line": 25 } + }, + "selectionRange": { + "end": { "character": 3, "line": 28 }, + "start": { "character": 9, "line": 25 } + } + } + ], + "kind": 2, + "name": "O", + "range": { + "end": { "character": 1, "line": 29 }, + "start": { "character": 7, "line": 24 } + }, + "selectionRange": { + "end": { "character": 1, "line": 29 }, + "start": { "character": 7, "line": 24 } + } + }, + { + "children": [], + "kind": 16, + "name": "fa", + "range": { + "end": { "character": 22, "line": 22 }, + "start": { "character": 0, "line": 22 } + }, + "selectionRange": { + "end": { "character": 22, "line": 22 }, + "start": { "character": 0, "line": 22 } + } + }, + { + "children": [ + { + "children": [], + "kind": 12, + "name": "abd", + "range": { + "end": { "character": 32, "line": 19 }, + "start": { "character": 2, "line": 19 } + }, + "selectionRange": { + "end": { "character": 32, "line": 19 }, + "start": { "character": 2, "line": 19 } + } + }, + { + "children": [], + "kind": 12, + "name": "abc", + "range": { + "end": { "character": 32, "line": 18 }, + "start": { "character": 2, "line": 18 } + }, + "selectionRange": { + "end": { "character": 32, "line": 18 }, + "start": { "character": 2, "line": 18 } + } + }, + { + "children": [], + "kind": 26, + "name": "t", + "range": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 2, "line": 17 } + }, + "selectionRange": { + "end": { "character": 14, "line": 17 }, + "start": { "character": 2, "line": 17 } + } + } + ], + "kind": 2, + "name": "ForAuto", + "range": { + "end": { "character": 1, "line": 20 }, + "start": { "character": 7, "line": 16 } + }, + "selectionRange": { + "end": { "character": 1, "line": 20 }, + "start": { "character": 7, "line": 16 } + } + }, + { + "children": [], + "kind": 13, + "name": "op", + "range": { + "end": { "character": 16, "line": 14 }, + "start": { "character": 0, "line": 14 } + }, + "selectionRange": { + "end": { "character": 16, "line": 14 }, + "start": { "character": 0, "line": 14 } + } + }, + { + "children": [ + { + "children": [], + "kind": 12, + "name": "next", + "range": { + "end": { "character": 48, "line": 11 }, + "start": { "character": 2, "line": 11 } + }, + "selectionRange": { + "end": { "character": 48, "line": 11 }, + "start": { "character": 2, "line": 11 } + } + }, + { + "children": [], + "kind": 12, + "name": "foo", + "range": { + "end": { "character": 54, "line": 10 }, + "start": { "character": 2, "line": 10 } + }, + "selectionRange": { + "end": { "character": 54, "line": 10 }, + "start": { "character": 2, "line": 10 } + } + } + ], + "kind": 2, + "name": "Lib", + "range": { + "end": { "character": 1, "line": 12 }, + "start": { "character": 7, "line": 9 } + }, + "selectionRange": { + "end": { "character": 1, "line": 12 }, + "start": { "character": 7, "line": 9 } + } + }, + { + "children": [ + { + "children": [], + "kind": 12, + "name": "customDouble", + "range": { + "end": { "character": 35, "line": 6 }, + "start": { "character": 2, "line": 6 } + }, + "selectionRange": { + "end": { "character": 35, "line": 6 }, + "start": { "character": 2, "line": 6 } + } + } + ], + "kind": 2, + "name": "Dep", + "range": { + "end": { "character": 1, "line": 7 }, + "start": { "character": 7, "line": 2 } + }, + "selectionRange": { + "end": { "character": 1, "line": 7 }, + "start": { "character": 7, "line": 2 } + } + }, + { + "children": [], + "kind": 2, + "name": "MyList", + "range": { + "end": { "character": 25, "line": 0 }, + "start": { "character": 7, "line": 0 } + }, + "selectionRange": { + "end": { "character": 25, "line": 0 }, + "start": { "character": 7, "line": 0 } + } + } +] + diff --git a/tests/analysis_tests/tests/src/expected/ExhaustiveSwitch.res.txt b/tests/analysis_tests/tests/src/expected/ExhaustiveSwitch.res.txt index 7c61519afdb..cb732512456 100644 --- a/tests/analysis_tests/tests/src/expected/ExhaustiveSwitch.res.txt +++ b/tests/analysis_tests/tests/src/expected/ExhaustiveSwitch.res.txt @@ -155,7 +155,10 @@ Resolved opens 1 Stdlib Hit: Exhaustive switch TextDocumentEdit: file:///src/ExhaustiveSwitch.res -{"end":{"character":10,"line":33},"start":{"character":3,"line":33}} +{ + "end": { "character": 10, "line": 33 }, + "start": { "character": 3, "line": 33 } +} newText: <--here switch x->getV { @@ -176,7 +179,10 @@ Resolved opens 1 Stdlib Hit: Exhaustive switch TextDocumentEdit: file:///src/ExhaustiveSwitch.res -{"end":{"character":6,"line":36},"start":{"character":3,"line":36}} +{ + "end": { "character": 6, "line": 36 }, + "start": { "character": 3, "line": 36 } +} newText: <--here switch vvv { diff --git a/tests/analysis_tests/tests/src/expected/Xform.res.txt b/tests/analysis_tests/tests/src/expected/Xform.res.txt index 2a7b331cbb4..cd7e637596f 100644 --- a/tests/analysis_tests/tests/src/expected/Xform.res.txt +++ b/tests/analysis_tests/tests/src/expected/Xform.res.txt @@ -11,7 +11,10 @@ Resolved opens 1 Stdlib Hit: Replace with switch TextDocumentEdit: file:///src/Xform.res -{"end":{"character":1,"line":11},"start":{"character":0,"line":6}} +{ + "end": { "character": 1, "line": 11 }, + "start": { "character": 0, "line": 6 } +} newText: <--here switch kind { @@ -25,7 +28,10 @@ Xform src/Xform.res 13:15 Hit: Replace with switch TextDocumentEdit: file:///src/Xform.res -{"end":{"character":79,"line":13},"start":{"character":0,"line":13}} +{ + "end": { "character": 79, "line": 13 }, + "start": { "character": 0, "line": 13 } +} newText: <--here switch kind { @@ -37,14 +43,20 @@ Xform src/Xform.res 16:5 Hit: Add type annotation TextDocumentEdit: file:///src/Xform.res -{"end":{"character":8,"line":16},"start":{"character":8,"line":16}} +{ + "end": { "character": 8, "line": 16 }, + "start": { "character": 8, "line": 16 } +} newText: <--here : string Hit: Add Documentation template TextDocumentEdit: file:///src/Xform.res -{"end":{"character":18,"line":16},"start":{"character":0,"line":16}} +{ + "end": { "character": 18, "line": 16 }, + "start": { "character": 0, "line": 16 } +} newText: <--here /** @@ -56,7 +68,10 @@ Xform src/Xform.res 19:5 Hit: Add Documentation template TextDocumentEdit: file:///src/Xform.res -{"end":{"character":23,"line":19},"start":{"character":0,"line":19}} +{ + "end": { "character": 23, "line": 19 }, + "start": { "character": 0, "line": 19 } +} newText: <--here /** @@ -68,7 +83,10 @@ Xform src/Xform.res 26:10 Hit: Add type annotation TextDocumentEdit: file:///src/Xform.res -{"end":{"character":11,"line":26},"start":{"character":10,"line":26}} +{ + "end": { "character": 11, "line": 26 }, + "start": { "character": 10, "line": 26 } +} newText: <--here (x: option) @@ -77,7 +95,10 @@ Xform src/Xform.res 30:9 Hit: Add braces to function TextDocumentEdit: file:///src/Xform.res -{"end":{"character":3,"line":32},"start":{"character":0,"line":26}} +{ + "end": { "character": 3, "line": 32 }, + "start": { "character": 0, "line": 26 } +} newText: <--here let foo = x => { @@ -93,7 +114,10 @@ Xform src/Xform.res 34:21 Hit: Add type annotation TextDocumentEdit: file:///src/Xform.res -{"end":{"character":24,"line":34},"start":{"character":24,"line":34}} +{ + "end": { "character": 24, "line": 34 }, + "start": { "character": 24, "line": 34 } +} newText: <--here : int @@ -102,7 +126,10 @@ Xform src/Xform.res 38:5 Hit: Add Documentation template TextDocumentEdit: file:///src/Xform.res -{"end":{"character":40,"line":38},"start":{"character":0,"line":37}} +{ + "end": { "character": 40, "line": 38 }, + "start": { "character": 0, "line": 37 } +} newText: <--here /** @@ -115,7 +142,10 @@ Xform src/Xform.res 41:9 Hit: Add type annotation TextDocumentEdit: file:///src/Xform.res -{"end":{"character":11,"line":41},"start":{"character":11,"line":41}} +{ + "end": { "character": 11, "line": 41 }, + "start": { "character": 11, "line": 41 } +} newText: <--here : int @@ -132,7 +162,10 @@ Resolved opens 1 Stdlib Hit: Add braces to function TextDocumentEdit: file:///src/Xform.res -{"end":{"character":25,"line":48},"start":{"character":0,"line":48}} +{ + "end": { "character": 25, "line": 48 }, + "start": { "character": 0, "line": 48 } +} newText: <--here let noBraces = () => { @@ -143,7 +176,10 @@ Xform src/Xform.res 52:34 Hit: Add braces to function TextDocumentEdit: file:///src/Xform.res -{"end":{"character":1,"line":54},"start":{"character":0,"line":51}} +{ + "end": { "character": 1, "line": 54 }, + "start": { "character": 0, "line": 51 } +} newText: <--here let nested = () => { @@ -157,7 +193,10 @@ Xform src/Xform.res 62:6 Hit: Add braces to function TextDocumentEdit: file:///src/Xform.res -{"end":{"character":7,"line":62},"start":{"character":4,"line":58}} +{ + "end": { "character": 7, "line": 62 }, + "start": { "character": 4, "line": 58 } +} newText: <--here let foo = (_x, y, _z) => { @@ -173,7 +212,10 @@ Hit: Extract local module "ExtractableModule" to file "ExtractableModule.res" CreateFile: file:///src/ExtractableModule.res TextDocumentEdit: file:///src/ExtractableModule.res -{"end":{"character":1,"line":74},"start":{"character":0,"line":68}} +{ + "end": { "character": 1, "line": 74 }, + "start": { "character": 0, "line": 68 } +} newText: <--here /** Doc comment. */ @@ -184,7 +226,10 @@ let doStuff = a => a + 1 TextDocumentEdit: file:///src/Xform.res -{"end":{"character":1,"line":74},"start":{"character":0,"line":68}} +{ + "end": { "character": 1, "line": 74 }, + "start": { "character": 0, "line": 68 } +} newText: <--here @@ -201,7 +246,10 @@ Resolved opens 1 Stdlib Hit: Expand catch-all TextDocumentEdit: file:///src/Xform.res -{"end":{"character":3,"line":80},"start":{"character":2,"line":80}} +{ + "end": { "character": 3, "line": 80 }, + "start": { "character": 2, "line": 80 } +} newText: <--here Second | Third | Fourth(_) @@ -218,7 +266,10 @@ Resolved opens 1 Stdlib Hit: Expand catch-all TextDocumentEdit: file:///src/Xform.res -{"end":{"character":3,"line":86},"start":{"character":2,"line":86}} +{ + "end": { "character": 3, "line": 86 }, + "start": { "character": 2, "line": 86 } +} newText: <--here Third | Fourth(_) @@ -235,7 +286,10 @@ Resolved opens 1 Stdlib Hit: Expand catch-all TextDocumentEdit: file:///src/Xform.res -{"end":{"character":3,"line":93},"start":{"character":2,"line":93}} +{ + "end": { "character": 3, "line": 93 }, + "start": { "character": 2, "line": 93 } +} newText: <--here First | Third | Fourth(_) @@ -252,7 +306,10 @@ Resolved opens 1 Stdlib Hit: Expand catch-all TextDocumentEdit: file:///src/Xform.res -{"end":{"character":3,"line":101},"start":{"character":2,"line":101}} +{ + "end": { "character": 3, "line": 101 }, + "start": { "character": 2, "line": 101 } +} newText: <--here #second | #"illegal identifier" | #third(_) @@ -269,7 +326,10 @@ Resolved opens 1 Stdlib Hit: Expand catch-all TextDocumentEdit: file:///src/Xform.res -{"end":{"character":3,"line":107},"start":{"character":2,"line":107}} +{ + "end": { "character": 3, "line": 107 }, + "start": { "character": 2, "line": 107 } +} newText: <--here #"illegal identifier" | #third(_) @@ -286,7 +346,10 @@ Resolved opens 1 Stdlib Hit: Expand catch-all TextDocumentEdit: file:///src/Xform.res -{"end":{"character":3,"line":115},"start":{"character":2,"line":115}} +{ + "end": { "character": 3, "line": 115 }, + "start": { "character": 2, "line": 115 } +} newText: <--here Some(Second | Third | Fourth(_)) | None @@ -303,7 +366,10 @@ Resolved opens 1 Stdlib Hit: Expand catch-all TextDocumentEdit: file:///src/Xform.res -{"end":{"character":3,"line":121},"start":{"character":2,"line":121}} +{ + "end": { "character": 3, "line": 121 }, + "start": { "character": 2, "line": 121 } +} newText: <--here Some(Third | Fourth(_)) | None @@ -320,7 +386,10 @@ Resolved opens 1 Stdlib Hit: Expand catch-all TextDocumentEdit: file:///src/Xform.res -{"end":{"character":3,"line":127},"start":{"character":2,"line":127}} +{ + "end": { "character": 3, "line": 127 }, + "start": { "character": 2, "line": 127 } +} newText: <--here Some(Third | Fourth(_)) | None @@ -337,7 +406,10 @@ Resolved opens 1 Stdlib Hit: Expand catch-all TextDocumentEdit: file:///src/Xform.res -{"end":{"character":3,"line":136},"start":{"character":2,"line":136}} +{ + "end": { "character": 3, "line": 136 }, + "start": { "character": 2, "line": 136 } +} newText: <--here Some(#"illegal identifier" | #second | #third(_)) @@ -354,7 +426,10 @@ Resolved opens 1 Stdlib Hit: Expand catch-all TextDocumentEdit: file:///src/Xform.res -{"end":{"character":3,"line":142},"start":{"character":2,"line":142}} +{ + "end": { "character": 3, "line": 142 }, + "start": { "character": 2, "line": 142 } +} newText: <--here Some(#"illegal identifier" | #third(_)) | None From 8ea43e2dac82a4997b5678fffd276a5d95897fa0 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sat, 23 May 2026 12:57:04 -0300 Subject: [PATCH 05/24] Use Lsp.Uri for URI handling Replace the custom URI record with Lsp.Uri.t and delegate path/URI conversion to the LSP library. This fixes interface-aware analysis results so definitions, references, and renames consistently target .resi files when an interface is present, and updates the analysis snapshots accordingly. --- analysis/src/Uri.ml | 33 ++++++++++--------- analysis/src/Uri.mli | 2 +- .../tests/src/expected/Cross.res.txt | 19 ++++------- .../expected/DefinitionWithInterface.resi.txt | 8 ++--- .../tests/src/expected/Jsx2.res.txt | 2 +- .../tests/src/expected/References.res.txt | 2 +- .../expected/ReferencesWithInterface.resi.txt | 2 +- .../src/expected/RenameWithInterface.resi.txt | 9 ++--- 8 files changed, 35 insertions(+), 42 deletions(-) diff --git a/analysis/src/Uri.ml b/analysis/src/Uri.ml index 4b1d67f5434..75be2c439ed 100644 --- a/analysis/src/Uri.ml +++ b/analysis/src/Uri.ml @@ -1,27 +1,30 @@ -type t = {path: string; uri: string} +type t = Lsp.Uri.t let stripPath = ref false (* for use in tests *) -let pathToUri path = - if Sys.os_type = "Unix" then "file://" ^ path - else - "file://" - ^ (Str.global_replace (Str.regexp_string "\\") "/" path - |> Str.substitute_first (Str.regexp "^\\([a-zA-Z]\\):") (fun text -> - let name = Str.matched_group 1 text in - "/" ^ String.lowercase_ascii name ^ "%3A")) +let pathToUri path = Lsp.Uri.of_path path -let fromPath path = {path; uri = pathToUri path} -let isInterface {path} = Filename.check_suffix path "i" -let toPath {path} = path +let fromPath path = Lsp.Uri.of_path path +let isInterface uri = uri |> Lsp.Uri.to_string |> Filename.check_suffix "i" +let toPath uri = + (* Lsp.Uri.to_path remove the schema file:// but keep the `/` on start of path. *) + let p = Lsp.Uri.to_path uri in + if !stripPath then String.sub p 1 (String.length p - 1) else p -let toTopLevelLoc {path} = +let toTopLevelLoc (uri : Lsp.Uri.t) = let topPos = - {Lexing.pos_fname = path; pos_lnum = 1; pos_bol = 0; pos_cnum = 0} + { + Lexing.pos_fname = uri |> Lsp.Uri.to_path; + pos_lnum = 1; + pos_bol = 0; + pos_cnum = 0; + } in {Location.loc_start = topPos; Location.loc_end = topPos; loc_ghost = false} -let toString {uri} = if !stripPath then Filename.basename uri else uri +let toString t = + if !stripPath then Filename.basename (Lsp.Uri.to_path t) + else Lsp.Uri.to_string t (* Light weight, hopefully-enough-for-the-purpose fn to encode URI components. Built to handle the reserved characters listed in diff --git a/analysis/src/Uri.mli b/analysis/src/Uri.mli index b6e94692bda..b2ff0611149 100644 --- a/analysis/src/Uri.mli +++ b/analysis/src/Uri.mli @@ -1,4 +1,4 @@ -type t +type t = Lsp.Uri.t val fromPath : string -> t val isInterface : t -> bool diff --git a/tests/analysis_tests/tests/src/expected/Cross.res.txt b/tests/analysis_tests/tests/src/expected/Cross.res.txt index 315e9544ad9..60bbc9480f9 100644 --- a/tests/analysis_tests/tests/src/expected/Cross.res.txt +++ b/tests/analysis_tests/tests/src/expected/Cross.res.txt @@ -127,12 +127,7 @@ Rename src/Cross.res 21:28 xPrime "end": { "character": 5, "line": 0 }, "start": { "character": 4, "line": 0 } } - } - ], - "textDocument": { "uri": "file:///RenameWithInterface.resi" } - }, - { - "edits": [ + }, { "newText": "xPrime", "range": { @@ -141,7 +136,7 @@ Rename src/Cross.res 21:28 xPrime } } ], - "textDocument": { "uri": "file:///RenameWithInterface.res" } + "textDocument": { "uri": "file:///RenameWithInterface.resi" } }, { "edits": [ @@ -179,7 +174,7 @@ Definition src/Cross.res 27:32 "end": { "character": 5, "line": 0 }, "start": { "character": 4, "line": 0 } }, - "uri": "file:///DefinitionWithInterface.res" + "uri": "file:///DefinitionWithInterface.resi" } Definition src/Cross.res 30:36 @@ -188,7 +183,7 @@ Definition src/Cross.res 30:36 "end": { "character": 6, "line": 3 }, "start": { "character": 5, "line": 3 } }, - "uri": "file:///DefinitionWithInterface.res" + "uri": "file:///DefinitionWithInterface.resi" } TypeDefinition src/Cross.res 33:37 @@ -213,9 +208,9 @@ Path DefinitionWithInterface.a Definition src/Cross.res 39:39 { "range": { - "end": { "character": 7, "line": 9 }, - "start": { "character": 6, "line": 9 } + "end": { "character": 12, "line": 6 }, + "start": { "character": 2, "line": 6 } }, - "uri": "file:///DefinitionWithInterface.res" + "uri": "file:///DefinitionWithInterface.resi" } diff --git a/tests/analysis_tests/tests/src/expected/DefinitionWithInterface.resi.txt b/tests/analysis_tests/tests/src/expected/DefinitionWithInterface.resi.txt index 447fbe7b20c..69366054ad7 100644 --- a/tests/analysis_tests/tests/src/expected/DefinitionWithInterface.resi.txt +++ b/tests/analysis_tests/tests/src/expected/DefinitionWithInterface.resi.txt @@ -5,15 +5,15 @@ Definition src/DefinitionWithInterface.resi 0:4 "end": { "character": 5, "line": 0 }, "start": { "character": 4, "line": 0 } }, - "uri": "file:///DefinitionWithInterface.res" + "uri": "file:///DefinitionWithInterface.resi" } Definition src/DefinitionWithInterface.resi 6:6 { "range": { - "end": { "character": 7, "line": 9 }, - "start": { "character": 6, "line": 9 } + "end": { "character": 12, "line": 6 }, + "start": { "character": 2, "line": 6 } }, - "uri": "file:///DefinitionWithInterface.res" + "uri": "file:///DefinitionWithInterface.resi" } diff --git a/tests/analysis_tests/tests/src/expected/Jsx2.res.txt b/tests/analysis_tests/tests/src/expected/Jsx2.res.txt index e8ba4c5bae4..31c34b0afa8 100644 --- a/tests/analysis_tests/tests/src/expected/Jsx2.res.txt +++ b/tests/analysis_tests/tests/src/expected/Jsx2.res.txt @@ -327,7 +327,7 @@ Definition src/Jsx2.res 58:11 "end": { "character": 8, "line": 1 }, "start": { "character": 4, "line": 1 } }, - "uri": "file:///Component.res" + "uri": "file:///Component.resi" } Complete src/Jsx2.res 68:10 diff --git a/tests/analysis_tests/tests/src/expected/References.res.txt b/tests/analysis_tests/tests/src/expected/References.res.txt index c2aeeeaed48..3ca1e05c934 100644 --- a/tests/analysis_tests/tests/src/expected/References.res.txt +++ b/tests/analysis_tests/tests/src/expected/References.res.txt @@ -109,7 +109,7 @@ References src/References.res 23:15 "end": { "character": 8, "line": 1 }, "start": { "character": 4, "line": 1 } }, - "uri": "file:///ComponentInner.res" + "uri": "file:///ComponentInner.resi" }, { "range": { diff --git a/tests/analysis_tests/tests/src/expected/ReferencesWithInterface.resi.txt b/tests/analysis_tests/tests/src/expected/ReferencesWithInterface.resi.txt index 2445ae67cce..ebe9734470c 100644 --- a/tests/analysis_tests/tests/src/expected/ReferencesWithInterface.resi.txt +++ b/tests/analysis_tests/tests/src/expected/ReferencesWithInterface.resi.txt @@ -27,7 +27,7 @@ References src/ReferencesWithInterface.resi 0:4 "end": { "character": 5, "line": 0 }, "start": { "character": 4, "line": 0 } }, - "uri": "file:///ReferencesWithInterface.res" + "uri": "file:///ReferencesWithInterface.resi" }, { "range": { diff --git a/tests/analysis_tests/tests/src/expected/RenameWithInterface.resi.txt b/tests/analysis_tests/tests/src/expected/RenameWithInterface.resi.txt index 3c40ade795a..3b60a46e30f 100644 --- a/tests/analysis_tests/tests/src/expected/RenameWithInterface.resi.txt +++ b/tests/analysis_tests/tests/src/expected/RenameWithInterface.resi.txt @@ -9,12 +9,7 @@ Rename src/RenameWithInterface.resi 0:4 y "end": { "character": 5, "line": 0 }, "start": { "character": 4, "line": 0 } } - } - ], - "textDocument": { "uri": "file:///RenameWithInterface.resi" } - }, - { - "edits": [ + }, { "newText": "y", "range": { @@ -23,7 +18,7 @@ Rename src/RenameWithInterface.resi 0:4 y } } ], - "textDocument": { "uri": "file:///RenameWithInterface.res" } + "textDocument": { "uri": "file:///RenameWithInterface.resi" } }, { "edits": [ From 64a03feb9db2bad211aa308d488a595e7c6e3ea5 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sat, 23 May 2026 13:08:01 -0300 Subject: [PATCH 06/24] remove `null` --- analysis/src/Cli.ml | 42 +++++++++---------- .../not_compiled/expected/Diagnostics.res.txt | 1 - .../not_compiled/expected/DocTemplate.res.txt | 1 - .../expected/DocTemplate.resi.txt | 1 - .../expected/SemanticTokens.res.txt | 1 - .../expected/SemanticTokensArray.res.txt | 1 - .../SemanticTokensArrayAccess.res.txt | 1 - .../SemanticTokensArrayMutation.res.txt | 1 - .../expected/SemanticTokensDict.res.txt | 1 - .../tests/src/expected/ArrayUtils.res.txt | 1 - .../tests/src/expected/Auto.res.txt | 1 - .../src/expected/BrokenParserCases.res.txt | 1 - .../tests/src/expected/CodeLens.res.txt | 1 - .../tests/src/expected/Codemod.res.txt | 1 - .../src/expected/CompletableComponent.res.txt | 1 - .../src/expected/CompletePrioritize1.res.txt | 1 - .../src/expected/CompletePrioritize2.res.txt | 1 - .../tests/src/expected/Completion.res.txt | 1 - .../src/expected/CompletionAttributes.res.txt | 1 - .../CompletionConfiguredBuiltins.res.txt | 1 - .../src/expected/CompletionDicts.res.txt | 1 - .../expected/CompletionExpressions.res.txt | 1 - .../src/expected/CompletionFromModule.res.txt | 1 - .../expected/CompletionFromModule2.res.txt | 1 - .../CompletionFunctionArguments.res.txt | 1 - .../expected/CompletionInferValues.res.txt | 1 - .../tests/src/expected/CompletionJsx.res.txt | 1 - .../src/expected/CompletionJsxProps.res.txt | 1 - ...mpletionMultipleEditorCompleteFrom.res.txt | 1 - .../expected/CompletionNullNullable.res.txt | 1 - .../src/expected/CompletionObjects.res.txt | 1 - .../src/expected/CompletionPattern.res.txt | 1 - .../src/expected/CompletionPipeChain.res.txt | 1 - .../expected/CompletionPipeProperty.res.txt | 1 - .../expected/CompletionPipeSubmodules.res.txt | 1 - .../src/expected/CompletionRegexp.res.txt | 1 - .../src/expected/CompletionResolve.res.txt | 1 - .../src/expected/CompletionSupport.res.txt | 1 - .../src/expected/CompletionSupport2.res.txt | 1 - .../expected/CompletionTaggedTemplate.res.txt | 1 - .../expected/CompletionTypeAnnotation.res.txt | 1 - .../src/expected/CompletionTypeT.res.txt | 1 - .../expected/CompletionTypedArrays.res.txt | 1 - .../tests/src/expected/Component.res.txt | 1 - .../tests/src/expected/Component.resi.txt | 1 - .../src/expected/CreateInterface.res.txt | 1 - .../tests/src/expected/Cross.res.txt | 1 - .../tests/src/expected/Dce.res.txt | 1 - .../tests/src/expected/Debug.res.txt | 1 - .../tests/src/expected/Definition.res.txt | 1 - .../expected/DefinitionWithInterface.res.txt | 1 - .../expected/DefinitionWithInterface.resi.txt | 1 - .../tests/src/expected/Destructuring.res.txt | 1 - .../tests/src/expected/Div.res.txt | 1 - .../tests/src/expected/DocComments.res.txt | 1 - .../tests/src/expected/DocumentSymbol.res.txt | 1 - .../DotPipeCompleteFromCurrentModule.res.txt | 1 - .../expected/DotPipeCompletionSpec.res.txt | 1 - .../tests/src/expected/EnvCompletion.res.txt | 1 - .../expected/EnvCompletionOtherFile.res.txt | 1 - .../src/expected/ExhaustiveSwitch.res.txt | 1 - .../tests/src/expected/Fastify.res.txt | 1 - .../tests/src/expected/FastifyExt.res.txt | 1 - .../tests/src/expected/Firebase.res.txt | 1 - .../src/expected/FirstClassModules.res.txt | 1 - .../tests/src/expected/Fragment.res.txt | 1 - .../tests/src/expected/Highlight.res.txt | 1 - .../tests/src/expected/Hover.res.txt | 3 +- .../expected/IncludeModuleCompletion.res.txt | 1 - .../tests/src/expected/InlayHint.res.txt | 1 - .../tests/src/expected/Jsx2.res.txt | 1 - .../tests/src/expected/Jsx2.resi.txt | 1 - .../tests/src/expected/JsxV4.res.txt | 1 - .../tests/src/expected/LongIdentTest.res.txt | 1 - .../tests/src/expected/ModuleStuff.res.txt | 1 - .../tests/src/expected/NestedRecords.res.txt | 1 - .../src/expected/NestedRecordsHover.res.txt | 1 - .../tests/src/expected/Objects.res.txt | 1 - .../tests/src/expected/Patterns.res.txt | 1 - .../tests/src/expected/PolyRec.res.txt | 1 - .../tests/src/expected/PrepareRename.res.txt | 1 - .../tests/src/expected/QueryFile.res.txt | 1 - .../tests/src/expected/RecModules.res.txt | 1 - .../src/expected/RecordCompletion.res.txt | 1 - .../tests/src/expected/RecoveryOnProp.res.txt | 1 - .../tests/src/expected/References.res.txt | 1 - .../expected/ReferencesWithInterface.res.txt | 1 - .../expected/ReferencesWithInterface.resi.txt | 1 - .../tests/src/expected/Rename.res.txt | 1 - .../src/expected/RenameWithInterface.res.txt | 1 - .../src/expected/RenameWithInterface.resi.txt | 1 - .../tests/src/expected/Reprod.res.txt | 1 - .../tests/src/expected/Rxjs.res.txt | 1 - .../tests/src/expected/RxjsCompletion.res.txt | 1 - .../tests/src/expected/SchemaAssets.res.txt | 1 - .../tests/src/expected/ShadowedBelt.res.txt | 1 - .../tests/src/expected/SignatureHelp.res.txt | 1 - .../tests/src/expected/Support.res.txt | 1 - .../tests/src/expected/TableclothMap.res.txt | 1 - .../tests/src/expected/TableclothMap.resi.txt | 1 - .../tests/src/expected/TypeArgCtx.res.txt | 1 - .../src/expected/TypeAtPosCompletion.res.txt | 1 - .../tests/src/expected/TypeDefinition.res.txt | 1 - .../tests/src/expected/Xform.res.txt | 1 - .../tests/src/expected/typeConstraint.res.txt | 1 - 105 files changed, 23 insertions(+), 125 deletions(-) diff --git a/analysis/src/Cli.ml b/analysis/src/Cli.ml index 62cb4769941..bf7fa97a7d5 100644 --- a/analysis/src/Cli.ml +++ b/analysis/src/Cli.ml @@ -1,13 +1,13 @@ let print_string json = Yojson.Safe.pretty_to_string ~std:true json |> print_endline -let print_null = `Null |> print_string +let print_null () = `Null |> print_string let print_list l = `List l |> print_string let completion ~debug ~path ~pos ~currentFile = let full = Cmt.loadFullCmtFromPath ~path in let kindFile = Files.classifySourceFile currentFile in match Files.readFile currentFile with - | None | Some "" -> print_null + | None | Some "" -> print_null () | Some source -> Commands.completion ~debug ~source ~kindFile ~pos ~full |> List.map (fun c -> Lsp.Types.CompletionItem.yojson_of_t c) @@ -16,62 +16,62 @@ let completion ~debug ~path ~pos ~currentFile = let completionResolve ~path ~modulePath = let full = Cmt.loadFullCmtFromPath ~path in match Commands.completionResolve ~full ~modulePath with - | None -> print_null + | None -> print_null () | Some (`MarkupContent {value}) -> `String value |> print_string let inlayhint ~path ~pos ~maxLength ~debug = let full = Cmt.loadFullCmtFromPath ~path in let kindFile = Files.classifySourceFile path in match Files.readFile path with - | None -> print_null + | None -> print_null () | Some source -> ( match Hint.inlay ~source ~kindFile ~pos ~maxLength ~full ~debug with | Some hints -> hints |> List.map (fun h -> Lsp.Types.InlayHint.yojson_of_t h) |> print_list - | None -> print_null) + | None -> print_null ()) let codeLens ~path ~debug = let full = Cmt.loadFullCmtFromPath ~path in let kindFile = Files.classifySourceFile path in match Files.readFile path with - | None -> print_null + | None -> print_null () | Some source -> ( match Hint.codeLens ~source ~kindFile ~full ~debug with | Some lens -> lens |> List.map (fun l -> Lsp.Types.CodeLens.yojson_of_t l) |> print_list - | None -> print_null) + | None -> print_null ()) let hover ~path ~pos ~currentFile ~debug ~supportsMarkdownLinks = let full = Cmt.loadFullCmtFromPath ~path in let kindFile = Files.classifySourceFile currentFile in match Files.readFile currentFile with - | None -> print_null + | None -> print_null () | Some source -> ( match Commands.hover ~source ~kindFile ~pos ~debug ~supportsMarkdownLinks ~full with | Some value -> Lsp.Types.Hover.yojson_of_t value |> print_string - | None -> print_null) + | None -> print_null ()) let signatureHelp ~path ~pos ~currentFile ~debug ~allowForConstructorPayloads = let full = Cmt.loadFullCmtFromPath ~path in let kindFile = Files.classifySourceFile currentFile in match Files.readFile currentFile with - | None -> print_null + | None -> print_null () | Some source -> ( match SignatureHelp.signatureHelp ~source ~kindFile ~pos ~allowForConstructorPayloads ~full ~debug with - | None -> print_null + | None -> print_null () | Some s -> Lsp.Types.SignatureHelp.yojson_of_t s |> print_string) let codeAction ~path ~startPos ~endPos ~currentFile ~debug = let kindFile = Files.classifySourceFile currentFile in match Files.readFile currentFile with - | None -> print_null + | None -> print_null () | Some source -> Xform.extractCodeActions ~path ~startPos ~endPos ~source ~kindFile ~debug |> List.map (fun c -> Lsp.Types.CodeAction.yojson_of_t c) @@ -81,19 +81,19 @@ let definition ~path ~pos ~debug = let full = Cmt.loadFullCmtFromPath ~path in match Commands.definition ~full ~pos ~debug with - | None -> print_null + | None -> print_null () | Some location -> location |> Lsp.Types.Location.yojson_of_t |> print_string let typeDefinition ~path ~pos ~debug = let full = Cmt.loadFullCmtFromPath ~path in match Commands.typeDefinition ~full ~pos ~debug with - | None -> print_null + | None -> print_null () | Some location -> location |> Lsp.Types.Location.yojson_of_t |> print_string let references ~path ~pos ~debug = let full = Cmt.loadFullCmtFromPath ~path in let allLocs = Commands.references ~full ~pos ~debug in - if allLocs = [] then print_null + if allLocs = [] then print_null () else allLocs |> List.map (fun l -> Lsp.Types.Location.yojson_of_t l) @@ -111,25 +111,25 @@ let rename ~path ~pos ~newName ~debug = | `DeleteFile df -> Lsp.Types.DeleteFile.yojson_of_t df | `CreateFile cf -> Lsp.Types.CreateFile.yojson_of_t cf) |> print_list - | _ -> print_null + | _ -> print_null () let prepareRename ~path ~pos ~debug = let full = Cmt.loadFullCmtFromPath ~path in match Commands.prepareRename ~full ~pos ~debug with - | None -> print_null + | None -> print_null () | Some range -> Lsp.Types.Range.yojson_of_t range |> print_string let format ~path = match Files.readFile path with - | None -> print_null + | None -> print_null () | Some source -> ( let kindFile = Files.classifySourceFile path in match Commands.format ~source ~kindFile with | Ok textEdits -> ( match textEdits with | {newText} :: _ -> print_string (`String newText) - | _ -> print_null) - | Error _ -> print_null) + | _ -> print_null ()) + | Error _ -> print_null ()) let diagnosticSyntax ~path = match Files.readFile path with @@ -142,7 +142,7 @@ let diagnosticSyntax ~path = let semanticTokens ~path = match Files.readFile path with - | None -> print_null + | None -> print_null () | Some source -> let kindFile = Files.classifySourceFile path in let tokens = SemanticTokens.semanticTokens ~source ~kindFile in diff --git a/tests/analysis_tests/tests/not_compiled/expected/Diagnostics.res.txt b/tests/analysis_tests/tests/not_compiled/expected/Diagnostics.res.txt index 9e80fd56ed1..d4c5ca2ae15 100644 --- a/tests/analysis_tests/tests/not_compiled/expected/Diagnostics.res.txt +++ b/tests/analysis_tests/tests/not_compiled/expected/Diagnostics.res.txt @@ -1,4 +1,3 @@ -null [ { "message": "consecutive statements on a line must be separated by ';' or a newline", diff --git a/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.res.txt b/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.res.txt index 67c9e3ba27f..189f9be07e1 100644 --- a/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.res.txt +++ b/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.res.txt @@ -1,4 +1,3 @@ -null Xform not_compiled/DocTemplate.res 3:3 can't find module DocTemplate Hit: Add Documentation template diff --git a/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.resi.txt b/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.resi.txt index 0c57744efc7..5552ac7cc70 100644 --- a/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.resi.txt +++ b/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.resi.txt @@ -1,4 +1,3 @@ -null Xform not_compiled/DocTemplate.resi 3:3 Hit: Add Documentation template diff --git a/tests/analysis_tests/tests/not_compiled/expected/SemanticTokens.res.txt b/tests/analysis_tests/tests/not_compiled/expected/SemanticTokens.res.txt index 9bf5d6730b2..dfd046f5352 100644 --- a/tests/analysis_tests/tests/not_compiled/expected/SemanticTokens.res.txt +++ b/tests/analysis_tests/tests/not_compiled/expected/SemanticTokens.res.txt @@ -1,3 +1,2 @@ -null { "data": [ 0, 4, 4, 1, 0, 1, 2, 1, 3, 0, 0, 1, 4, 7, 0 ] } diff --git a/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensArray.res.txt b/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensArray.res.txt index 6373b002dde..a2772d05e58 100644 --- a/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensArray.res.txt +++ b/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensArray.res.txt @@ -1,3 +1,2 @@ -null { "data": [ 0, 4, 2, 1, 0, 1, 4, 2, 1, 0, 0, 9, 2, 1, 0 ] } diff --git a/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensArrayAccess.res.txt b/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensArrayAccess.res.txt index e51c1d07b98..efa97a6d8a4 100644 --- a/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensArrayAccess.res.txt +++ b/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensArrayAccess.res.txt @@ -1,4 +1,3 @@ -null { "data": [ 0, 4, 1, 1, 0, 0, 4, 2, 1, 0, 1, 4, 1, 1, 0, 0, 4, 2, 1, 0, 0, 3, 5, 1, 0 diff --git a/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensArrayMutation.res.txt b/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensArrayMutation.res.txt index 89056f70c91..7808688aac3 100644 --- a/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensArrayMutation.res.txt +++ b/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensArrayMutation.res.txt @@ -1,3 +1,2 @@ -null { "data": [ 0, 0, 2, 1, 0 ] } diff --git a/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensDict.res.txt b/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensDict.res.txt index 11b44f3fdee..8159fc2ad5c 100644 --- a/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensDict.res.txt +++ b/tests/analysis_tests/tests/not_compiled/expected/SemanticTokensDict.res.txt @@ -1,3 +1,2 @@ -null { "data": [ 0, 4, 1, 1, 0, 0, 16, 3, 1, 0 ] } diff --git a/tests/analysis_tests/tests/src/expected/ArrayUtils.res.txt b/tests/analysis_tests/tests/src/expected/ArrayUtils.res.txt index 19765bd501b..e69de29bb2d 100644 --- a/tests/analysis_tests/tests/src/expected/ArrayUtils.res.txt +++ b/tests/analysis_tests/tests/src/expected/ArrayUtils.res.txt @@ -1 +0,0 @@ -null diff --git a/tests/analysis_tests/tests/src/expected/Auto.res.txt b/tests/analysis_tests/tests/src/expected/Auto.res.txt index f73194d4a8b..bbb79db1a57 100644 --- a/tests/analysis_tests/tests/src/expected/Auto.res.txt +++ b/tests/analysis_tests/tests/src/expected/Auto.res.txt @@ -1,4 +1,3 @@ -null Hover src/Auto.res 2:13 { "contents": { diff --git a/tests/analysis_tests/tests/src/expected/BrokenParserCases.res.txt b/tests/analysis_tests/tests/src/expected/BrokenParserCases.res.txt index a8fb58e26b5..9a1b5290d7e 100644 --- a/tests/analysis_tests/tests/src/expected/BrokenParserCases.res.txt +++ b/tests/analysis_tests/tests/src/expected/BrokenParserCases.res.txt @@ -1,4 +1,3 @@ -null Complete src/BrokenParserCases.res 2:24 posCursor:[2:24] posNoWhite:[2:23] Found expr:[2:11->2:30] Pexp_apply ...[2:11->2:17] (~isOff2:19->2:24=...[2:27->2:29]) diff --git a/tests/analysis_tests/tests/src/expected/CodeLens.res.txt b/tests/analysis_tests/tests/src/expected/CodeLens.res.txt index 2461edc1985..7b34a422b72 100644 --- a/tests/analysis_tests/tests/src/expected/CodeLens.res.txt +++ b/tests/analysis_tests/tests/src/expected/CodeLens.res.txt @@ -1,4 +1,3 @@ -null Code Lens src/CodeLens.res [ { diff --git a/tests/analysis_tests/tests/src/expected/Codemod.res.txt b/tests/analysis_tests/tests/src/expected/Codemod.res.txt index f6bad1233ec..5e4783d5dd5 100644 --- a/tests/analysis_tests/tests/src/expected/Codemod.res.txt +++ b/tests/analysis_tests/tests/src/expected/Codemod.res.txt @@ -1,4 +1,3 @@ -null Codemod AddMissingCasessrc/Codemod.res 3:10 switch (v1, v2) { // ^c-a (#valid, #valid) | (#invalid, _) diff --git a/tests/analysis_tests/tests/src/expected/CompletableComponent.res.txt b/tests/analysis_tests/tests/src/expected/CompletableComponent.res.txt index 19765bd501b..e69de29bb2d 100644 --- a/tests/analysis_tests/tests/src/expected/CompletableComponent.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletableComponent.res.txt @@ -1 +0,0 @@ -null diff --git a/tests/analysis_tests/tests/src/expected/CompletePrioritize1.res.txt b/tests/analysis_tests/tests/src/expected/CompletePrioritize1.res.txt index 9857fee0d03..b4b91ad03bc 100644 --- a/tests/analysis_tests/tests/src/expected/CompletePrioritize1.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletePrioritize1.res.txt @@ -1,4 +1,3 @@ -null Complete src/CompletePrioritize1.res 6:6 posCursor:[6:6] posNoWhite:[6:5] Found expr:[6:3->0:-1] Completable: Cpath Value[a]-> diff --git a/tests/analysis_tests/tests/src/expected/CompletePrioritize2.res.txt b/tests/analysis_tests/tests/src/expected/CompletePrioritize2.res.txt index e7a002e30a8..825fe421a17 100644 --- a/tests/analysis_tests/tests/src/expected/CompletePrioritize2.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletePrioritize2.res.txt @@ -1,4 +1,3 @@ -null Complete src/CompletePrioritize2.res 9:7 posCursor:[9:7] posNoWhite:[9:6] Found expr:[9:3->0:-1] Completable: Cpath Value[ax]-> diff --git a/tests/analysis_tests/tests/src/expected/Completion.res.txt b/tests/analysis_tests/tests/src/expected/Completion.res.txt index ce3fb370e53..e1e383144f1 100644 --- a/tests/analysis_tests/tests/src/expected/Completion.res.txt +++ b/tests/analysis_tests/tests/src/expected/Completion.res.txt @@ -1,4 +1,3 @@ -null Complete src/Completion.res 1:11 posCursor:[1:11] posNoWhite:[1:10] Found expr:[1:3->1:11] Pexp_ident MyList.m:[1:3->1:11] diff --git a/tests/analysis_tests/tests/src/expected/CompletionAttributes.res.txt b/tests/analysis_tests/tests/src/expected/CompletionAttributes.res.txt index 46a322d1ebb..7f4063b4132 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionAttributes.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionAttributes.res.txt @@ -1,4 +1,3 @@ -null Complete src/CompletionAttributes.res 0:8 Attribute id:modu:[0:3->0:8] label:modu Completable: Cdecorator(modu) diff --git a/tests/analysis_tests/tests/src/expected/CompletionConfiguredBuiltins.res.txt b/tests/analysis_tests/tests/src/expected/CompletionConfiguredBuiltins.res.txt index c4433c27cc0..9ba91582d7b 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionConfiguredBuiltins.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionConfiguredBuiltins.res.txt @@ -1,4 +1,3 @@ -null Complete src/CompletionConfiguredBuiltins.res 2:8 posCursor:[2:8] posNoWhite:[2:7] Found expr:[2:3->2:8] Completable: Cpath Value[x]->em diff --git a/tests/analysis_tests/tests/src/expected/CompletionDicts.res.txt b/tests/analysis_tests/tests/src/expected/CompletionDicts.res.txt index 32fac397ca5..d078a57cf57 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionDicts.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionDicts.res.txt @@ -1,4 +1,3 @@ -null Complete src/CompletionDicts.res 0:30 posCursor:[0:30] posNoWhite:[0:29] Found expr:[0:14->0:32] Pexp_apply ...[0:14->0:28] (...[0:29->0:31]) diff --git a/tests/analysis_tests/tests/src/expected/CompletionExpressions.res.txt b/tests/analysis_tests/tests/src/expected/CompletionExpressions.res.txt index f914fcac751..ac38b758281 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionExpressions.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionExpressions.res.txt @@ -1,4 +1,3 @@ -null Complete src/CompletionExpressions.res 3:20 XXX Not found! Completable: Cpattern CTuple(Value[s], Value[f]) diff --git a/tests/analysis_tests/tests/src/expected/CompletionFromModule.res.txt b/tests/analysis_tests/tests/src/expected/CompletionFromModule.res.txt index 1aed8187d4c..f29bacb9d3e 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionFromModule.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionFromModule.res.txt @@ -1,4 +1,3 @@ -null Complete src/CompletionFromModule.res 10:5 posCursor:[10:5] posNoWhite:[10:4] Found expr:[10:3->10:5] Pexp_field [10:3->10:4] _:[13:0->10:5] diff --git a/tests/analysis_tests/tests/src/expected/CompletionFromModule2.res.txt b/tests/analysis_tests/tests/src/expected/CompletionFromModule2.res.txt index 60820db4605..4b2dc43a310 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionFromModule2.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionFromModule2.res.txt @@ -1,4 +1,3 @@ -null Complete src/CompletionFromModule2.res 2:26 posCursor:[2:26] posNoWhite:[2:25] Found expr:[2:3->2:26] Pexp_field [2:3->2:25] _:[11:0->2:26] diff --git a/tests/analysis_tests/tests/src/expected/CompletionFunctionArguments.res.txt b/tests/analysis_tests/tests/src/expected/CompletionFunctionArguments.res.txt index 82279f81597..58125946098 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionFunctionArguments.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionFunctionArguments.res.txt @@ -1,4 +1,3 @@ -null Complete src/CompletionFunctionArguments.res 10:24 posCursor:[10:24] posNoWhite:[10:23] Found expr:[10:11->10:25] Pexp_apply ...[10:11->10:17] (~isOn10:19->10:23=...__ghost__[0:-1->0:-1]) diff --git a/tests/analysis_tests/tests/src/expected/CompletionInferValues.res.txt b/tests/analysis_tests/tests/src/expected/CompletionInferValues.res.txt index 1652821afe9..85e79452be0 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionInferValues.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionInferValues.res.txt @@ -1,4 +1,3 @@ -null Complete src/CompletionInferValues.res 15:43 posCursor:[15:43] posNoWhite:[15:42] Found expr:[15:33->15:43] Completable: Cpath Value[aliased]->t diff --git a/tests/analysis_tests/tests/src/expected/CompletionJsx.res.txt b/tests/analysis_tests/tests/src/expected/CompletionJsx.res.txt index 8ca26c194e7..fcc945400ab 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionJsx.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionJsx.res.txt @@ -1,4 +1,3 @@ -null Complete src/CompletionJsx.res 3:17 posCursor:[3:17] posNoWhite:[3:16] Found expr:[3:3->3:17] Completable: Cpath Value[someString]->st diff --git a/tests/analysis_tests/tests/src/expected/CompletionJsxProps.res.txt b/tests/analysis_tests/tests/src/expected/CompletionJsxProps.res.txt index 56d2321419f..ec691a188c0 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionJsxProps.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionJsxProps.res.txt @@ -1,4 +1,3 @@ -null Complete src/CompletionJsxProps.res 0:47 posCursor:[0:47] posNoWhite:[0:46] Found expr:[0:11->0:47] JSX 0:43] on[0:44->0:46]=...__ghost__[0:-1->0:-1]> _children:None diff --git a/tests/analysis_tests/tests/src/expected/CompletionMultipleEditorCompleteFrom.res.txt b/tests/analysis_tests/tests/src/expected/CompletionMultipleEditorCompleteFrom.res.txt index 74cab634f8d..7d928d8e033 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionMultipleEditorCompleteFrom.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionMultipleEditorCompleteFrom.res.txt @@ -1,4 +1,3 @@ -null Complete src/CompletionMultipleEditorCompleteFrom.res 19:5 posCursor:[19:5] posNoWhite:[19:4] Found expr:[19:3->19:5] Pexp_field [19:3->19:4] _:[22:0->19:5] diff --git a/tests/analysis_tests/tests/src/expected/CompletionNullNullable.res.txt b/tests/analysis_tests/tests/src/expected/CompletionNullNullable.res.txt index 772cab8df74..e84a9ded5c8 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionNullNullable.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionNullNullable.res.txt @@ -1,4 +1,3 @@ -null Complete src/CompletionNullNullable.res 2:5 posCursor:[2:5] posNoWhite:[2:4] Found expr:[2:3->2:5] Pexp_field [2:3->2:4] _:[5:0->2:5] diff --git a/tests/analysis_tests/tests/src/expected/CompletionObjects.res.txt b/tests/analysis_tests/tests/src/expected/CompletionObjects.res.txt index eca482b6845..c21eb0ac9c2 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionObjects.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionObjects.res.txt @@ -1,4 +1,3 @@ -null Complete src/CompletionObjects.res 5:7 posCursor:[5:7] posNoWhite:[5:5] Found expr:[2:10->9:1] posCursor:[5:7] posNoWhite:[5:5] Found expr:[2:10->9:1] diff --git a/tests/analysis_tests/tests/src/expected/CompletionPattern.res.txt b/tests/analysis_tests/tests/src/expected/CompletionPattern.res.txt index ca301641746..a37aafe05e1 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionPattern.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionPattern.res.txt @@ -1,4 +1,3 @@ -null Complete src/CompletionPattern.res 7:13 posCursor:[7:13] posNoWhite:[7:12] Found expr:[7:3->7:13] [] diff --git a/tests/analysis_tests/tests/src/expected/CompletionPipeChain.res.txt b/tests/analysis_tests/tests/src/expected/CompletionPipeChain.res.txt index f4388646a62..f95ebf76694 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionPipeChain.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionPipeChain.res.txt @@ -1,4 +1,3 @@ -null Complete src/CompletionPipeChain.res 27:16 posCursor:[27:16] posNoWhite:[27:15] Found expr:[27:11->0:-1] Completable: Cpath Value[int]-> diff --git a/tests/analysis_tests/tests/src/expected/CompletionPipeProperty.res.txt b/tests/analysis_tests/tests/src/expected/CompletionPipeProperty.res.txt index 6f20f9d38f3..c9bae2a1239 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionPipeProperty.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionPipeProperty.res.txt @@ -1,4 +1,3 @@ -null Complete src/CompletionPipeProperty.res 21:17 posCursor:[21:17] posNoWhite:[21:16] Found expr:[21:3->21:17] Pexp_field [21:3->21:16] _:[23:0->21:17] diff --git a/tests/analysis_tests/tests/src/expected/CompletionPipeSubmodules.res.txt b/tests/analysis_tests/tests/src/expected/CompletionPipeSubmodules.res.txt index 9dd64f30e1d..510bb13afbb 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionPipeSubmodules.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionPipeSubmodules.res.txt @@ -1,4 +1,3 @@ -null Complete src/CompletionPipeSubmodules.res 13:20 posCursor:[13:20] posNoWhite:[13:19] Found expr:[13:11->23:23] Pexp_apply ...[21:9->21:10] (...[13:11->21:8], ...[23:2->23:23]) diff --git a/tests/analysis_tests/tests/src/expected/CompletionRegexp.res.txt b/tests/analysis_tests/tests/src/expected/CompletionRegexp.res.txt index 5a2363e2f2b..df4a9d51192 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionRegexp.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionRegexp.res.txt @@ -1,4 +1,3 @@ -null Complete src/CompletionRegexp.res 1:17 posCursor:[1:17] posNoWhite:[1:16] Found expr:[1:3->0:-1] Completable: Cpath Value[emailPattern]-> diff --git a/tests/analysis_tests/tests/src/expected/CompletionResolve.res.txt b/tests/analysis_tests/tests/src/expected/CompletionResolve.res.txt index e52cb7bd7a9..266a68ee4b9 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionResolve.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionResolve.res.txt @@ -1,4 +1,3 @@ -null Completion resolve: Belt_Array "\nUtilities for `Array` functions.\n" diff --git a/tests/analysis_tests/tests/src/expected/CompletionSupport.res.txt b/tests/analysis_tests/tests/src/expected/CompletionSupport.res.txt index 19765bd501b..e69de29bb2d 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionSupport.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionSupport.res.txt @@ -1 +0,0 @@ -null diff --git a/tests/analysis_tests/tests/src/expected/CompletionSupport2.res.txt b/tests/analysis_tests/tests/src/expected/CompletionSupport2.res.txt index 19765bd501b..e69de29bb2d 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionSupport2.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionSupport2.res.txt @@ -1 +0,0 @@ -null diff --git a/tests/analysis_tests/tests/src/expected/CompletionTaggedTemplate.res.txt b/tests/analysis_tests/tests/src/expected/CompletionTaggedTemplate.res.txt index 938eeacad66..04b0bad5d6a 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionTaggedTemplate.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionTaggedTemplate.res.txt @@ -1,4 +1,3 @@ -null Complete src/CompletionTaggedTemplate.res 13:13 posCursor:[13:13] posNoWhite:[13:12] Found expr:[13:11->13:13] Pexp_field [13:11->13:12] _:[19:0->13:13] diff --git a/tests/analysis_tests/tests/src/expected/CompletionTypeAnnotation.res.txt b/tests/analysis_tests/tests/src/expected/CompletionTypeAnnotation.res.txt index b3a667812b2..ada3deb0560 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionTypeAnnotation.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionTypeAnnotation.res.txt @@ -1,4 +1,3 @@ -null Complete src/CompletionTypeAnnotation.res 9:22 XXX Not found! Completable: Cexpression Type[someRecord] diff --git a/tests/analysis_tests/tests/src/expected/CompletionTypeT.res.txt b/tests/analysis_tests/tests/src/expected/CompletionTypeT.res.txt index 85299e59ef1..b8bc6630e61 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionTypeT.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionTypeT.res.txt @@ -1,4 +1,3 @@ -null Complete src/CompletionTypeT.res 4:26 XXX Not found! Completable: Cpattern Value[date] diff --git a/tests/analysis_tests/tests/src/expected/CompletionTypedArrays.res.txt b/tests/analysis_tests/tests/src/expected/CompletionTypedArrays.res.txt index 2c112e6a63d..bfce4d1d987 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionTypedArrays.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionTypedArrays.res.txt @@ -1,4 +1,3 @@ -null Complete src/CompletionTypedArrays.res 1:17 posCursor:[1:17] posNoWhite:[1:16] Found expr:[1:3->1:17] Pexp_field [1:3->1:16] _:[4:0->1:17] diff --git a/tests/analysis_tests/tests/src/expected/Component.res.txt b/tests/analysis_tests/tests/src/expected/Component.res.txt index 19765bd501b..e69de29bb2d 100644 --- a/tests/analysis_tests/tests/src/expected/Component.res.txt +++ b/tests/analysis_tests/tests/src/expected/Component.res.txt @@ -1 +0,0 @@ -null diff --git a/tests/analysis_tests/tests/src/expected/Component.resi.txt b/tests/analysis_tests/tests/src/expected/Component.resi.txt index 19765bd501b..e69de29bb2d 100644 --- a/tests/analysis_tests/tests/src/expected/Component.resi.txt +++ b/tests/analysis_tests/tests/src/expected/Component.resi.txt @@ -1 +0,0 @@ -null diff --git a/tests/analysis_tests/tests/src/expected/CreateInterface.res.txt b/tests/analysis_tests/tests/src/expected/CreateInterface.res.txt index e06fbcf39fa..998459a8a1c 100644 --- a/tests/analysis_tests/tests/src/expected/CreateInterface.res.txt +++ b/tests/analysis_tests/tests/src/expected/CreateInterface.res.txt @@ -1,4 +1,3 @@ -null Create Interface src/CreateInterface.res type r = {name: string, age: int} let add: (~x: int, ~y: int) => int diff --git a/tests/analysis_tests/tests/src/expected/Cross.res.txt b/tests/analysis_tests/tests/src/expected/Cross.res.txt index 60bbc9480f9..72f0d1a536b 100644 --- a/tests/analysis_tests/tests/src/expected/Cross.res.txt +++ b/tests/analysis_tests/tests/src/expected/Cross.res.txt @@ -1,4 +1,3 @@ -null References src/Cross.res 0:17 [ { diff --git a/tests/analysis_tests/tests/src/expected/Dce.res.txt b/tests/analysis_tests/tests/src/expected/Dce.res.txt index fe0e791c6fd..58c835d7a2b 100644 --- a/tests/analysis_tests/tests/src/expected/Dce.res.txt +++ b/tests/analysis_tests/tests/src/expected/Dce.res.txt @@ -1,4 +1,3 @@ -null DCE src/Dce.res issues:1 diff --git a/tests/analysis_tests/tests/src/expected/Debug.res.txt b/tests/analysis_tests/tests/src/expected/Debug.res.txt index df7a1419d43..fbceb5a80af 100644 --- a/tests/analysis_tests/tests/src/expected/Debug.res.txt +++ b/tests/analysis_tests/tests/src/expected/Debug.res.txt @@ -1,4 +1,3 @@ -null Definition src/Debug.res 2:27 { "range": { diff --git a/tests/analysis_tests/tests/src/expected/Definition.res.txt b/tests/analysis_tests/tests/src/expected/Definition.res.txt index 33ff76cf648..ae0362539ca 100644 --- a/tests/analysis_tests/tests/src/expected/Definition.res.txt +++ b/tests/analysis_tests/tests/src/expected/Definition.res.txt @@ -1,4 +1,3 @@ -null Definition src/Definition.res 2:8 { "range": { diff --git a/tests/analysis_tests/tests/src/expected/DefinitionWithInterface.res.txt b/tests/analysis_tests/tests/src/expected/DefinitionWithInterface.res.txt index 012b647fe15..fa6c727e3db 100644 --- a/tests/analysis_tests/tests/src/expected/DefinitionWithInterface.res.txt +++ b/tests/analysis_tests/tests/src/expected/DefinitionWithInterface.res.txt @@ -1,4 +1,3 @@ -null Definition src/DefinitionWithInterface.res 0:4 { "range": { diff --git a/tests/analysis_tests/tests/src/expected/DefinitionWithInterface.resi.txt b/tests/analysis_tests/tests/src/expected/DefinitionWithInterface.resi.txt index 69366054ad7..e6f9264f2ce 100644 --- a/tests/analysis_tests/tests/src/expected/DefinitionWithInterface.resi.txt +++ b/tests/analysis_tests/tests/src/expected/DefinitionWithInterface.resi.txt @@ -1,4 +1,3 @@ -null Definition src/DefinitionWithInterface.resi 0:4 { "range": { diff --git a/tests/analysis_tests/tests/src/expected/Destructuring.res.txt b/tests/analysis_tests/tests/src/expected/Destructuring.res.txt index 2454582e2cd..7aac4317e02 100644 --- a/tests/analysis_tests/tests/src/expected/Destructuring.res.txt +++ b/tests/analysis_tests/tests/src/expected/Destructuring.res.txt @@ -1,4 +1,3 @@ -null Complete src/Destructuring.res 4:11 posCursor:[4:11] posNoWhite:[4:9] Found pattern:[4:4->4:12] Completable: Cpattern Value[x]->recordBody diff --git a/tests/analysis_tests/tests/src/expected/Div.res.txt b/tests/analysis_tests/tests/src/expected/Div.res.txt index 954d04057dd..9dc155760cb 100644 --- a/tests/analysis_tests/tests/src/expected/Div.res.txt +++ b/tests/analysis_tests/tests/src/expected/Div.res.txt @@ -1,4 +1,3 @@ -null Hover src/Div.res 0:10 { "contents": { "kind": "markdown", "value": "```rescript\nstring\n```" } } diff --git a/tests/analysis_tests/tests/src/expected/DocComments.res.txt b/tests/analysis_tests/tests/src/expected/DocComments.res.txt index ff323e5b1d9..f9adbf2b358 100644 --- a/tests/analysis_tests/tests/src/expected/DocComments.res.txt +++ b/tests/analysis_tests/tests/src/expected/DocComments.res.txt @@ -1,4 +1,3 @@ -null Hover src/DocComments.res 9:9 { "contents": { diff --git a/tests/analysis_tests/tests/src/expected/DocumentSymbol.res.txt b/tests/analysis_tests/tests/src/expected/DocumentSymbol.res.txt index 4ecd801db03..48eb87b68fb 100644 --- a/tests/analysis_tests/tests/src/expected/DocumentSymbol.res.txt +++ b/tests/analysis_tests/tests/src/expected/DocumentSymbol.res.txt @@ -1,4 +1,3 @@ -null DocumentSymbol src/DocumentSymbol.res [ { diff --git a/tests/analysis_tests/tests/src/expected/DotPipeCompleteFromCurrentModule.res.txt b/tests/analysis_tests/tests/src/expected/DotPipeCompleteFromCurrentModule.res.txt index dda26863dc0..43bbf0c5b92 100644 --- a/tests/analysis_tests/tests/src/expected/DotPipeCompleteFromCurrentModule.res.txt +++ b/tests/analysis_tests/tests/src/expected/DotPipeCompleteFromCurrentModule.res.txt @@ -1,4 +1,3 @@ -null Complete src/DotPipeCompleteFromCurrentModule.res 10:13 posCursor:[10:13] posNoWhite:[10:12] Found expr:[9:12->13:5] posCursor:[10:13] posNoWhite:[10:12] Found expr:[10:11->12:10] diff --git a/tests/analysis_tests/tests/src/expected/DotPipeCompletionSpec.res.txt b/tests/analysis_tests/tests/src/expected/DotPipeCompletionSpec.res.txt index 1f509e6b2e7..39d67a6d1da 100644 --- a/tests/analysis_tests/tests/src/expected/DotPipeCompletionSpec.res.txt +++ b/tests/analysis_tests/tests/src/expected/DotPipeCompletionSpec.res.txt @@ -1,4 +1,3 @@ -null Complete src/DotPipeCompletionSpec.res 15:5 posCursor:[15:5] posNoWhite:[15:4] Found expr:[15:3->15:5] Pexp_field [15:3->15:4] _:[18:0->15:5] diff --git a/tests/analysis_tests/tests/src/expected/EnvCompletion.res.txt b/tests/analysis_tests/tests/src/expected/EnvCompletion.res.txt index 1514c56c2ff..ebc1978fd36 100644 --- a/tests/analysis_tests/tests/src/expected/EnvCompletion.res.txt +++ b/tests/analysis_tests/tests/src/expected/EnvCompletion.res.txt @@ -1,4 +1,3 @@ -null Complete src/EnvCompletion.res 10:17 XXX Not found! Completable: Cpattern Value[res] diff --git a/tests/analysis_tests/tests/src/expected/EnvCompletionOtherFile.res.txt b/tests/analysis_tests/tests/src/expected/EnvCompletionOtherFile.res.txt index 19765bd501b..e69de29bb2d 100644 --- a/tests/analysis_tests/tests/src/expected/EnvCompletionOtherFile.res.txt +++ b/tests/analysis_tests/tests/src/expected/EnvCompletionOtherFile.res.txt @@ -1 +0,0 @@ -null diff --git a/tests/analysis_tests/tests/src/expected/ExhaustiveSwitch.res.txt b/tests/analysis_tests/tests/src/expected/ExhaustiveSwitch.res.txt index cb732512456..4088bf3e27d 100644 --- a/tests/analysis_tests/tests/src/expected/ExhaustiveSwitch.res.txt +++ b/tests/analysis_tests/tests/src/expected/ExhaustiveSwitch.res.txt @@ -1,4 +1,3 @@ -null Complete src/ExhaustiveSwitch.res 8:24 XXX Not found! Completable: CexhaustiveSwitch Value[withSomeVarian] diff --git a/tests/analysis_tests/tests/src/expected/Fastify.res.txt b/tests/analysis_tests/tests/src/expected/Fastify.res.txt index 19765bd501b..e69de29bb2d 100644 --- a/tests/analysis_tests/tests/src/expected/Fastify.res.txt +++ b/tests/analysis_tests/tests/src/expected/Fastify.res.txt @@ -1 +0,0 @@ -null diff --git a/tests/analysis_tests/tests/src/expected/FastifyExt.res.txt b/tests/analysis_tests/tests/src/expected/FastifyExt.res.txt index 19765bd501b..e69de29bb2d 100644 --- a/tests/analysis_tests/tests/src/expected/FastifyExt.res.txt +++ b/tests/analysis_tests/tests/src/expected/FastifyExt.res.txt @@ -1 +0,0 @@ -null diff --git a/tests/analysis_tests/tests/src/expected/Firebase.res.txt b/tests/analysis_tests/tests/src/expected/Firebase.res.txt index 13e02724061..9a57d461021 100644 --- a/tests/analysis_tests/tests/src/expected/Firebase.res.txt +++ b/tests/analysis_tests/tests/src/expected/Firebase.res.txt @@ -1,4 +1,3 @@ -null Complete src/Firebase.res 30:9 posCursor:[30:9] posNoWhite:[30:8] Found expr:[30:5->30:9] Pexp_field [30:5->30:8] _:[32:0->30:9] diff --git a/tests/analysis_tests/tests/src/expected/FirstClassModules.res.txt b/tests/analysis_tests/tests/src/expected/FirstClassModules.res.txt index 54e07b333f4..11f40d8c5f7 100644 --- a/tests/analysis_tests/tests/src/expected/FirstClassModules.res.txt +++ b/tests/analysis_tests/tests/src/expected/FirstClassModules.res.txt @@ -1,4 +1,3 @@ -null Hover src/FirstClassModules.res 11:16 { "contents": { diff --git a/tests/analysis_tests/tests/src/expected/Fragment.res.txt b/tests/analysis_tests/tests/src/expected/Fragment.res.txt index e0448e4d923..09ba7d34d15 100644 --- a/tests/analysis_tests/tests/src/expected/Fragment.res.txt +++ b/tests/analysis_tests/tests/src/expected/Fragment.res.txt @@ -1,4 +1,3 @@ -null Hover src/Fragment.res 6:19 { "contents": { diff --git a/tests/analysis_tests/tests/src/expected/Highlight.res.txt b/tests/analysis_tests/tests/src/expected/Highlight.res.txt index cf43ee1754e..6ee7e2e8005 100644 --- a/tests/analysis_tests/tests/src/expected/Highlight.res.txt +++ b/tests/analysis_tests/tests/src/expected/Highlight.res.txt @@ -1,4 +1,3 @@ -null Highlight src/Highlight.res structure items:39 diagnostics:0 Lident: M 0:7 Namespace diff --git a/tests/analysis_tests/tests/src/expected/Hover.res.txt b/tests/analysis_tests/tests/src/expected/Hover.res.txt index dda30dee9a8..f9e5a125fd2 100644 --- a/tests/analysis_tests/tests/src/expected/Hover.res.txt +++ b/tests/analysis_tests/tests/src/expected/Hover.res.txt @@ -1,4 +1,3 @@ -null Hover src/Hover.res 0:4 { "contents": { "kind": "markdown", "value": "```rescript\nint\n```" } } @@ -109,11 +108,13 @@ Hover src/Hover.res 91:10 Nothing at that position. Now trying to use completion. posCursor:[91:10] posNoWhite:[91:8] Found expr:[88:2->91:9] JSX 88:7] > _children:89:4 +null Hover src/Hover.res 98:10 Nothing at that position. Now trying to use completion. posCursor:[98:10] posNoWhite:[98:9] Found expr:[95:2->98:10] JSX 95:8] > _children:96:4 +null Hover src/Hover.res 103:25 { "contents": { "kind": "markdown", "value": "```rescript\nfloat\n```" } } diff --git a/tests/analysis_tests/tests/src/expected/IncludeModuleCompletion.res.txt b/tests/analysis_tests/tests/src/expected/IncludeModuleCompletion.res.txt index c5da0283602..add8389304e 100644 --- a/tests/analysis_tests/tests/src/expected/IncludeModuleCompletion.res.txt +++ b/tests/analysis_tests/tests/src/expected/IncludeModuleCompletion.res.txt @@ -1,4 +1,3 @@ -null Complete src/IncludeModuleCompletion.res 47:11 posCursor:[47:11] posNoWhite:[47:10] Found expr:[45:13->52:3] posCursor:[47:11] posNoWhite:[47:10] Found expr:[46:4->51:5] diff --git a/tests/analysis_tests/tests/src/expected/InlayHint.res.txt b/tests/analysis_tests/tests/src/expected/InlayHint.res.txt index 6c838cfeb3f..62c21eb99a5 100644 --- a/tests/analysis_tests/tests/src/expected/InlayHint.res.txt +++ b/tests/analysis_tests/tests/src/expected/InlayHint.res.txt @@ -1,4 +1,3 @@ -null Inlay Hint src/InlayHint.res 1:34 [ { diff --git a/tests/analysis_tests/tests/src/expected/Jsx2.res.txt b/tests/analysis_tests/tests/src/expected/Jsx2.res.txt index 31c34b0afa8..62eb0923735 100644 --- a/tests/analysis_tests/tests/src/expected/Jsx2.res.txt +++ b/tests/analysis_tests/tests/src/expected/Jsx2.res.txt @@ -1,4 +1,3 @@ -null Definition src/Jsx2.res 5:9 { "range": { diff --git a/tests/analysis_tests/tests/src/expected/Jsx2.resi.txt b/tests/analysis_tests/tests/src/expected/Jsx2.resi.txt index e74533fae77..86601cdb5e8 100644 --- a/tests/analysis_tests/tests/src/expected/Jsx2.resi.txt +++ b/tests/analysis_tests/tests/src/expected/Jsx2.resi.txt @@ -1,4 +1,3 @@ -null Hover src/Jsx2.resi 1:4 { "contents": { diff --git a/tests/analysis_tests/tests/src/expected/JsxV4.res.txt b/tests/analysis_tests/tests/src/expected/JsxV4.res.txt index db43a5685d3..70fffee94dd 100644 --- a/tests/analysis_tests/tests/src/expected/JsxV4.res.txt +++ b/tests/analysis_tests/tests/src/expected/JsxV4.res.txt @@ -1,4 +1,3 @@ -null Definition src/JsxV4.res 8:9 { "range": { diff --git a/tests/analysis_tests/tests/src/expected/LongIdentTest.res.txt b/tests/analysis_tests/tests/src/expected/LongIdentTest.res.txt index e8dbb77f07f..71897e76d4b 100644 --- a/tests/analysis_tests/tests/src/expected/LongIdentTest.res.txt +++ b/tests/analysis_tests/tests/src/expected/LongIdentTest.res.txt @@ -1,4 +1,3 @@ -null Hover src/LongIdentTest.res 2:13 { "contents": { "kind": "markdown", "value": "```rescript\nint\n```" } } diff --git a/tests/analysis_tests/tests/src/expected/ModuleStuff.res.txt b/tests/analysis_tests/tests/src/expected/ModuleStuff.res.txt index 19765bd501b..e69de29bb2d 100644 --- a/tests/analysis_tests/tests/src/expected/ModuleStuff.res.txt +++ b/tests/analysis_tests/tests/src/expected/ModuleStuff.res.txt @@ -1 +0,0 @@ -null diff --git a/tests/analysis_tests/tests/src/expected/NestedRecords.res.txt b/tests/analysis_tests/tests/src/expected/NestedRecords.res.txt index 58fe43964c1..0b948732960 100644 --- a/tests/analysis_tests/tests/src/expected/NestedRecords.res.txt +++ b/tests/analysis_tests/tests/src/expected/NestedRecords.res.txt @@ -1,4 +1,3 @@ -null Hover src/NestedRecords.res 17:5 Nothing at that position. Now trying to use completion. posCursor:[17:5] posNoWhite:[17:4] Found expr:[17:3->17:10] diff --git a/tests/analysis_tests/tests/src/expected/NestedRecordsHover.res.txt b/tests/analysis_tests/tests/src/expected/NestedRecordsHover.res.txt index eab2e31737f..04b0c039ae7 100644 --- a/tests/analysis_tests/tests/src/expected/NestedRecordsHover.res.txt +++ b/tests/analysis_tests/tests/src/expected/NestedRecordsHover.res.txt @@ -1,4 +1,3 @@ -null Hover src/NestedRecordsHover.res 8:7 { "contents": { diff --git a/tests/analysis_tests/tests/src/expected/Objects.res.txt b/tests/analysis_tests/tests/src/expected/Objects.res.txt index 19765bd501b..e69de29bb2d 100644 --- a/tests/analysis_tests/tests/src/expected/Objects.res.txt +++ b/tests/analysis_tests/tests/src/expected/Objects.res.txt @@ -1 +0,0 @@ -null diff --git a/tests/analysis_tests/tests/src/expected/Patterns.res.txt b/tests/analysis_tests/tests/src/expected/Patterns.res.txt index dabc3548b61..6a3d6c3ef75 100644 --- a/tests/analysis_tests/tests/src/expected/Patterns.res.txt +++ b/tests/analysis_tests/tests/src/expected/Patterns.res.txt @@ -1,4 +1,3 @@ -null Definition src/Patterns.res 19:10 { "range": { diff --git a/tests/analysis_tests/tests/src/expected/PolyRec.res.txt b/tests/analysis_tests/tests/src/expected/PolyRec.res.txt index feaa6b1356f..db379b2ce48 100644 --- a/tests/analysis_tests/tests/src/expected/PolyRec.res.txt +++ b/tests/analysis_tests/tests/src/expected/PolyRec.res.txt @@ -1,4 +1,3 @@ -null Hover src/PolyRec.res 12:10 { "contents": { diff --git a/tests/analysis_tests/tests/src/expected/PrepareRename.res.txt b/tests/analysis_tests/tests/src/expected/PrepareRename.res.txt index 0249638ff38..8c174c18c7a 100644 --- a/tests/analysis_tests/tests/src/expected/PrepareRename.res.txt +++ b/tests/analysis_tests/tests/src/expected/PrepareRename.res.txt @@ -1,4 +1,3 @@ -null PrepareRename src/PrepareRename.res 0:4 { "end": { "character": 5, "line": 0 }, diff --git a/tests/analysis_tests/tests/src/expected/QueryFile.res.txt b/tests/analysis_tests/tests/src/expected/QueryFile.res.txt index 19765bd501b..e69de29bb2d 100644 --- a/tests/analysis_tests/tests/src/expected/QueryFile.res.txt +++ b/tests/analysis_tests/tests/src/expected/QueryFile.res.txt @@ -1 +0,0 @@ -null diff --git a/tests/analysis_tests/tests/src/expected/RecModules.res.txt b/tests/analysis_tests/tests/src/expected/RecModules.res.txt index 36ca3b53204..393cb490023 100644 --- a/tests/analysis_tests/tests/src/expected/RecModules.res.txt +++ b/tests/analysis_tests/tests/src/expected/RecModules.res.txt @@ -1,4 +1,3 @@ -null Hover src/RecModules.res 18:12 { "contents": { diff --git a/tests/analysis_tests/tests/src/expected/RecordCompletion.res.txt b/tests/analysis_tests/tests/src/expected/RecordCompletion.res.txt index 8ef4eb227c2..6d71c563b2c 100644 --- a/tests/analysis_tests/tests/src/expected/RecordCompletion.res.txt +++ b/tests/analysis_tests/tests/src/expected/RecordCompletion.res.txt @@ -1,4 +1,3 @@ -null Complete src/RecordCompletion.res 8:9 posCursor:[8:9] posNoWhite:[8:8] Found expr:[8:3->8:9] Completable: Cpath Value[t].n->m diff --git a/tests/analysis_tests/tests/src/expected/RecoveryOnProp.res.txt b/tests/analysis_tests/tests/src/expected/RecoveryOnProp.res.txt index fcc4835083a..1bb20596944 100644 --- a/tests/analysis_tests/tests/src/expected/RecoveryOnProp.res.txt +++ b/tests/analysis_tests/tests/src/expected/RecoveryOnProp.res.txt @@ -1,4 +1,3 @@ -null Complete src/RecoveryOnProp.res 6:26 posCursor:[6:26] posNoWhite:[6:25] Found expr:[3:2->11:8] JSX 3:6] onClick[4:4->4:11]=...[4:13->0:-1]> _children:None diff --git a/tests/analysis_tests/tests/src/expected/References.res.txt b/tests/analysis_tests/tests/src/expected/References.res.txt index 3ca1e05c934..f106eb290c2 100644 --- a/tests/analysis_tests/tests/src/expected/References.res.txt +++ b/tests/analysis_tests/tests/src/expected/References.res.txt @@ -1,4 +1,3 @@ -null References src/References.res 0:4 [ { diff --git a/tests/analysis_tests/tests/src/expected/ReferencesWithInterface.res.txt b/tests/analysis_tests/tests/src/expected/ReferencesWithInterface.res.txt index addfa960ae0..f782c36af0f 100644 --- a/tests/analysis_tests/tests/src/expected/ReferencesWithInterface.res.txt +++ b/tests/analysis_tests/tests/src/expected/ReferencesWithInterface.res.txt @@ -1,4 +1,3 @@ -null References src/ReferencesWithInterface.res 0:4 [ { diff --git a/tests/analysis_tests/tests/src/expected/ReferencesWithInterface.resi.txt b/tests/analysis_tests/tests/src/expected/ReferencesWithInterface.resi.txt index ebe9734470c..29dbae2b2bd 100644 --- a/tests/analysis_tests/tests/src/expected/ReferencesWithInterface.resi.txt +++ b/tests/analysis_tests/tests/src/expected/ReferencesWithInterface.resi.txt @@ -1,4 +1,3 @@ -null References src/ReferencesWithInterface.resi 0:4 [ { diff --git a/tests/analysis_tests/tests/src/expected/Rename.res.txt b/tests/analysis_tests/tests/src/expected/Rename.res.txt index 3600b451cb3..2ca2e865ccc 100644 --- a/tests/analysis_tests/tests/src/expected/Rename.res.txt +++ b/tests/analysis_tests/tests/src/expected/Rename.res.txt @@ -1,4 +1,3 @@ -null Rename src/Rename.res 0:4 y [ { diff --git a/tests/analysis_tests/tests/src/expected/RenameWithInterface.res.txt b/tests/analysis_tests/tests/src/expected/RenameWithInterface.res.txt index 5712a9b25b7..0f699b73991 100644 --- a/tests/analysis_tests/tests/src/expected/RenameWithInterface.res.txt +++ b/tests/analysis_tests/tests/src/expected/RenameWithInterface.res.txt @@ -1,4 +1,3 @@ -null Rename src/RenameWithInterface.res 0:4 y [ { diff --git a/tests/analysis_tests/tests/src/expected/RenameWithInterface.resi.txt b/tests/analysis_tests/tests/src/expected/RenameWithInterface.resi.txt index 3b60a46e30f..2e8ea2d1af7 100644 --- a/tests/analysis_tests/tests/src/expected/RenameWithInterface.resi.txt +++ b/tests/analysis_tests/tests/src/expected/RenameWithInterface.resi.txt @@ -1,4 +1,3 @@ -null Rename src/RenameWithInterface.resi 0:4 y [ { diff --git a/tests/analysis_tests/tests/src/expected/Reprod.res.txt b/tests/analysis_tests/tests/src/expected/Reprod.res.txt index 49708d973b2..172fd24e1b4 100644 --- a/tests/analysis_tests/tests/src/expected/Reprod.res.txt +++ b/tests/analysis_tests/tests/src/expected/Reprod.res.txt @@ -1,4 +1,3 @@ -null Complete src/Reprod.res 7:53 posCursor:[7:53] posNoWhite:[7:52] Found expr:[7:11->7:56] Pexp_apply ...[7:11->7:20] (~variables7:22->7:31=...[7:32->7:55]) diff --git a/tests/analysis_tests/tests/src/expected/Rxjs.res.txt b/tests/analysis_tests/tests/src/expected/Rxjs.res.txt index 19765bd501b..e69de29bb2d 100644 --- a/tests/analysis_tests/tests/src/expected/Rxjs.res.txt +++ b/tests/analysis_tests/tests/src/expected/Rxjs.res.txt @@ -1 +0,0 @@ -null diff --git a/tests/analysis_tests/tests/src/expected/RxjsCompletion.res.txt b/tests/analysis_tests/tests/src/expected/RxjsCompletion.res.txt index d587d1bc4c9..f9c886cd2bc 100644 --- a/tests/analysis_tests/tests/src/expected/RxjsCompletion.res.txt +++ b/tests/analysis_tests/tests/src/expected/RxjsCompletion.res.txt @@ -1,4 +1,3 @@ -null Complete src/RxjsCompletion.res 26:29 posCursor:[26:29] posNoWhite:[26:28] Found expr:[10:17->38:1] posCursor:[26:29] posNoWhite:[26:28] Found expr:[11:2->32:78] diff --git a/tests/analysis_tests/tests/src/expected/SchemaAssets.res.txt b/tests/analysis_tests/tests/src/expected/SchemaAssets.res.txt index 19765bd501b..e69de29bb2d 100644 --- a/tests/analysis_tests/tests/src/expected/SchemaAssets.res.txt +++ b/tests/analysis_tests/tests/src/expected/SchemaAssets.res.txt @@ -1 +0,0 @@ -null diff --git a/tests/analysis_tests/tests/src/expected/ShadowedBelt.res.txt b/tests/analysis_tests/tests/src/expected/ShadowedBelt.res.txt index 19765bd501b..e69de29bb2d 100644 --- a/tests/analysis_tests/tests/src/expected/ShadowedBelt.res.txt +++ b/tests/analysis_tests/tests/src/expected/ShadowedBelt.res.txt @@ -1 +0,0 @@ -null diff --git a/tests/analysis_tests/tests/src/expected/SignatureHelp.res.txt b/tests/analysis_tests/tests/src/expected/SignatureHelp.res.txt index 7d6c9cd00f6..b30ae0c7e3b 100644 --- a/tests/analysis_tests/tests/src/expected/SignatureHelp.res.txt +++ b/tests/analysis_tests/tests/src/expected/SignatureHelp.res.txt @@ -1,4 +1,3 @@ -null Signature help src/SignatureHelp.res 16:20 posCursor:[16:19] posNoWhite:[16:18] Found expr:[16:11->16:20] Pexp_apply ...[16:11->16:19] (...[46:0->16:20]) diff --git a/tests/analysis_tests/tests/src/expected/Support.res.txt b/tests/analysis_tests/tests/src/expected/Support.res.txt index 19765bd501b..e69de29bb2d 100644 --- a/tests/analysis_tests/tests/src/expected/Support.res.txt +++ b/tests/analysis_tests/tests/src/expected/Support.res.txt @@ -1 +0,0 @@ -null diff --git a/tests/analysis_tests/tests/src/expected/TableclothMap.res.txt b/tests/analysis_tests/tests/src/expected/TableclothMap.res.txt index 19765bd501b..e69de29bb2d 100644 --- a/tests/analysis_tests/tests/src/expected/TableclothMap.res.txt +++ b/tests/analysis_tests/tests/src/expected/TableclothMap.res.txt @@ -1 +0,0 @@ -null diff --git a/tests/analysis_tests/tests/src/expected/TableclothMap.resi.txt b/tests/analysis_tests/tests/src/expected/TableclothMap.resi.txt index 19765bd501b..e69de29bb2d 100644 --- a/tests/analysis_tests/tests/src/expected/TableclothMap.resi.txt +++ b/tests/analysis_tests/tests/src/expected/TableclothMap.resi.txt @@ -1 +0,0 @@ -null diff --git a/tests/analysis_tests/tests/src/expected/TypeArgCtx.res.txt b/tests/analysis_tests/tests/src/expected/TypeArgCtx.res.txt index b25c3cc3298..200eeba6a49 100644 --- a/tests/analysis_tests/tests/src/expected/TypeArgCtx.res.txt +++ b/tests/analysis_tests/tests/src/expected/TypeArgCtx.res.txt @@ -1,4 +1,3 @@ -null Complete src/TypeArgCtx.res 7:36 posCursor:[7:36] posNoWhite:[7:35] Found pattern:[7:26->7:39] Ppat_construct Ok:[7:26->7:28] diff --git a/tests/analysis_tests/tests/src/expected/TypeAtPosCompletion.res.txt b/tests/analysis_tests/tests/src/expected/TypeAtPosCompletion.res.txt index a3a546b7c58..7c94f2b0234 100644 --- a/tests/analysis_tests/tests/src/expected/TypeAtPosCompletion.res.txt +++ b/tests/analysis_tests/tests/src/expected/TypeAtPosCompletion.res.txt @@ -1,4 +1,3 @@ -null Complete src/TypeAtPosCompletion.res 7:17 posCursor:[7:17] posNoWhite:[7:15] Found expr:[6:16->9:1] Completable: Cexpression CTypeAtPos()->recordBody diff --git a/tests/analysis_tests/tests/src/expected/TypeDefinition.res.txt b/tests/analysis_tests/tests/src/expected/TypeDefinition.res.txt index 0ef64e8dc8b..4dfc5f23aa6 100644 --- a/tests/analysis_tests/tests/src/expected/TypeDefinition.res.txt +++ b/tests/analysis_tests/tests/src/expected/TypeDefinition.res.txt @@ -1,4 +1,3 @@ -null TypeDefinition src/TypeDefinition.res 2:9 { "range": { diff --git a/tests/analysis_tests/tests/src/expected/Xform.res.txt b/tests/analysis_tests/tests/src/expected/Xform.res.txt index cd7e637596f..90b5d535ddb 100644 --- a/tests/analysis_tests/tests/src/expected/Xform.res.txt +++ b/tests/analysis_tests/tests/src/expected/Xform.res.txt @@ -1,4 +1,3 @@ -null Xform src/Xform.res 6:5 posCursor:[6:3] posNoWhite:[6:1] Found expr:[6:0->11:1] Completable: Cpath Value[kind] diff --git a/tests/analysis_tests/tests/src/expected/typeConstraint.res.txt b/tests/analysis_tests/tests/src/expected/typeConstraint.res.txt index 19765bd501b..e69de29bb2d 100644 --- a/tests/analysis_tests/tests/src/expected/typeConstraint.res.txt +++ b/tests/analysis_tests/tests/src/expected/typeConstraint.res.txt @@ -1 +0,0 @@ -null From 25c6dcce7330e5ab9df9f10f9b7d63500e734d8a Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sat, 23 May 2026 13:17:22 -0300 Subject: [PATCH 07/24] Update GenericJsxCompletion.res.txt --- .../src/expected/GenericJsxCompletion.res.txt | 167 ++++++++++++------ 1 file changed, 111 insertions(+), 56 deletions(-) diff --git a/tests/analysis_tests/tests-generic-jsx-transform/src/expected/GenericJsxCompletion.res.txt b/tests/analysis_tests/tests-generic-jsx-transform/src/expected/GenericJsxCompletion.res.txt index eb40ec0ba92..8d98c73f76b 100644 --- a/tests/analysis_tests/tests-generic-jsx-transform/src/expected/GenericJsxCompletion.res.txt +++ b/tests/analysis_tests/tests-generic-jsx-transform/src/expected/GenericJsxCompletion.res.txt @@ -5,25 +5,35 @@ Completable: Cjsx([div], "", []) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path GenericJsx.Elements.props -[{ - "label": "testing", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "test2", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "testing", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": null - }, { - "label": "children", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "test2", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "element", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "children", + "tags": [] + } +] Complete src/GenericJsxCompletion.res 3:17 posCursor:[3:17] posNoWhite:[3:16] Found expr:[3:3->3:18] @@ -33,19 +43,26 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath CJsxPropValue [div] testing Path GenericJsx.Elements.props -[{ - "label": "true", - "kind": 4, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }, { - "label": "false", + "documentation": { "kind": "markdown", "value": "" }, "kind": 4, - "tags": [], + "label": "true", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "bool", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 4, + "label": "false", + "tags": [] + } +] Complete src/GenericJsxCompletion.res 14:21 posCursor:[14:21] posNoWhite:[14:20] Found expr:[8:13->23:3] @@ -64,27 +81,46 @@ ContextPath Value[someString] Path someString Path Stdlib.String.st Path st -[{ - "label": "GenericJsx.string", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "Turns `string` into a JSX element so it can be used inside of JSX."}, - "sortText": "A", - "insertTextFormat": 2 - }, { - "label": "String.startsWith", + "documentation": { + "kind": "markdown", + "value": "Turns `string` into a JSX element so it can be used inside of JSX." + }, + "insertTextFormat": 2, "kind": 12, - "tags": [], + "label": "GenericJsx.string", + "sortText": "A", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(string, string) => bool", - "documentation": {"kind": "markdown", "value": "\n`startsWith(str, substr)` returns `true` if the `str` starts with `substr`,\n`false` otherwise.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWith(\"BuckleScript\", \"Buckle\") == true\nString.startsWith(\"BuckleScript\", \"\") == true\nString.startsWith(\"JavaScript\", \"Buckle\") == false\n```\n"} - }, { - "label": "String.startsWithFrom", + "documentation": { + "kind": "markdown", + "value": "\n`startsWith(str, substr)` returns `true` if the `str` starts with `substr`,\n`false` otherwise.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWith(\"BuckleScript\", \"Buckle\") == true\nString.startsWith(\"BuckleScript\", \"\") == true\nString.startsWith(\"JavaScript\", \"Buckle\") == false\n```\n" + }, "kind": 12, - "tags": [], + "label": "String.startsWith", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(string, string, int) => bool", - "documentation": {"kind": "markdown", "value": "\n`startsWithFrom(str, substr, n)` returns `true` if the `str` starts\nwith `substr` starting at position `n`, `false` otherwise. If `n` is negative,\nthe search starts at the beginning of `str`.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWithFrom(\"BuckleScript\", \"kle\", 3) == true\nString.startsWithFrom(\"BuckleScript\", \"\", 3) == true\nString.startsWithFrom(\"JavaScript\", \"Buckle\", 2) == false\n```\n"} - }] + "documentation": { + "kind": "markdown", + "value": "\n`startsWithFrom(str, substr, n)` returns `true` if the `str` starts\nwith `substr` starting at position `n`, `false` otherwise. If `n` is negative,\nthe search starts at the beginning of `str`.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWithFrom(\"BuckleScript\", \"kle\", 3) == true\nString.startsWithFrom(\"BuckleScript\", \"\", 3) == true\nString.startsWithFrom(\"JavaScript\", \"Buckle\", 2) == false\n```\n" + }, + "kind": 12, + "label": "String.startsWithFrom", + "tags": [] + } +] Complete src/GenericJsxCompletion.res 20:24 posCursor:[20:24] posNoWhite:[20:23] Found expr:[8:13->23:3] @@ -106,25 +142,44 @@ ContextPath Value[someString] Path someString Path Stdlib.String.st Path st -[{ - "label": "string", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "string", - "documentation": {"kind": "markdown", "value": "Turns `string` into a JSX element so it can be used inside of JSX."}, - "sortText": "A", - "insertTextFormat": 2 - }, { - "label": "String.startsWith", + "documentation": { + "kind": "markdown", + "value": "Turns `string` into a JSX element so it can be used inside of JSX." + }, + "insertTextFormat": 2, "kind": 12, - "tags": [], + "label": "string", + "sortText": "A", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(string, string) => bool", - "documentation": {"kind": "markdown", "value": "\n`startsWith(str, substr)` returns `true` if the `str` starts with `substr`,\n`false` otherwise.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWith(\"BuckleScript\", \"Buckle\") == true\nString.startsWith(\"BuckleScript\", \"\") == true\nString.startsWith(\"JavaScript\", \"Buckle\") == false\n```\n"} - }, { - "label": "String.startsWithFrom", + "documentation": { + "kind": "markdown", + "value": "\n`startsWith(str, substr)` returns `true` if the `str` starts with `substr`,\n`false` otherwise.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWith(\"BuckleScript\", \"Buckle\") == true\nString.startsWith(\"BuckleScript\", \"\") == true\nString.startsWith(\"JavaScript\", \"Buckle\") == false\n```\n" + }, "kind": 12, - "tags": [], + "label": "String.startsWith", + "tags": [] + }, + { + "data": null, + "deprecated": false, "detail": "(string, string, int) => bool", - "documentation": {"kind": "markdown", "value": "\n`startsWithFrom(str, substr, n)` returns `true` if the `str` starts\nwith `substr` starting at position `n`, `false` otherwise. If `n` is negative,\nthe search starts at the beginning of `str`.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWithFrom(\"BuckleScript\", \"kle\", 3) == true\nString.startsWithFrom(\"BuckleScript\", \"\", 3) == true\nString.startsWithFrom(\"JavaScript\", \"Buckle\", 2) == false\n```\n"} - }] + "documentation": { + "kind": "markdown", + "value": "\n`startsWithFrom(str, substr, n)` returns `true` if the `str` starts\nwith `substr` starting at position `n`, `false` otherwise. If `n` is negative,\nthe search starts at the beginning of `str`.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWithFrom(\"BuckleScript\", \"kle\", 3) == true\nString.startsWithFrom(\"BuckleScript\", \"\", 3) == true\nString.startsWithFrom(\"JavaScript\", \"Buckle\", 2) == false\n```\n" + }, + "kind": 12, + "label": "String.startsWithFrom", + "tags": [] + } +] From b6465e81bdc3b8513773b7638bb75a342d5d505f Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sat, 23 May 2026 13:23:55 -0300 Subject: [PATCH 08/24] Update tests --- .../ConstructorCompletion__Json.res.txt | 23 ++++++++++++------- .../ConstructorCompletion__Own.res.txt | 23 ++++++++++++------- 2 files changed, 30 insertions(+), 16 deletions(-) diff --git a/tests/analysis_tests/tests-incremental-typechecking/src/expected/ConstructorCompletion__Json.res.txt b/tests/analysis_tests/tests-incremental-typechecking/src/expected/ConstructorCompletion__Json.res.txt index bab658f9b98..1d175b3d822 100644 --- a/tests/analysis_tests/tests-incremental-typechecking/src/expected/ConstructorCompletion__Json.res.txt +++ b/tests/analysis_tests/tests-incremental-typechecking/src/expected/ConstructorCompletion__Json.res.txt @@ -7,14 +7,21 @@ Completable: Cexpression CTypeAtPos()->variantPayload::Array($0) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath CTypeAtPos() -[{ - "label": "[]", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "t", - "documentation": {"kind": "markdown", "value": " \nA type representing a JSON object.\n\n\n```rescript\n@unboxed\ntype t =\n | Boolean(bool)\n | @as(null) Null\n | String(string)\n | Number(float)\n | Object(dict)\n | Array(array)\n```"}, - "sortText": "A", + "documentation": { + "kind": "markdown", + "value": " \nA type representing a JSON object.\n\n\n```rescript\n@unboxed\ntype t =\n | Boolean(bool)\n | @as(null) Null\n | String(string)\n | Number(float)\n | Object(dict)\n | Array(array)\n```" + }, "insertText": "[$0]", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "[]", + "sortText": "A", + "tags": [] + } +] diff --git a/tests/analysis_tests/tests-incremental-typechecking/src/expected/ConstructorCompletion__Own.res.txt b/tests/analysis_tests/tests-incremental-typechecking/src/expected/ConstructorCompletion__Own.res.txt index 6ea8bab362e..f910f33a392 100644 --- a/tests/analysis_tests/tests-incremental-typechecking/src/expected/ConstructorCompletion__Own.res.txt +++ b/tests/analysis_tests/tests-incremental-typechecking/src/expected/ConstructorCompletion__Own.res.txt @@ -6,14 +6,21 @@ Completable: Cexpression CTypeAtPos()->variantPayload::One($0) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath CTypeAtPos() -[{ - "label": "{}", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "{miss: bool}", - "documentation": {"kind": "markdown", "value": "```rescript\n{miss: bool}\n```"}, - "sortText": "A", + "documentation": { + "kind": "markdown", + "value": "```rescript\n{miss: bool}\n```" + }, "insertText": "{$0}", - "insertTextFormat": 2 - }] + "insertTextFormat": 2, + "kind": 12, + "label": "{}", + "sortText": "A", + "tags": [] + } +] From 8ed5e638aa6601bca6ccadac38e3e724274af2c3 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sat, 23 May 2026 13:28:53 -0300 Subject: [PATCH 09/24] Update tests/analysis_tests/tests-sourcedirs-dependency/src/expected/Main.res.txt --- .../src/expected/Main.res.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/analysis_tests/tests-sourcedirs-dependency/src/expected/Main.res.txt b/tests/analysis_tests/tests-sourcedirs-dependency/src/expected/Main.res.txt index 4f24b0022f0..b4966434cde 100644 --- a/tests/analysis_tests/tests-sourcedirs-dependency/src/expected/Main.res.txt +++ b/tests/analysis_tests/tests-sourcedirs-dependency/src/expected/Main.res.txt @@ -6,11 +6,15 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[WorkspaceDep, value] Path WorkspaceDep.value -[{ - "label": "valueFromDependency", - "kind": 12, - "tags": [], +[ + { + "data": null, + "deprecated": false, "detail": "int", - "documentation": null - }] + "documentation": { "kind": "markdown", "value": "" }, + "kind": 12, + "label": "valueFromDependency", + "tags": [] + } +] From dc99cf27ee67e69f78244c0f91e389f5833f28ca Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sat, 23 May 2026 13:35:45 -0300 Subject: [PATCH 10/24] Update tests/tools_tests --- .../src/expected/DocExtraction2.res.json | 180 ++-- .../src/expected/DocExtraction2.resi.json | 180 ++-- .../src/expected/DocExtractionRes.res.json | 958 +++++++++--------- ...CodeBlocksTest.res.extracted.json.expected | 7 +- ...ocstringsTest1.res.extracted.json.expected | 16 +- ...cstringsTest1.resi.extracted.json.expected | 16 +- ...ocstringsTest2.res.extracted.json.expected | 16 +- ...ringsTestError.res.extracted.json.expected | 4 - ...tRescriptBlocks.md.extracted.json.expected | 10 +- tests/tools_tests/src/expected/ModC.res.json | 65 +- tests/tools_tests/src/expected/ModC.resi.json | 65 +- 11 files changed, 766 insertions(+), 751 deletions(-) diff --git a/tests/tools_tests/src/expected/DocExtraction2.res.json b/tests/tools_tests/src/expected/DocExtraction2.res.json index bd71cd75607..ffc0e077a87 100644 --- a/tests/tools_tests/src/expected/DocExtraction2.res.json +++ b/tests/tools_tests/src/expected/DocExtraction2.res.json @@ -1,117 +1,113 @@ - { "name": "DocExtraction2", - "docstrings": ["Module level doc here."], - "source": { - "filepath": "src/DocExtraction2.resi", - "line": 1, - "col": 1 - }, + "deprecated": null, + "docstrings": [ "Module level doc here." ], + "source": { "filepath": "src/DocExtraction2.resi", "line": 1, "col": 1 }, "items": [ - { - "id": "DocExtraction2.t", - "kind": "type", - "name": "t", - "signature": "type t", - "docstrings": ["Type t is pretty cool."], - "source": { - "filepath": "src/DocExtraction2.resi", - "line": 4, - "col": 1 - } - }, - { - "id": "DocExtraction2.make", - "kind": "value", - "name": "make", - "signature": "let make: unit => t", - "docstrings": ["Makerz of stuffz."], - "source": { - "filepath": "src/DocExtraction2.resi", - "line": 7, - "col": 1 - }, - "detail": - { - "kind": "signature", - "details": { - "parameters": [{ - "path": "unit" - }], - "returnType": { - "path": "t" - } - } - } - }, - { - "id": "DocExtraction2.InnerModule", - "name": "InnerModule", - "kind": "module", - "docstrings": [], - "source": { - "filepath": "src/DocExtraction2.resi", - "line": 9, - "col": 8 - }, - "items": [ { - "id": "DocExtraction2.InnerModule.t", + "id": "DocExtraction2.t", "kind": "type", "name": "t", + "deprecated": null, "signature": "type t", - "docstrings": ["This type is also t."], + "docstrings": [ "Type t is pretty cool." ], "source": { "filepath": "src/DocExtraction2.resi", - "line": 13, - "col": 3 - } - }, + "line": 4, + "col": 1 + }, + "detail": null + }, { - "id": "DocExtraction2.InnerModule.make", + "id": "DocExtraction2.make", "kind": "value", "name": "make", + "deprecated": null, "signature": "let make: unit => t", - "docstrings": ["Maker of tea."], + "docstrings": [ "Makerz of stuffz." ], "source": { "filepath": "src/DocExtraction2.resi", - "line": 15, - "col": 3 + "line": 7, + "col": 1 }, - "detail": - { + "detail": { "kind": "signature", "details": { - "parameters": [{ - "path": "unit" - }], - "returnType": { - "path": "t" + "parameters": [ { "path": "unit", "genericTypeParameters": [] } ], + "returnType": { "path": "t", "genericTypeParameters": [] } } } - } - }] - }, - { - "id": "DocExtraction2.log", - "kind": "value", - "name": "log", - "deprecated": "Use log instead", - "signature": "let log: 'a => unit", - "docstrings": [], - "source": { - "filepath": "src/DocExtraction2.resi", - "line": 25, - "col": 1 }, - "detail": { - "kind": "signature", - "details": { - "returnType": { - "path": "unit" + "id": "DocExtraction2.InnerModule", + "name": "InnerModule", + "kind": "module", + "deprecated": null, + "moduletypeid": null, + "docstrings": [], + "source": { + "filepath": "src/DocExtraction2.resi", + "line": 9, + "col": 8 + }, + "items": [ + { + "id": "DocExtraction2.InnerModule.t", + "kind": "type", + "name": "t", + "deprecated": null, + "signature": "type t", + "docstrings": [ "This type is also t." ], + "source": { + "filepath": "src/DocExtraction2.resi", + "line": 13, + "col": 3 + }, + "detail": null + }, + { + "id": "DocExtraction2.InnerModule.make", + "kind": "value", + "name": "make", + "deprecated": null, + "signature": "let make: unit => t", + "docstrings": [ "Maker of tea." ], + "source": { + "filepath": "src/DocExtraction2.resi", + "line": 15, + "col": 3 + }, + "detail": { + "kind": "signature", + "details": { + "parameters": [ + { "path": "unit", "genericTypeParameters": [] } + ], + "returnType": { "path": "t", "genericTypeParameters": [] } + } + } + } + ] + }, + { + "id": "DocExtraction2.log", + "kind": "value", + "name": "log", + "deprecated": "Use log instead", + "signature": "let log: 'a => unit", + "docstrings": [], + "source": { + "filepath": "src/DocExtraction2.resi", + "line": 25, + "col": 1 + }, + "detail": { + "kind": "signature", + "details": { + "parameters": [], + "returnType": { "path": "unit", "genericTypeParameters": [] } + } } } - } - }] + ] } diff --git a/tests/tools_tests/src/expected/DocExtraction2.resi.json b/tests/tools_tests/src/expected/DocExtraction2.resi.json index bd71cd75607..ffc0e077a87 100644 --- a/tests/tools_tests/src/expected/DocExtraction2.resi.json +++ b/tests/tools_tests/src/expected/DocExtraction2.resi.json @@ -1,117 +1,113 @@ - { "name": "DocExtraction2", - "docstrings": ["Module level doc here."], - "source": { - "filepath": "src/DocExtraction2.resi", - "line": 1, - "col": 1 - }, + "deprecated": null, + "docstrings": [ "Module level doc here." ], + "source": { "filepath": "src/DocExtraction2.resi", "line": 1, "col": 1 }, "items": [ - { - "id": "DocExtraction2.t", - "kind": "type", - "name": "t", - "signature": "type t", - "docstrings": ["Type t is pretty cool."], - "source": { - "filepath": "src/DocExtraction2.resi", - "line": 4, - "col": 1 - } - }, - { - "id": "DocExtraction2.make", - "kind": "value", - "name": "make", - "signature": "let make: unit => t", - "docstrings": ["Makerz of stuffz."], - "source": { - "filepath": "src/DocExtraction2.resi", - "line": 7, - "col": 1 - }, - "detail": - { - "kind": "signature", - "details": { - "parameters": [{ - "path": "unit" - }], - "returnType": { - "path": "t" - } - } - } - }, - { - "id": "DocExtraction2.InnerModule", - "name": "InnerModule", - "kind": "module", - "docstrings": [], - "source": { - "filepath": "src/DocExtraction2.resi", - "line": 9, - "col": 8 - }, - "items": [ { - "id": "DocExtraction2.InnerModule.t", + "id": "DocExtraction2.t", "kind": "type", "name": "t", + "deprecated": null, "signature": "type t", - "docstrings": ["This type is also t."], + "docstrings": [ "Type t is pretty cool." ], "source": { "filepath": "src/DocExtraction2.resi", - "line": 13, - "col": 3 - } - }, + "line": 4, + "col": 1 + }, + "detail": null + }, { - "id": "DocExtraction2.InnerModule.make", + "id": "DocExtraction2.make", "kind": "value", "name": "make", + "deprecated": null, "signature": "let make: unit => t", - "docstrings": ["Maker of tea."], + "docstrings": [ "Makerz of stuffz." ], "source": { "filepath": "src/DocExtraction2.resi", - "line": 15, - "col": 3 + "line": 7, + "col": 1 }, - "detail": - { + "detail": { "kind": "signature", "details": { - "parameters": [{ - "path": "unit" - }], - "returnType": { - "path": "t" + "parameters": [ { "path": "unit", "genericTypeParameters": [] } ], + "returnType": { "path": "t", "genericTypeParameters": [] } } } - } - }] - }, - { - "id": "DocExtraction2.log", - "kind": "value", - "name": "log", - "deprecated": "Use log instead", - "signature": "let log: 'a => unit", - "docstrings": [], - "source": { - "filepath": "src/DocExtraction2.resi", - "line": 25, - "col": 1 }, - "detail": { - "kind": "signature", - "details": { - "returnType": { - "path": "unit" + "id": "DocExtraction2.InnerModule", + "name": "InnerModule", + "kind": "module", + "deprecated": null, + "moduletypeid": null, + "docstrings": [], + "source": { + "filepath": "src/DocExtraction2.resi", + "line": 9, + "col": 8 + }, + "items": [ + { + "id": "DocExtraction2.InnerModule.t", + "kind": "type", + "name": "t", + "deprecated": null, + "signature": "type t", + "docstrings": [ "This type is also t." ], + "source": { + "filepath": "src/DocExtraction2.resi", + "line": 13, + "col": 3 + }, + "detail": null + }, + { + "id": "DocExtraction2.InnerModule.make", + "kind": "value", + "name": "make", + "deprecated": null, + "signature": "let make: unit => t", + "docstrings": [ "Maker of tea." ], + "source": { + "filepath": "src/DocExtraction2.resi", + "line": 15, + "col": 3 + }, + "detail": { + "kind": "signature", + "details": { + "parameters": [ + { "path": "unit", "genericTypeParameters": [] } + ], + "returnType": { "path": "t", "genericTypeParameters": [] } + } + } + } + ] + }, + { + "id": "DocExtraction2.log", + "kind": "value", + "name": "log", + "deprecated": "Use log instead", + "signature": "let log: 'a => unit", + "docstrings": [], + "source": { + "filepath": "src/DocExtraction2.resi", + "line": 25, + "col": 1 + }, + "detail": { + "kind": "signature", + "details": { + "parameters": [], + "returnType": { "path": "unit", "genericTypeParameters": [] } + } } } - } - }] + ] } diff --git a/tests/tools_tests/src/expected/DocExtractionRes.res.json b/tests/tools_tests/src/expected/DocExtractionRes.res.json index c2120b97989..6197326c954 100644 --- a/tests/tools_tests/src/expected/DocExtractionRes.res.json +++ b/tests/tools_tests/src/expected/DocExtractionRes.res.json @@ -1,512 +1,499 @@ - { "name": "DocExtractionRes", - "docstrings": ["Module level documentation goes here."], - "source": { - "filepath": "src/DocExtractionRes.res", - "line": 1, - "col": 1 - }, + "deprecated": null, + "docstrings": [ "Module level documentation goes here." ], + "source": { "filepath": "src/DocExtractionRes.res", "line": 1, "col": 1 }, "items": [ - { - "id": "DocExtractionRes.t", - "kind": "type", - "name": "t", - "signature": "type t = {name: string, online: bool}", - "docstrings": ["This type represents stuff."], - "source": { - "filepath": "src/DocExtractionRes.res", - "line": 4, - "col": 1 - }, - "detail": - { - "kind": "record", - "items": [{ - "name": "name", - "optional": false, - "docstrings": ["The name of the stuff."], - "signature": "string" - }, { - "name": "online", - "optional": false, - "docstrings": ["Whether stuff is online."], - "signature": "bool" - }] - } - }, - { - "id": "DocExtractionRes.make", - "kind": "value", - "name": "make", - "signature": "let make: string => t", - "docstrings": ["Create stuff.\n\n```rescript example\nlet stuff = make(\"My name\")\n```"], - "source": { - "filepath": "src/DocExtractionRes.res", - "line": 17, - "col": 5 - }, - "detail": { - "kind": "signature", - "details": { - "parameters": [{ - "path": "string" - }], - "returnType": { - "path": "t" - } - } - } - }, - { - "id": "DocExtractionRes.asOffline", - "kind": "value", - "name": "asOffline", - "signature": "let asOffline: t => t", - "docstrings": ["Stuff goes offline."], - "source": { - "filepath": "src/DocExtractionRes.res", - "line": 23, - "col": 5 - }, - "detail": - { - "kind": "signature", - "details": { - "parameters": [{ - "path": "t" - }], - "returnType": { - "path": "t" - } - } - } - }, - { - "id": "DocExtractionRes.SomeConstant", - "kind": "value", - "name": "SomeConstant", - "signature": "let SomeConstant: int", - "docstrings": ["exotic identifier"], - "source": { - "filepath": "src/DocExtractionRes.res", - "line": 26, - "col": 5 - }, - "detail": - { - "kind": "signature", - "details": { - "returnType": { - "path": "int" - } - } - } - }, - { - "id": "DocExtractionRes.SomeInnerModule", - "name": "SomeInnerModule", - "kind": "module", - "docstrings": ["Another module level docstring here."], - "source": { - "filepath": "src/DocExtractionRes.res", - "line": 28, - "col": 8 - }, - "items": [ - { - "id": "DocExtractionRes.SomeInnerModule.status", + "id": "DocExtractionRes.t", "kind": "type", - "name": "status", - "signature": "type status = Started(t) | Stopped | Idle", - "docstrings": [], + "name": "t", + "deprecated": null, + "signature": "type t = {name: string, online: bool}", + "docstrings": [ "This type represents stuff." ], "source": { "filepath": "src/DocExtractionRes.res", - "line": 30, - "col": 3 + "line": 4, + "col": 1 }, - "detail": - { - "kind": "variant", + "detail": { + "kind": "record", "items": [ - { - "name": "Started", - "docstrings": ["If this is started or not"], - "signature": "Started(t)" - }, - { - "name": "Stopped", - "docstrings": ["Stopped?"], - "signature": "Stopped" - }, - { - "name": "Idle", - "docstrings": ["Now idle."], - "signature": "Idle" - }] - } - }, - { - "id": "DocExtractionRes.SomeInnerModule.validInputs", - "kind": "type", - "name": "validInputs", - "signature": "type validInputs = [\n | #\"needs-escaping\"\n | #something\n | #status(status)\n | #withPayload(int)\n]", - "docstrings": ["These are all the valid inputs."], - "source": { - "filepath": "src/DocExtractionRes.res", - "line": 39, - "col": 3 - } - }, - { - "id": "DocExtractionRes.SomeInnerModule.callback", - "kind": "type", - "name": "callback", - "signature": "type callback = (t, ~status: status) => unit", - "docstrings": [], - "source": { - "filepath": "src/DocExtractionRes.res", - "line": 41, - "col": 3 + { + "name": "name", + "deprecated": null, + "optional": "false", + "docstrings": [ "The name of the stuff." ], + "signature": "string" + }, + { + "name": "online", + "deprecated": null, + "optional": "false", + "docstrings": [ "Whether stuff is online." ], + "signature": "bool" + } + ] } - }] - }, - { - "id": "DocExtractionRes.AnotherModule", - "name": "AnotherModule", - "kind": "module", - "docstrings": ["Mighty fine module here too!"], - "source": { - "filepath": "src/DocExtractionRes.res", - "line": 44, - "col": 8 }, - "items": [ - { - "id": "DocExtractionRes.LinkedModule", - "kind": "moduleAlias", - "name": "LinkedModule", - "docstrings": ["This links another module. Neat."], - "source": { - "filepath": "src/DocExtractionRes.res", - "line": 48, - "col": 10 - }, - "items": [] - }, { - "id": "DocExtractionRes.AnotherModule.callback", - "kind": "type", - "name": "callback", - "signature": "type callback = SomeInnerModule.status => unit", - "docstrings": ["Testing what this looks like."], - "source": { - "filepath": "src/DocExtractionRes.res", - "line": 52, - "col": 3 - } - }, - { - "id": "DocExtractionRes.AnotherModule.isGoodStatus", + "id": "DocExtractionRes.make", "kind": "value", - "name": "isGoodStatus", - "signature": "let isGoodStatus: SomeInnerModule.status => bool", - "docstrings": [], + "name": "make", + "deprecated": null, + "signature": "let make: string => t", + "docstrings": [ + "Create stuff.\n\n```rescript example\nlet stuff = make(\"My name\")\n```" + ], "source": { "filepath": "src/DocExtractionRes.res", - "line": 54, - "col": 7 + "line": 17, + "col": 5 }, - "detail": - { + "detail": { "kind": "signature", "details": { - "parameters": [{ - "path": "SomeInnerModule.status" - }], - "returnType": { - "path": "bool" + "parameters": [ { "path": "string", "genericTypeParameters": [] } ], + "returnType": { "path": "t", "genericTypeParameters": [] } } } - } - }, + }, { - "id": "DocExtractionRes.AnotherModule.someVariantWithInlineRecords", - "kind": "type", - "name": "someVariantWithInlineRecords", - "signature": "type someVariantWithInlineRecords =\n | SomeStuff({offline: bool, online?: bool})", - "docstrings": ["Trying how it looks with an inline record in a variant."], + "id": "DocExtractionRes.asOffline", + "kind": "value", + "name": "asOffline", + "deprecated": null, + "signature": "let asOffline: t => t", + "docstrings": [ "Stuff goes offline." ], "source": { "filepath": "src/DocExtractionRes.res", - "line": 57, - "col": 3 + "line": 23, + "col": 5 }, - "detail": - { - "kind": "variant", - "items": [ - { - "name": "SomeStuff", - "docstrings": ["This has inline records..."], - "signature": "SomeStuff({offline: bool, online?: bool})", - "payload": { - "kind": "inlineRecord", - "fields": [{ - "name": "offline", - "optional": false, - "docstrings": [], - "signature": "bool" - }, { - "name": "online", - "optional": true, - "docstrings": ["Is the user online?"], - "signature": "option" - }] - } - }] - } - }, - { - "id": "DocExtractionRes.AnotherModule.domRoot", - "kind": "type", - "name": "domRoot", - "signature": "type domRoot = unit => ReactDOM.Client.Root.t", - "docstrings": ["Callback to get the DOM root..."], - "source": { - "filepath": "src/DocExtractionRes.res", - "line": 68, - "col": 3 + "detail": { + "kind": "signature", + "details": { + "parameters": [ { "path": "t", "genericTypeParameters": [] } ], + "returnType": { "path": "t", "genericTypeParameters": [] } + } } - }] - }, - { - "id": "DocExtractionRes.ModuleWithThingsThatShouldNotBeExported", - "name": "ModuleWithThingsThatShouldNotBeExported", - "kind": "module", - "docstrings": [], - "source": { - "filepath": "src/DocExtractionRes.res", - "line": 1, - "col": 1 }, - "items": [ - { - "id": "DocExtractionRes.ModuleWithThingsThatShouldNotBeExported.t", - "kind": "type", - "name": "t", - "signature": "type t", - "docstrings": ["The type t is stuff."], - "source": { - "filepath": "src/DocExtractionRes.res", - "line": 75, - "col": 3 - } - }, { - "id": "DocExtractionRes.ModuleWithThingsThatShouldNotBeExported.make", + "id": "DocExtractionRes.SomeConstant", "kind": "value", - "name": "make", - "signature": "let make: unit => t", - "docstrings": ["The maker of stuff!"], + "name": "SomeConstant", + "deprecated": null, + "signature": "let SomeConstant: int", + "docstrings": [ "exotic identifier" ], "source": { "filepath": "src/DocExtractionRes.res", - "line": 77, - "col": 3 + "line": 26, + "col": 5 }, - "detail": - { + "detail": { "kind": "signature", "details": { - "parameters": [{ - "path": "unit" - }], - "returnType": { - "path": "t" + "parameters": [], + "returnType": { "path": "int", "genericTypeParameters": [] } } } - } - }] - }, - { - "id": "DocExtractionRes.Example", - "name": "Example", - "kind": "moduleType", - "docstrings": [], - "source": { - "filepath": "src/DocExtractionRes.res", - "line": 105, - "col": 13 }, - "items": [ { - "id": "DocExtractionRes.Example.t", - "kind": "type", - "name": "t", - "signature": "type t", - "docstrings": ["main type of this module"], + "id": "DocExtractionRes.SomeInnerModule", + "name": "SomeInnerModule", + "kind": "module", + "deprecated": null, + "moduletypeid": null, + "docstrings": [ "Another module level docstring here." ], "source": { "filepath": "src/DocExtractionRes.res", - "line": 113, - "col": 3 - } - }, + "line": 28, + "col": 8 + }, + "items": [ + { + "id": "DocExtractionRes.SomeInnerModule.status", + "kind": "type", + "name": "status", + "deprecated": null, + "signature": "type status = Started(t) | Stopped | Idle", + "docstrings": [], + "source": { + "filepath": "src/DocExtractionRes.res", + "line": 30, + "col": 3 + }, + "detail": { + "kind": "variant", + "items": [ + { + "name": "Started", + "deprecated": null, + "docstrings": [ "If this is started or not" ], + "signature": "Started(t)", + "payload": null + }, + { + "name": "Stopped", + "deprecated": null, + "docstrings": [ "Stopped?" ], + "signature": "Stopped", + "payload": null + }, + { + "name": "Idle", + "deprecated": null, + "docstrings": [ "Now idle." ], + "signature": "Idle", + "payload": null + } + ] + } + }, + { + "id": "DocExtractionRes.SomeInnerModule.validInputs", + "kind": "type", + "name": "validInputs", + "deprecated": null, + "signature": "type validInputs = [\n | #\"needs-escaping\"\n | #something\n | #status(status)\n | #withPayload(int)\n]", + "docstrings": [ "These are all the valid inputs." ], + "source": { + "filepath": "src/DocExtractionRes.res", + "line": 39, + "col": 3 + }, + "detail": null + }, + { + "id": "DocExtractionRes.SomeInnerModule.callback", + "kind": "type", + "name": "callback", + "deprecated": null, + "signature": "type callback = (t, ~status: status) => unit", + "docstrings": [], + "source": { + "filepath": "src/DocExtractionRes.res", + "line": 41, + "col": 3 + }, + "detail": null + } + ] + }, { - "id": "DocExtractionRes.Example.f", - "kind": "value", - "name": "f", - "signature": "let f: t => t", - "docstrings": ["function from t to t"], + "id": "DocExtractionRes.AnotherModule", + "name": "AnotherModule", + "kind": "module", + "deprecated": null, + "moduletypeid": null, + "docstrings": [ "Mighty fine module here too!" ], "source": { "filepath": "src/DocExtractionRes.res", - "line": 115, - "col": 3 + "line": 44, + "col": 8 }, - "detail": - { - "kind": "signature", - "details": { - "parameters": [{ - "path": "t" - }], - "returnType": { - "path": "t" + "items": [ + { + "id": "DocExtractionRes.LinkedModule", + "kind": "moduleAlias", + "name": "LinkedModule", + "docstrings": [ "This links another module. Neat." ], + "source": { + "filepath": "src/DocExtractionRes.res", + "line": 48, + "col": 10 + }, + "items": [] + }, + { + "id": "DocExtractionRes.AnotherModule.callback", + "kind": "type", + "name": "callback", + "deprecated": null, + "signature": "type callback = SomeInnerModule.status => unit", + "docstrings": [ "Testing what this looks like." ], + "source": { + "filepath": "src/DocExtractionRes.res", + "line": 52, + "col": 3 + }, + "detail": null + }, + { + "id": "DocExtractionRes.AnotherModule.isGoodStatus", + "kind": "value", + "name": "isGoodStatus", + "deprecated": null, + "signature": "let isGoodStatus: SomeInnerModule.status => bool", + "docstrings": [], + "source": { + "filepath": "src/DocExtractionRes.res", + "line": 54, + "col": 7 + }, + "detail": { + "kind": "signature", + "details": { + "parameters": [ + { + "path": "SomeInnerModule.status", + "genericTypeParameters": [] + } + ], + "returnType": { "path": "bool", "genericTypeParameters": [] } + } + } + }, + { + "id": "DocExtractionRes.AnotherModule.someVariantWithInlineRecords", + "kind": "type", + "name": "someVariantWithInlineRecords", + "deprecated": null, + "signature": "type someVariantWithInlineRecords =\n | SomeStuff({offline: bool, online?: bool})", + "docstrings": [ + "Trying how it looks with an inline record in a variant." + ], + "source": { + "filepath": "src/DocExtractionRes.res", + "line": 57, + "col": 3 + }, + "detail": { + "kind": "variant", + "items": [ + { + "name": "SomeStuff", + "deprecated": null, + "docstrings": [ "This has inline records..." ], + "signature": "SomeStuff({offline: bool, online?: bool})", + "payload": { + "kind": "inlineRecord", + "fields": [ + { + "name": "offline", + "deprecated": null, + "optional": "false", + "docstrings": [], + "signature": "bool" + }, + { + "name": "online", + "deprecated": null, + "optional": "true", + "docstrings": [ "Is the user online?" ], + "signature": "option" + } + ] + } + } + ] + } + }, + { + "id": "DocExtractionRes.AnotherModule.domRoot", + "kind": "type", + "name": "domRoot", + "deprecated": null, + "signature": "type domRoot = unit => ReactDOM.Client.Root.t", + "docstrings": [ "Callback to get the DOM root..." ], + "source": { + "filepath": "src/DocExtractionRes.res", + "line": 68, + "col": 3 + }, + "detail": null } - } - } - }] - }, - { - "id": "DocExtractionRes.M", - "name": "M", - "kind": "module", - "moduletypeid": "DocExtractionRes.Example", - "docstrings": ["implementation of Example module type"], - "source": { - "filepath": "src/DocExtractionRes.res", - "line": 1, - "col": 1 + ] }, - "items": [ { - "id": "DocExtractionRes.M.t", - "kind": "type", - "name": "t", - "signature": "type t = int", - "docstrings": ["main type"], + "id": "DocExtractionRes.ModuleWithThingsThatShouldNotBeExported", + "name": "ModuleWithThingsThatShouldNotBeExported", + "kind": "module", + "deprecated": null, + "moduletypeid": null, + "docstrings": [], "source": { "filepath": "src/DocExtractionRes.res", - "line": 129, - "col": 3 - } - }, + "line": 1, + "col": 1 + }, + "items": [ + { + "id": "DocExtractionRes.ModuleWithThingsThatShouldNotBeExported.t", + "kind": "type", + "name": "t", + "deprecated": null, + "signature": "type t", + "docstrings": [ "The type t is stuff." ], + "source": { + "filepath": "src/DocExtractionRes.res", + "line": 75, + "col": 3 + }, + "detail": null + }, + { + "id": "DocExtractionRes.ModuleWithThingsThatShouldNotBeExported.make", + "kind": "value", + "name": "make", + "deprecated": null, + "signature": "let make: unit => t", + "docstrings": [ "The maker of stuff!" ], + "source": { + "filepath": "src/DocExtractionRes.res", + "line": 77, + "col": 3 + }, + "detail": { + "kind": "signature", + "details": { + "parameters": [ + { "path": "unit", "genericTypeParameters": [] } + ], + "returnType": { "path": "t", "genericTypeParameters": [] } + } + } + } + ] + }, { - "id": "DocExtractionRes.M.f", - "kind": "value", - "name": "f", - "signature": "let f: int => int", - "docstrings": ["identity function"], + "id": "DocExtractionRes.Example", + "name": "Example", + "kind": "moduleType", + "deprecated": null, + "docstrings": [], "source": { "filepath": "src/DocExtractionRes.res", - "line": 134, - "col": 7 + "line": 105, + "col": 13 }, - "detail": - { - "kind": "signature", - "details": { - "parameters": [{ - "path": "int" - }], - "returnType": { - "path": "int" + "items": [ + { + "id": "DocExtractionRes.Example.t", + "kind": "type", + "name": "t", + "deprecated": null, + "signature": "type t", + "docstrings": [ "main type of this module" ], + "source": { + "filepath": "src/DocExtractionRes.res", + "line": 113, + "col": 3 + }, + "detail": null + }, + { + "id": "DocExtractionRes.Example.f", + "kind": "value", + "name": "f", + "deprecated": null, + "signature": "let f: t => t", + "docstrings": [ "function from t to t" ], + "source": { + "filepath": "src/DocExtractionRes.res", + "line": 115, + "col": 3 + }, + "detail": { + "kind": "signature", + "details": { + "parameters": [ { "path": "t", "genericTypeParameters": [] } ], + "returnType": { "path": "t", "genericTypeParameters": [] } + } + } } - } - } - }] - }, - { - "id": "DocExtractionRes.MT", - "name": "MT", - "kind": "moduleType", - "docstrings": [], - "source": { - "filepath": "src/DocExtractionRes.res", - "line": 137, - "col": 13 + ] }, - "items": [ { - "id": "DocExtractionRes.MT.x", - "kind": "value", - "name": "x", - "signature": "let x: int", - "docstrings": [], + "id": "DocExtractionRes.M", + "name": "M", + "kind": "module", + "deprecated": null, + "moduletypeid": "DocExtractionRes.Example", + "docstrings": [ "implementation of Example module type" ], "source": { "filepath": "src/DocExtractionRes.res", - "line": 138, - "col": 3 + "line": 1, + "col": 1 }, - "detail": - { - "kind": "signature", - "details": { - "returnType": { - "path": "int" + "items": [ + { + "id": "DocExtractionRes.M.t", + "kind": "type", + "name": "t", + "deprecated": null, + "signature": "type t = int", + "docstrings": [ "main type" ], + "source": { + "filepath": "src/DocExtractionRes.res", + "line": 129, + "col": 3 + }, + "detail": null + }, + { + "id": "DocExtractionRes.M.f", + "kind": "value", + "name": "f", + "deprecated": null, + "signature": "let f: int => int", + "docstrings": [ "identity function" ], + "source": { + "filepath": "src/DocExtractionRes.res", + "line": 134, + "col": 7 + }, + "detail": { + "kind": "signature", + "details": { + "parameters": [ + { "path": "int", "genericTypeParameters": [] } + ], + "returnType": { "path": "int", "genericTypeParameters": [] } + } + } } - } - } - }] - }, - { - "id": "DocExtractionRes.A", - "name": "A", - "kind": "module", - "moduletypeid": "DocExtractionRes.MT", - "docstrings": [], - "source": { - "filepath": "src/DocExtractionRes.res", - "line": 1, - "col": 1 + ] }, - "items": [ { - "id": "DocExtractionRes.A.x", - "kind": "value", - "name": "x", - "signature": "let x: int", + "id": "DocExtractionRes.MT", + "name": "MT", + "kind": "moduleType", + "deprecated": null, "docstrings": [], "source": { "filepath": "src/DocExtractionRes.res", - "line": 142, - "col": 7 + "line": 137, + "col": 13 }, - "detail": - { - "kind": "signature", - "details": { - "returnType": { - "path": "int" + "items": [ + { + "id": "DocExtractionRes.MT.x", + "kind": "value", + "name": "x", + "deprecated": null, + "signature": "let x: int", + "docstrings": [], + "source": { + "filepath": "src/DocExtractionRes.res", + "line": 138, + "col": 3 + }, + "detail": { + "kind": "signature", + "details": { + "parameters": [], + "returnType": { "path": "int", "genericTypeParameters": [] } + } + } } - } - } - }] - }, - { - "id": "DocExtractionRes.C", - "name": "C", - "kind": "module", - "docstrings": [], - "source": { - "filepath": "src/DocExtractionRes.res", - "line": 145, - "col": 8 + ] }, - "items": [ { - "id": "DocExtractionRes.C.D", - "name": "D", + "id": "DocExtractionRes.A", + "name": "A", "kind": "module", + "deprecated": null, "moduletypeid": "DocExtractionRes.MT", "docstrings": [], "source": { @@ -515,27 +502,80 @@ "col": 1 }, "items": [ - { - "id": "DocExtractionRes.C.D.x", - "kind": "value", - "name": "x", - "signature": "let x: int", - "docstrings": [], - "source": { - "filepath": "src/DocExtractionRes.res", - "line": 147, - "col": 9 - }, - "detail": { - "kind": "signature", - "details": { - "returnType": { - "path": "int" + "id": "DocExtractionRes.A.x", + "kind": "value", + "name": "x", + "deprecated": null, + "signature": "let x: int", + "docstrings": [], + "source": { + "filepath": "src/DocExtractionRes.res", + "line": 142, + "col": 7 + }, + "detail": { + "kind": "signature", + "details": { + "parameters": [], + "returnType": { "path": "int", "genericTypeParameters": [] } + } } } + ] + }, + { + "id": "DocExtractionRes.C", + "name": "C", + "kind": "module", + "deprecated": null, + "moduletypeid": null, + "docstrings": [], + "source": { + "filepath": "src/DocExtractionRes.res", + "line": 145, + "col": 8 + }, + "items": [ + { + "id": "DocExtractionRes.C.D", + "name": "D", + "kind": "module", + "deprecated": null, + "moduletypeid": "DocExtractionRes.MT", + "docstrings": [], + "source": { + "filepath": "src/DocExtractionRes.res", + "line": 1, + "col": 1 + }, + "items": [ + { + "id": "DocExtractionRes.C.D.x", + "kind": "value", + "name": "x", + "deprecated": null, + "signature": "let x: int", + "docstrings": [], + "source": { + "filepath": "src/DocExtractionRes.res", + "line": 147, + "col": 9 + }, + "detail": { + "kind": "signature", + "details": { + "parameters": [], + "returnType": { + "path": "int", + "genericTypeParameters": [] + } + } + } + } + ] } - }] - }] - }] + ] + } + ] } diff --git a/tests/tools_tests/src/expected/ExtractCodeBlocksTest.res.extracted.json.expected b/tests/tools_tests/src/expected/ExtractCodeBlocksTest.res.extracted.json.expected index aa06f3882d2..ef1767b89a9 100644 --- a/tests/tools_tests/src/expected/ExtractCodeBlocksTest.res.extracted.json.expected +++ b/tests/tools_tests/src/expected/ExtractCodeBlocksTest.res.extracted.json.expected @@ -1,8 +1,7 @@ -{ - "TAG": "Ok", - "_0": [{ +[ + { "id": "ExtractCodeBlocksTest.testFunction1", "name": "testFunction1", "code": "let x = 12\nlet y = 12->Array.filter(x => x == 12)\nassertEqual(x, 12)" - }] } +] diff --git a/tests/tools_tests/src/expected/FormatDocstringsTest1.res.extracted.json.expected b/tests/tools_tests/src/expected/FormatDocstringsTest1.res.extracted.json.expected index 5fee63a034c..bc25518b269 100644 --- a/tests/tools_tests/src/expected/FormatDocstringsTest1.res.extracted.json.expected +++ b/tests/tools_tests/src/expected/FormatDocstringsTest1.res.extracted.json.expected @@ -1,20 +1,22 @@ -{ - "TAG": "Ok", - "_0": [{ +[ + { "id": "FormatDocstringsTest1.testFunction3", "name": "testFunction3", "code": "let processUsers = (users: array) => {\n users\n ->Array.map(user => {...user, active: false})\n ->Array.filter(u => u.age > 21)\n}\n\ntype status = Loading | Success(string) | Error(option)" - }, { + }, + { "id": "FormatDocstringsTest1.Nested.testFunction2", "name": "testFunction2", "code": "module UserService = {\n let validate = user => user.age >= 18 && user.name !== \"\"\n let getName = user => user.name\n}" - }, { + }, + { "id": "FormatDocstringsTest1.testFunction1-2", "name": "testFunction1", "code": "type user = {name: string, age: int, active: bool}\nlet createUser = (name, age) => {name, age, active: true}" - }, { + }, + { "id": "FormatDocstringsTest1.testFunction1-1", "name": "testFunction1", "code": "let badly_formatted = (x, y) => {\n let result = x + y\n if result > 0 {\n Console.log(\"positive\")\n } else {\n Console.log(\"negative\")\n }\n result\n}" - }] } +] diff --git a/tests/tools_tests/src/expected/FormatDocstringsTest1.resi.extracted.json.expected b/tests/tools_tests/src/expected/FormatDocstringsTest1.resi.extracted.json.expected index 5fee63a034c..bc25518b269 100644 --- a/tests/tools_tests/src/expected/FormatDocstringsTest1.resi.extracted.json.expected +++ b/tests/tools_tests/src/expected/FormatDocstringsTest1.resi.extracted.json.expected @@ -1,20 +1,22 @@ -{ - "TAG": "Ok", - "_0": [{ +[ + { "id": "FormatDocstringsTest1.testFunction3", "name": "testFunction3", "code": "let processUsers = (users: array) => {\n users\n ->Array.map(user => {...user, active: false})\n ->Array.filter(u => u.age > 21)\n}\n\ntype status = Loading | Success(string) | Error(option)" - }, { + }, + { "id": "FormatDocstringsTest1.Nested.testFunction2", "name": "testFunction2", "code": "module UserService = {\n let validate = user => user.age >= 18 && user.name !== \"\"\n let getName = user => user.name\n}" - }, { + }, + { "id": "FormatDocstringsTest1.testFunction1-2", "name": "testFunction1", "code": "type user = {name: string, age: int, active: bool}\nlet createUser = (name, age) => {name, age, active: true}" - }, { + }, + { "id": "FormatDocstringsTest1.testFunction1-1", "name": "testFunction1", "code": "let badly_formatted = (x, y) => {\n let result = x + y\n if result > 0 {\n Console.log(\"positive\")\n } else {\n Console.log(\"negative\")\n }\n result\n}" - }] } +] diff --git a/tests/tools_tests/src/expected/FormatDocstringsTest2.res.extracted.json.expected b/tests/tools_tests/src/expected/FormatDocstringsTest2.res.extracted.json.expected index 1619063e79a..04113ab46b3 100644 --- a/tests/tools_tests/src/expected/FormatDocstringsTest2.res.extracted.json.expected +++ b/tests/tools_tests/src/expected/FormatDocstringsTest2.res.extracted.json.expected @@ -1,20 +1,22 @@ -{ - "TAG": "Ok", - "_0": [{ +[ + { "id": "FormatDocstringsTest2.testResi", "name": "testResi", "code": "type x = int\nlet x: int => string\nmodule M: {\n let ff: string => int\n}" - }, { + }, + { "id": "FormatDocstringsTest2.testPipes", "name": "testPipes", "code": "let processData = (data: array) => {\n data\n ->Array.filter(x => x > 0)\n ->Array.map(x => x * 2)\n ->Array.reduce(0, (acc, x) => acc + x)\n}\n\nlet asyncExample = async () => {\n let data = await fetchData()\n let processed = await processData(data)\n Console.log(processed)\n}" - }, { + }, + { "id": "FormatDocstringsTest2.testJsx-2", "name": "testJsx", "code": "let handleResult = (result: result) => {\n switch result {\n | Ok(value) => Console.log(`Success: ${value}`)\n | Error(error) => Console.error(`Error: ${error}`)\n }\n}" - }, { + }, + { "id": "FormatDocstringsTest2.testJsx-1", "name": "testJsx", "code": "let component = () => {\n
        \n

        {\"Title\"->React.string}

        \n \n
        \n}" - }] } +] diff --git a/tests/tools_tests/src/expected/FormatDocstringsTestError.res.extracted.json.expected b/tests/tools_tests/src/expected/FormatDocstringsTestError.res.extracted.json.expected index 9f24eec8251..e69de29bb2d 100644 --- a/tests/tools_tests/src/expected/FormatDocstringsTestError.res.extracted.json.expected +++ b/tests/tools_tests/src/expected/FormatDocstringsTestError.res.extracted.json.expected @@ -1,4 +0,0 @@ -{ - "TAG": "Error", - "_0": "\n Syntax error in code block in docstring\n FormatDocstringsTestError.res:5:10-6:3\n\n 3 │ \n 4 │ \n 5 │ let name= \n 6 │ let x=12\n\n This let-binding misses an expression\n\n" - } diff --git a/tests/tools_tests/src/expected/FormatRescriptBlocks.md.extracted.json.expected b/tests/tools_tests/src/expected/FormatRescriptBlocks.md.extracted.json.expected index dabca83343d..0f87bc8d91a 100644 --- a/tests/tools_tests/src/expected/FormatRescriptBlocks.md.extracted.json.expected +++ b/tests/tools_tests/src/expected/FormatRescriptBlocks.md.extracted.json.expected @@ -1,12 +1,12 @@ -{ - "TAG": "Ok", - "_0": [{ +[ + { "id": "codeblock-1", "name": "codeblock-1", "code": "type user = {name: string, age: int, active: bool}\nlet createUser = (name, age) => {name, age, active: true}" - }, { + }, + { "id": "codeblock-2", "name": "codeblock-2", "code": "let badly_formatted = (x, y) => {\n let result = x + y\n if result > 0 {\n Console.log(\"positive\")\n } else {\n Console.log(\"negative\")\n }\n result\n}" - }] } +] diff --git a/tests/tools_tests/src/expected/ModC.res.json b/tests/tools_tests/src/expected/ModC.res.json index f90a09755fc..7291b682e99 100644 --- a/tests/tools_tests/src/expected/ModC.res.json +++ b/tests/tools_tests/src/expected/ModC.res.json @@ -1,44 +1,35 @@ - { "name": "ModC", + "deprecated": null, "docstrings": [], - "source": { - "filepath": "src/ModC.resi", - "line": 1, - "col": 1 - }, + "source": { "filepath": "src/ModC.resi", "line": 1, "col": 1 }, "items": [ - { - "id": "ModC.User", - "name": "User", - "kind": "module", - "docstrings": ["User Module from interface file"], - "source": { - "filepath": "src/ModC.resi", - "line": 4, - "col": 8 - }, - "items": [ { - "id": "ModC.User.name", - "kind": "value", - "name": "name", - "signature": "let name: string", - "docstrings": [], - "source": { - "filepath": "src/ModC.resi", - "line": 5, - "col": 3 - }, - "detail": - { - "kind": "signature", - "details": { - "returnType": { - "path": "string" + "id": "ModC.User", + "name": "User", + "kind": "module", + "deprecated": null, + "moduletypeid": null, + "docstrings": [ "User Module from interface file" ], + "source": { "filepath": "src/ModC.resi", "line": 4, "col": 8 }, + "items": [ + { + "id": "ModC.User.name", + "kind": "value", + "name": "name", + "deprecated": null, + "signature": "let name: string", + "docstrings": [], + "source": { "filepath": "src/ModC.resi", "line": 5, "col": 3 }, + "detail": { + "kind": "signature", + "details": { + "parameters": [], + "returnType": { "path": "string", "genericTypeParameters": [] } + } + } } - } - } - }] - }] + ] + } + ] } diff --git a/tests/tools_tests/src/expected/ModC.resi.json b/tests/tools_tests/src/expected/ModC.resi.json index f90a09755fc..7291b682e99 100644 --- a/tests/tools_tests/src/expected/ModC.resi.json +++ b/tests/tools_tests/src/expected/ModC.resi.json @@ -1,44 +1,35 @@ - { "name": "ModC", + "deprecated": null, "docstrings": [], - "source": { - "filepath": "src/ModC.resi", - "line": 1, - "col": 1 - }, + "source": { "filepath": "src/ModC.resi", "line": 1, "col": 1 }, "items": [ - { - "id": "ModC.User", - "name": "User", - "kind": "module", - "docstrings": ["User Module from interface file"], - "source": { - "filepath": "src/ModC.resi", - "line": 4, - "col": 8 - }, - "items": [ { - "id": "ModC.User.name", - "kind": "value", - "name": "name", - "signature": "let name: string", - "docstrings": [], - "source": { - "filepath": "src/ModC.resi", - "line": 5, - "col": 3 - }, - "detail": - { - "kind": "signature", - "details": { - "returnType": { - "path": "string" + "id": "ModC.User", + "name": "User", + "kind": "module", + "deprecated": null, + "moduletypeid": null, + "docstrings": [ "User Module from interface file" ], + "source": { "filepath": "src/ModC.resi", "line": 4, "col": 8 }, + "items": [ + { + "id": "ModC.User.name", + "kind": "value", + "name": "name", + "deprecated": null, + "signature": "let name: string", + "docstrings": [], + "source": { "filepath": "src/ModC.resi", "line": 5, "col": 3 }, + "detail": { + "kind": "signature", + "details": { + "parameters": [], + "returnType": { "path": "string", "genericTypeParameters": [] } + } + } } - } - } - }] - }] + ] + } + ] } From 0a9bf622a1a1f9632a064dc6544c8c5dc1259173 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sat, 23 May 2026 14:05:02 -0300 Subject: [PATCH 11/24] Remove null fields, `data` and `deprecated` --- analysis/src/CompletionBackEnd.ml | 26 +- .../src/expected/CompletePrioritize1.res.txt | 12 +- .../src/expected/CompletePrioritize2.res.txt | 14 +- .../tests/src/expected/Completion.res.txt | 1089 +-------------- .../src/expected/CompletionAttributes.res.txt | 125 +- .../CompletionConfiguredBuiltins.res.txt | 6 - .../src/expected/CompletionDicts.res.txt | 26 +- .../expected/CompletionExpressions.res.txt | 461 +------ .../src/expected/CompletionFromModule.res.txt | 41 +- .../expected/CompletionFromModule2.res.txt | 38 +- .../CompletionFunctionArguments.res.txt | 246 +--- .../expected/CompletionInferValues.res.txt | 125 -- .../tests/src/expected/CompletionJsx.res.txt | 238 +--- .../src/expected/CompletionJsxProps.res.txt | 134 +- ...mpletionMultipleEditorCompleteFrom.res.txt | 6 - .../expected/CompletionNullNullable.res.txt | 56 - .../src/expected/CompletionObjects.res.txt | 33 +- .../src/expected/CompletionPattern.res.txt | 661 +-------- .../src/expected/CompletionPipeChain.res.txt | 196 +-- .../expected/CompletionPipeProperty.res.txt | 10 - .../expected/CompletionPipeSubmodules.res.txt | 48 +- .../src/expected/CompletionRegexp.res.txt | 24 - .../expected/CompletionTaggedTemplate.res.txt | 18 - .../expected/CompletionTypeAnnotation.res.txt | 115 +- .../src/expected/CompletionTypeT.res.txt | 34 - .../expected/CompletionTypedArrays.res.txt | 1188 ----------------- .../tests/src/expected/Debug.res.txt | 2 - .../tests/src/expected/Destructuring.res.txt | 16 - .../tests/src/expected/Div.res.txt | 3 - .../DotPipeCompleteFromCurrentModule.res.txt | 3 - .../expected/DotPipeCompletionSpec.res.txt | 118 -- .../tests/src/expected/EnvCompletion.res.txt | 53 - .../src/expected/ExhaustiveSwitch.res.txt | 42 +- .../tests/src/expected/Firebase.res.txt | 7 - .../src/expected/FirstClassModules.res.txt | 202 +-- .../tests/src/expected/Hover.res.txt | 8 - .../expected/IncludeModuleCompletion.res.txt | 57 +- .../tests/src/expected/Jsx2.res.txt | 316 +---- .../tests/src/expected/Jsx2.resi.txt | 4 - .../tests/src/expected/JsxV4.res.txt | 12 +- .../src/expected/RecordCompletion.res.txt | 12 - .../tests/src/expected/RecoveryOnProp.res.txt | 20 +- .../tests/src/expected/Reprod.res.txt | 38 - .../tests/src/expected/RxjsCompletion.res.txt | 30 - .../tests/src/expected/TypeArgCtx.res.txt | 2 - .../src/expected/TypeAtPosCompletion.res.txt | 10 - 46 files changed, 273 insertions(+), 5652 deletions(-) diff --git a/analysis/src/CompletionBackEnd.ml b/analysis/src/CompletionBackEnd.ml index 209736b886e..8d934ca165d 100644 --- a/analysis/src/CompletionBackEnd.ml +++ b/analysis/src/CompletionBackEnd.ml @@ -820,13 +820,25 @@ let mkItem ?data ?additionalTextEdits name ~kind ~detail ~deprecated ~docstring | Some _ -> [Lsp.Types.CompletionItemTag.Deprecated (* deprecated *)] in - Lsp.Types.CompletionItem.create ~label:name ~kind ~tags ~detail - ~documentation: - (`MarkupContent - (Lsp.Types.MarkupContent.create ~kind:Lsp.Types.MarkupKind.Markdown - ~value:docContent)) - ?deprecated:(Some (Option.is_some deprecated)) - ?data ?additionalTextEdits ?sortText:None ?insertText:None + let documentation = + match String.length docContent > 0 with + | true -> + Some + (`MarkupContent + (Lsp.Types.MarkupContent.create ~kind:Lsp.Types.MarkupKind.Markdown + ~value:docContent)) + | false -> None + in + + let deprecated = if Option.is_some deprecated then Some true else None in + let data = + match data with + | Some `Null | None -> None + | Some other -> Some other + in + + Lsp.Types.CompletionItem.create ~label:name ~kind ~tags ~detail ?documentation + ?deprecated ?data ?additionalTextEdits ?sortText:None ?insertText:None ?insertTextFormat:None ?filterText:None () let completionToItem diff --git a/tests/analysis_tests/tests/src/expected/CompletePrioritize1.res.txt b/tests/analysis_tests/tests/src/expected/CompletePrioritize1.res.txt index b4b91ad03bc..ab1184c1d8d 100644 --- a/tests/analysis_tests/tests/src/expected/CompletePrioritize1.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletePrioritize1.res.txt @@ -9,15 +9,5 @@ Path a CPPipe pathFromEnv:Test found:true Path Test. Path -[ - { - "data": null, - "deprecated": false, - "detail": "t => int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "Test.name", - "tags": [] - } -] +[ { "detail": "t => int", "kind": 12, "label": "Test.name", "tags": [] } ] diff --git a/tests/analysis_tests/tests/src/expected/CompletePrioritize2.res.txt b/tests/analysis_tests/tests/src/expected/CompletePrioritize2.res.txt index 825fe421a17..bd6893d5c10 100644 --- a/tests/analysis_tests/tests/src/expected/CompletePrioritize2.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletePrioritize2.res.txt @@ -9,17 +9,7 @@ Path ax CPPipe pathFromEnv:Test found:true Path Test. Path -[ - { - "data": null, - "deprecated": false, - "detail": "t => int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "Test.add", - "tags": [] - } -] +[ { "detail": "t => int", "kind": 12, "label": "Test.add", "tags": [] } ] Complete src/CompletePrioritize2.res 12:5 posCursor:[12:5] posNoWhite:[12:4] Found expr:[12:3->12:5] @@ -31,8 +21,6 @@ ContextPath Value[ax] Path ax [ { - "data": null, - "deprecated": false, "detail": "Test.t", "documentation": { "kind": "markdown", diff --git a/tests/analysis_tests/tests/src/expected/Completion.res.txt b/tests/analysis_tests/tests/src/expected/Completion.res.txt index e1e383144f1..761f583a6e1 100644 --- a/tests/analysis_tests/tests/src/expected/Completion.res.txt +++ b/tests/analysis_tests/tests/src/expected/Completion.res.txt @@ -8,8 +8,6 @@ ContextPath Value[MyList, m] Path MyList.m [ { - "data": null, - "deprecated": false, "detail": "(list<'a>, 'a => 'b) => list<'b>", "documentation": { "kind": "markdown", @@ -20,8 +18,6 @@ Path MyList.m "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(list<'a>, list<'b>, ('a, 'b) => 'c) => list<'c>", "documentation": { "kind": "markdown", @@ -32,8 +28,6 @@ Path MyList.m "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(~length: int, 'a) => list<'a>", "documentation": { "kind": "markdown", @@ -44,8 +38,6 @@ Path MyList.m "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(list<'a>, ('a, int) => 'b) => list<'b>", "documentation": { "kind": "markdown", @@ -56,8 +48,6 @@ Path MyList.m "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(list<'a>, 'a => 'b) => list<'b>", "documentation": { "kind": "markdown", @@ -79,8 +69,6 @@ ContextPath Value[Array, ""] Path Array. [ { - "data": null, - "deprecated": false, "detail": "(\n array<'a>,\n ~start: int,\n ~remove: int,\n ~insert: array<'a>,\n) => unit", "documentation": { "kind": "markdown", @@ -91,8 +79,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, array<'a>) => array<'a>", "documentation": { "kind": "markdown", @@ -103,8 +89,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a => option<'b>) => array<'b>", "documentation": { "kind": "markdown", @@ -115,8 +99,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, ('a, int) => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -127,8 +109,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -139,8 +119,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "array<'a> => option<'a>", "documentation": { "kind": "markdown", @@ -151,8 +129,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a => option<'b>) => option<'b>", "documentation": { "kind": "markdown", @@ -163,8 +139,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, array>) => array<'a>", "documentation": { "kind": "markdown", @@ -175,7 +149,6 @@ Path Array. "tags": [] }, { - "data": null, "deprecated": true, "detail": "(array, string) => string", "documentation": { @@ -187,7 +160,6 @@ Path Array. "tags": [ 1 ] }, { - "data": null, "deprecated": true, "detail": "(array<'a>, string) => string", "documentation": { @@ -199,8 +171,6 @@ Path Array. "tags": [ 1 ] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'b, ('b, 'a) => 'b) => 'b", "documentation": { "kind": "markdown", @@ -211,8 +181,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'b, ('b, 'a, int) => 'b) => 'b", "documentation": { "kind": "markdown", @@ -223,8 +191,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "array<'a> => array<'a>", "documentation": { "kind": "markdown", @@ -235,8 +201,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, Symbol.t) => option<'b>", "documentation": { "kind": "markdown", @@ -247,8 +211,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, Symbol.t) => 'b", "documentation": { "kind": "markdown", @@ -259,8 +221,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a => bool) => option", "documentation": { "kind": "markdown", @@ -271,8 +231,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "array<'a> => unit", "documentation": { "kind": "markdown", @@ -283,8 +241,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "array<'a> => array<'a>", "documentation": { "kind": "markdown", @@ -295,8 +251,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, int, 'a) => unit", "documentation": { "kind": "markdown", @@ -307,8 +261,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, ('a, int) => bool) => int", "documentation": { "kind": "markdown", @@ -319,8 +271,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, ('a, int) => bool) => bool", "documentation": { "kind": "markdown", @@ -331,8 +281,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, ~start: int=?, ~end: int=?) => array<'a>", "documentation": { "kind": "markdown", @@ -343,8 +291,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(t<'a>, array<'b>) => array<('a, 'b)>", "documentation": { "kind": "markdown", @@ -355,7 +301,6 @@ Path Array. "tags": [] }, { - "data": null, "deprecated": true, "detail": "(array<'a>, 'a, ~start: int) => unit", "documentation": { @@ -367,8 +312,6 @@ Path Array. "tags": [ 1 ] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a) => bool", "documentation": { "kind": "markdown", @@ -379,8 +322,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a => bool) => int", "documentation": { "kind": "markdown", @@ -391,8 +332,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(~length: int, int => 'a) => array<'a>", "documentation": { "kind": "markdown", @@ -403,8 +342,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -415,8 +352,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(~length: int, 'a) => array<'a>", "documentation": { "kind": "markdown", @@ -427,7 +362,6 @@ Path Array. "tags": [] }, { - "data": null, "deprecated": true, "detail": "(array<'a>, 'a, int) => int", "documentation": { @@ -439,8 +373,6 @@ Path Array. "tags": [ 1 ] }, { - "data": null, - "deprecated": false, "detail": "array<'a> => string", "documentation": { "kind": "markdown", @@ -451,8 +383,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(\n array<'a>,\n ~start: int,\n ~remove: int,\n ~insert: array<'a>,\n) => array<'a>", "documentation": { "kind": "markdown", @@ -463,8 +393,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, ('a, 'a) => Ordering.t) => unit", "documentation": { "kind": "markdown", @@ -475,8 +403,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, ('a, int) => option<'b>) => array<'b>", "documentation": { "kind": "markdown", @@ -487,8 +413,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "array<'a> => int", "documentation": { "kind": "markdown", @@ -499,8 +423,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a => bool) => bool", "documentation": { "kind": "markdown", @@ -511,8 +433,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "array> => array<'a>", "documentation": { "kind": "markdown", @@ -523,8 +443,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a => 'b) => array<'b>", "documentation": { "kind": "markdown", @@ -535,8 +453,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(t<'a>, array<'b>, ('a, 'b) => 'c) => array<'c>", "documentation": { "kind": "markdown", @@ -547,8 +463,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, int, 'a) => array<'a>", "documentation": { "kind": "markdown", @@ -559,17 +473,12 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a) => option", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "lastIndexOfOpt", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "array<'a> => array<'a>", "documentation": { "kind": "markdown", @@ -580,8 +489,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(\n array<'a>,\n ~target: int,\n ~start: int,\n ~end: int=?,\n) => array<'a>", "documentation": { "kind": "markdown", @@ -592,8 +499,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "array<'a> => string", "documentation": { "kind": "markdown", @@ -604,8 +509,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, ('a, int) => bool) => bool", "documentation": { "kind": "markdown", @@ -616,8 +519,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a, ~start: int=?, ~end: int=?) => unit", "documentation": { "kind": "markdown", @@ -628,8 +529,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, ('a, int) => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -640,8 +539,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "array<'a> => unit", "documentation": { "kind": "markdown", @@ -652,8 +549,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "string => array", "documentation": { "kind": "markdown", @@ -664,8 +559,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, ('a, int) => bool) => int", "documentation": { "kind": "markdown", @@ -676,8 +569,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, int) => 'a", "documentation": { "kind": "markdown", @@ -688,8 +579,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "array<'a> => IteratorObject.t<(int, 'a), unit, unknown>", "documentation": { "kind": "markdown", @@ -700,8 +589,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, array<'a>) => unit", "documentation": { "kind": "markdown", @@ -712,8 +599,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a, ~from: int=?) => int", "documentation": { "kind": "markdown", @@ -724,8 +609,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Iterable.t<'a> => array<'a>", "documentation": { "kind": "markdown", @@ -736,8 +619,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a => bool) => array<'a>", "documentation": { "kind": "markdown", @@ -748,8 +629,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, array<'a>, ('a, 'a) => Ordering.t) => Ordering.t", "documentation": { "kind": "markdown", @@ -760,8 +639,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array, string) => string", "documentation": { "kind": "markdown", @@ -772,8 +649,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "array<'a> => option<'a>", "documentation": { "kind": "markdown", @@ -784,8 +659,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "array<'a> => unit", "documentation": { "kind": "markdown", @@ -796,8 +669,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "'a => bool", "documentation": { "kind": "markdown", @@ -808,8 +679,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "array<'a> => IteratorObject.t<'a, unit, unknown>", "documentation": { "kind": "markdown", @@ -820,8 +689,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a) => option", "documentation": { "kind": "markdown", @@ -832,8 +699,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, ('a, int) => unit) => unit", "documentation": { "kind": "markdown", @@ -844,8 +709,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'b, ('b, 'a) => 'b) => 'b", "documentation": { "kind": "markdown", @@ -856,7 +719,6 @@ Path Array. "tags": [] }, { - "data": null, "deprecated": true, "detail": "(array<'a>, ~start: int) => array<'a>", "documentation": { @@ -868,8 +730,6 @@ Path Array. "tags": [ 1 ] }, { - "data": null, - "deprecated": false, "detail": "(arrayLike<'a>, 'a => 'b) => array<'b>", "documentation": { "kind": "markdown", @@ -880,7 +740,6 @@ Path Array. "tags": [] }, { - "data": null, "deprecated": true, "detail": "(array<'a>, 'a) => unit", "documentation": { @@ -892,8 +751,6 @@ Path Array. "tags": [ 1 ] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, int, 'a) => unit", "documentation": { "kind": "markdown", @@ -904,8 +761,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "array<'a> => bool", "documentation": { "kind": "markdown", @@ -916,8 +771,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, ('a, int) => bool) => array<'a>", "documentation": { "kind": "markdown", @@ -928,8 +781,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a => bool) => int", "documentation": { "kind": "markdown", @@ -940,8 +791,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, Symbol.t, 'b) => unit", "documentation": { "kind": "markdown", @@ -952,8 +801,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, array<'a>, ('a, 'a) => bool) => bool", "documentation": { "kind": "markdown", @@ -964,8 +811,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "array> => array<'a>", "documentation": { "kind": "markdown", @@ -976,8 +821,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, string) => string", "documentation": { "kind": "markdown", @@ -988,8 +831,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, ('a, int) => 'b) => array<'b>", "documentation": { "kind": "markdown", @@ -1000,8 +841,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, ('a, int) => array<'b>) => array<'b>", "documentation": { "kind": "markdown", @@ -1012,7 +851,6 @@ Path Array. "tags": [] }, { - "data": null, "deprecated": true, "detail": "(array<'a>, ~target: int, ~start: int) => array<'a>", "documentation": { @@ -1024,8 +862,6 @@ Path Array. "tags": [ 1 ] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a) => unit", "documentation": { "kind": "markdown", @@ -1036,8 +872,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a, ~from: int=?) => int", "documentation": { "kind": "markdown", @@ -1048,8 +882,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a) => unit", "documentation": { "kind": "markdown", @@ -1060,8 +892,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, ('a, 'a) => Ordering.t) => array<'a>", "documentation": { "kind": "markdown", @@ -1072,8 +902,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'b, ('b, 'a, int) => 'b) => 'b", "documentation": { "kind": "markdown", @@ -1084,8 +912,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a => bool) => bool", "documentation": { "kind": "markdown", @@ -1096,7 +922,6 @@ Path Array. "tags": [] }, { - "data": null, "deprecated": true, "detail": "(array<'a>, int) => 'a", "documentation": { @@ -1108,8 +933,6 @@ Path Array. "tags": [ 1 ] }, { - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => (t<'a>, t<'a>)", "documentation": { "kind": "markdown", @@ -1120,7 +943,6 @@ Path Array. "tags": [] }, { - "data": null, "deprecated": true, "detail": "(array<'a>, ~target: int) => array<'a>", "documentation": { @@ -1132,8 +954,6 @@ Path Array. "tags": [ 1 ] }, { - "data": null, - "deprecated": false, "detail": "array> => array<'a>", "documentation": { "kind": "markdown", @@ -1144,8 +964,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, int) => option<'a>", "documentation": { "kind": "markdown", @@ -1156,8 +974,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "array<'a> => option<'a>", "documentation": { "kind": "markdown", @@ -1168,8 +984,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, int) => option<'a>", "documentation": { "kind": "markdown", @@ -1180,8 +994,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "array<'a> => Iterable.t<'a>", "documentation": { "kind": "markdown", @@ -1192,8 +1004,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, int) => unit", "documentation": { "kind": "markdown", @@ -1204,8 +1014,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a => bool) => option", "documentation": { "kind": "markdown", @@ -1216,8 +1024,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, array<'a>) => unit", "documentation": { "kind": "markdown", @@ -1228,8 +1034,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "array<('a, 'b)> => (t<'a>, array<'b>)", "documentation": { "kind": "markdown", @@ -1240,8 +1044,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a => unit) => unit", "documentation": { "kind": "markdown", @@ -1252,8 +1054,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a => array<'b>) => array<'b>", "documentation": { "kind": "markdown", @@ -1264,8 +1064,6 @@ Path Array. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "arrayLike<'a> => array<'a>", "documentation": { "kind": "markdown", @@ -1276,7 +1074,6 @@ Path Array. "tags": [] }, { - "data": null, "deprecated": true, "detail": "(array<'a>, 'a, int) => int", "documentation": { @@ -1299,8 +1096,6 @@ ContextPath Value[Array, m] Path Array.m [ { - "data": null, - "deprecated": false, "detail": "(~length: int, 'a) => array<'a>", "documentation": { "kind": "markdown", @@ -1311,8 +1106,6 @@ Path Array.m "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a => 'b) => array<'b>", "documentation": { "kind": "markdown", @@ -1323,8 +1116,6 @@ Path Array.m "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, ('a, int) => 'b) => array<'b>", "documentation": { "kind": "markdown", @@ -1346,7 +1137,6 @@ ContextPath Value[Dep, c] Path Dep.c [ { - "data": null, "deprecated": true, "detail": "int => int", "documentation": { @@ -1369,24 +1159,8 @@ ContextPath Value[Lib, foo] Path Lib.foo Found type for function (~age: int, ~name: string) => string [ - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "age", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "name", - "tags": [] - } + { "detail": "int", "kind": 4, "label": "age", "tags": [] }, + { "detail": "string", "kind": 4, "label": "name", "tags": [] } ] Complete src/Completion.res 26:13 @@ -1401,8 +1175,6 @@ Path ArrayUtils.m Path m [ { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a => 'b) => array<'b>", "documentation": { "kind": "markdown", @@ -1413,8 +1185,6 @@ Path m "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, ('a, int) => 'b) => array<'b>", "documentation": { "kind": "markdown", @@ -1437,8 +1207,6 @@ Path Stdlib.String.toU Path toU [ { - "data": null, - "deprecated": false, "detail": "string => string", "documentation": { "kind": "markdown", @@ -1462,8 +1230,6 @@ Path Stdlib.Option.e Path e [ { - "data": null, - "deprecated": false, "detail": "(option<'a>, option<'b>, ('a, 'b) => bool) => bool", "documentation": { "kind": "markdown", @@ -1490,19 +1256,13 @@ Path ForAuto. Path [ { - "data": null, - "deprecated": false, "detail": "(t, int) => t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "ForAuto.abc", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(t, int) => t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "ForAuto.abd", "tags": [] @@ -1521,17 +1281,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath CJsxPropValue [O, Comp] second Path O.Comp.make -[ - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "zzz", - "tags": [] - } -] +[ { "detail": "int", "kind": 12, "label": "zzz", "tags": [] } ] Complete src/Completion.res 62:23 posCursor:[62:23] posNoWhite:[62:22] Found expr:[62:14->62:23] @@ -1540,17 +1290,7 @@ Completable: Cjsx([O, Comp], z, [z]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path O.Comp.make -[ - { - "data": null, - "deprecated": false, - "detail": "option", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "zoo", - "tags": [] - } -] +[ { "detail": "option", "kind": 4, "label": "zoo", "tags": [] } ] Complete src/Completion.res 65:8 Attribute id:reac:[65:3->65:8] label:reac @@ -1559,8 +1299,6 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib [ { - "data": null, - "deprecated": false, "detail": "", "documentation": { "kind": "markdown", @@ -1572,8 +1310,6 @@ Resolved opens 1 Stdlib "tags": [] }, { - "data": null, - "deprecated": false, "detail": "", "documentation": { "kind": "markdown", @@ -1595,8 +1331,6 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib [ { - "data": null, - "deprecated": false, "detail": "", "documentation": { "kind": "markdown", @@ -1608,8 +1342,6 @@ Resolved opens 1 Stdlib "tags": [] }, { - "data": null, - "deprecated": false, "detail": "", "documentation": { "kind": "markdown", @@ -1631,17 +1363,7 @@ Resolved opens 1 Stdlib ContextPath Value[Lib, foo] Path Lib.foo Found type for function (~age: int, ~name: string) => string -[ - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "age", - "tags": [] - } -] +[ { "detail": "int", "kind": 4, "label": "age", "tags": [] } ] Complete src/Completion.res 74:26 posCursor:[74:26] posNoWhite:[74:25] Found expr:[74:11->74:26] @@ -1652,17 +1374,7 @@ Resolved opens 1 Stdlib ContextPath Value[Lib, foo] Path Lib.foo Found type for function (~age: int, ~name: string) => string -[ - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "name", - "tags": [] - } -] +[ { "detail": "string", "kind": 4, "label": "name", "tags": [] } ] Complete src/Completion.res 77:32 posCursor:[77:32] posNoWhite:[77:31] Found expr:[77:11->77:32] @@ -1673,17 +1385,7 @@ Resolved opens 1 Stdlib ContextPath Value[Lib, foo] Path Lib.foo Found type for function (~age: int, ~name: string) => string -[ - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "name", - "tags": [] - } -] +[ { "detail": "string", "kind": 4, "label": "name", "tags": [] } ] Complete src/Completion.res 82:5 posCursor:[82:5] posNoWhite:[82:4] Found expr:[80:8->86:1] @@ -1705,17 +1407,7 @@ Resolved opens 1 Stdlib ContextPath Value[someObj]["a"] ContextPath Value[someObj] Path someObj -[ - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "age", - "tags": [] - } -] +[ { "detail": "int", "kind": 4, "label": "age", "tags": [] } ] Complete src/Completion.res 95:24 posCursor:[95:24] posNoWhite:[95:23] Found expr:[95:3->99:6] @@ -1729,24 +1421,8 @@ ContextPath Value[nestedObj]["x"] ContextPath Value[nestedObj] Path nestedObj [ - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "age", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "name", - "tags": [] - } + { "detail": "int", "kind": 4, "label": "age", "tags": [] }, + { "detail": "string", "kind": 4, "label": "name", "tags": [] } ] Complete src/Completion.res 99:7 @@ -1758,17 +1434,7 @@ Resolved opens 1 Stdlib ContextPath Value[o]["a"] ContextPath Value[o] Path o -[ - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "age", - "tags": [] - } -] +[ { "detail": "int", "kind": 4, "label": "age", "tags": [] } ] Complete src/Completion.res 104:17 posCursor:[104:17] posNoWhite:[104:16] Found expr:[104:3->125:19] @@ -1782,24 +1448,8 @@ ContextPath Value[no]["x"] ContextPath Value[no] Path no [ - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "name", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "age", - "tags": [] - } + { "detail": "string", "kind": 4, "label": "name", "tags": [] }, + { "detail": "int", "kind": 4, "label": "age", "tags": [] } ] Complete src/Completion.res 110:5 @@ -1819,8 +1469,6 @@ Path Completion. Path [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -1831,8 +1479,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -1861,8 +1507,6 @@ Path Objects.Rec. Path [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -1873,8 +1517,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -1898,10 +1540,7 @@ ContextPath Value[my] Path my [ { - "data": null, - "deprecated": false, "detail": "(int, int) => int", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "myAmazingFunction", "tags": [] @@ -1918,24 +1557,8 @@ ContextPath Value[Objects, object][""] ContextPath Value[Objects, object] Path Objects.object [ - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "name", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "age", - "tags": [] - } + { "detail": "string", "kind": 4, "label": "name", "tags": [] }, + { "detail": "int", "kind": 4, "label": "age", "tags": [] } ] Complete src/Completion.res 151:6 @@ -1974,8 +1597,6 @@ Path Completion. Path [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -1986,8 +1607,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -2030,8 +1649,6 @@ Path Completion.n Path n [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -2051,17 +1668,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[Lis] Path Lis -[ - { - "data": null, - "deprecated": false, - "detail": "module List", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 9, - "label": "List", - "tags": [] - } -] +[ { "detail": "module List", "kind": 9, "label": "List", "tags": [] } ] Complete src/Completion.res 169:16 posCursor:[169:16] posNoWhite:[169:15] Found expr:[169:3->169:16] @@ -2073,10 +1680,7 @@ ContextPath Module[WithChildren] Path WithChildren [ { - "data": null, - "deprecated": false, "detail": "module WithChildren", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "WithChildren", "tags": [] @@ -2093,8 +1697,6 @@ ContextPath Type[Null, ""] Path Null. [ { - "data": null, - "deprecated": false, "detail": "type t", "documentation": { "kind": "markdown", @@ -2116,8 +1718,6 @@ ContextPath Type[ForAuto, ""] Path ForAuto. [ { - "data": null, - "deprecated": false, "detail": "type t", "documentation": { "kind": "markdown", @@ -2139,8 +1739,6 @@ ContextPath Value[As] Path As [ { - "data": null, - "deprecated": false, "detail": "Asterix", "documentation": { "kind": "markdown", @@ -2151,37 +1749,25 @@ Path As "tags": [] }, { - "data": null, - "deprecated": false, "detail": "module AsyncIterable", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "AsyncIterable", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "module AsyncIterator", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "AsyncIterator", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "module AsyncGenerator", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "AsyncGenerator", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "module AsyncIterableIterator", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "AsyncIterableIterator", "tags": [] @@ -2195,17 +1781,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Module[For] Path For -[ - { - "data": null, - "deprecated": false, - "detail": "module ForAuto", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 9, - "label": "ForAuto", - "tags": [] - } -] +[ { "detail": "module ForAuto", "kind": 9, "label": "ForAuto", "tags": [] } ] Complete src/Completion.res 190:11 posCursor:[190:11] posNoWhite:[190:10] Found expr:[190:3->190:11] @@ -2215,17 +1791,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[Private, ""] Path Private. -[ - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "b", - "tags": [] - } -] +[ { "detail": "int", "kind": 12, "label": "b", "tags": [] } ] Complete src/Completion.res 202:6 posCursor:[202:6] posNoWhite:[202:5] Found expr:[202:3->202:6] @@ -2246,17 +1812,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 2 Stdlib Completion ContextPath Value[sha] Path sha -[ - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "shadowed", - "tags": [] - } -] +[ { "detail": "int", "kind": 12, "label": "shadowed", "tags": [] } ] Complete src/Completion.res 208:6 posCursor:[208:6] posNoWhite:[208:5] Found expr:[208:3->208:6] @@ -2267,17 +1823,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Value[sha] Path sha -[ - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "shadowed", - "tags": [] - } -] +[ { "detail": "string", "kind": 12, "label": "shadowed", "tags": [] } ] Complete src/Completion.res 221:22 posCursor:[221:22] posNoWhite:[221:21] Found expr:[221:3->224:22] @@ -2290,20 +1836,9 @@ ContextPath Value[FAO, forAutoObject][""] ContextPath Value[FAO, forAutoObject] Path FAO.forAutoObject [ + { "detail": "int", "kind": 4, "label": "age", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "age", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "FAR.forAutoRecord", - "documentation": { "kind": "markdown", "value": "" }, "kind": 4, "label": "forAutoLabel", "tags": [] @@ -2330,8 +1865,6 @@ Path FAR. Path [ { - "data": null, - "deprecated": false, "detail": "ForAuto.t", "documentation": { "kind": "markdown", @@ -2342,8 +1875,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "option", "documentation": { "kind": "markdown", @@ -2378,28 +1909,19 @@ Path ForAuto. Path [ { - "data": null, - "deprecated": false, "detail": "(t, int) => t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "ForAuto.abc", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(t, int) => t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "ForAuto.abd", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, int) => int", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "myAmazingFunction", "tags": [] @@ -2417,24 +1939,8 @@ Resolved opens 3 Stdlib Completion Completion ContextPath Value[ForAuto, a] Path ForAuto.a [ - { - "data": null, - "deprecated": false, - "detail": "(t, int) => t", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "abc", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "(t, int) => t", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "abd", - "tags": [] - } + { "detail": "(t, int) => t", "kind": 12, "label": "abc", "tags": [] }, + { "detail": "(t, int) => t", "kind": 12, "label": "abd", "tags": [] } ] Complete src/Completion.res 234:34 @@ -2450,17 +1956,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Value[na] Path na -[ - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "name", - "tags": [] - } -] +[ { "detail": "string", "kind": 12, "label": "name", "tags": [] } ] Complete src/Completion.res 237:17 posCursor:[237:17] posNoWhite:[237:14] Found expr:[237:14->237:22] @@ -2490,8 +1986,6 @@ Path Completion. Path [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -2502,8 +1996,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -2526,10 +2018,7 @@ ContextPath Value[SomeLo] Path SomeLo [ { - "data": null, - "deprecated": false, "detail": "module SomeLocalModule", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "SomeLocalModule", "tags": [] @@ -2547,8 +2036,6 @@ ContextPath Type[SomeLocalModule, ""] Path SomeLocalModule. [ { - "data": null, - "deprecated": false, "detail": "type zz", "documentation": { "kind": "markdown", @@ -2571,8 +2058,6 @@ ContextPath Type[SomeLocalModule, ""] Path SomeLocalModule. [ { - "data": null, - "deprecated": false, "detail": "type zz", "documentation": { "kind": "markdown", @@ -2594,8 +2079,6 @@ ContextPath Value[SomeLocal] Path SomeLocal [ { - "data": null, - "deprecated": false, "detail": "SomeLocalVariantItem", "documentation": { "kind": "markdown", @@ -2606,10 +2089,7 @@ Path SomeLocal "tags": [] }, { - "data": null, - "deprecated": false, "detail": "module SomeLocalModule", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "SomeLocalModule", "tags": [] @@ -2628,10 +2108,7 @@ ContextPath Type[SomeLocal] Path SomeLocal [ { - "data": null, - "deprecated": false, "detail": "module SomeLocalModule", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "SomeLocalModule", "tags": [] @@ -2649,17 +2126,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Value[_w] Path _w -[ - { - "data": null, - "deprecated": false, - "detail": "'a", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "_world", - "tags": [] - } -] +[ { "detail": "'a", "kind": 12, "label": "_world", "tags": [] } ] Complete src/Completion.res 281:22 posCursor:[281:22] posNoWhite:[281:21] Found type:[281:21->281:22] @@ -2672,8 +2139,6 @@ ContextPath Type[s] Path s [ { - "data": null, - "deprecated": false, "detail": "type someType", "documentation": { "kind": "markdown", @@ -2684,8 +2149,6 @@ Path s "tags": [] }, { - "data": null, - "deprecated": false, "detail": "type someLocalVariant", "documentation": { "kind": "markdown", @@ -2714,17 +2177,7 @@ CPPipe pathFromEnv: found:true Path Completion.someFun Path someFun Found type for function (~name: string) => unit -[ - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "name", - "tags": [] - } -] +[ { "detail": "string", "kind": 4, "label": "name", "tags": [] } ] Complete src/Completion.res 296:11 posCursor:[296:11] posNoWhite:[296:10] Found expr:[296:3->296:11] @@ -2746,8 +2199,6 @@ Path Completion. Path [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -2758,8 +2209,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -2790,42 +2239,10 @@ Found type for function ( unit, ) => int [ - { - "data": null, - "deprecated": false, - "detail": "option", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "opt1", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "a", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "b", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "option", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "opt2", - "tags": [] - } + { "detail": "option", "kind": 4, "label": "opt1", "tags": [] }, + { "detail": "int", "kind": 4, "label": "a", "tags": [] }, + { "detail": "int", "kind": 4, "label": "b", "tags": [] }, + { "detail": "option", "kind": 4, "label": "opt2", "tags": [] } ] Complete src/Completion.res 304:15 @@ -2841,33 +2258,9 @@ ContextPath Value[ff] Path ff Found type for function (~a: int, ~b: int, ~opt2: int=?, unit) => int [ - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "a", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "b", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "option", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "opt2", - "tags": [] - } + { "detail": "int", "kind": 4, "label": "a", "tags": [] }, + { "detail": "int", "kind": 4, "label": "b", "tags": [] }, + { "detail": "option", "kind": 4, "label": "opt2", "tags": [] } ] Complete src/Completion.res 307:17 @@ -2882,33 +2275,9 @@ ContextPath Value[ff] Path ff Found type for function (~a: int, ~b: int, ~opt2: int=?, unit) => int [ - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "a", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "b", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "option", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "opt2", - "tags": [] - } + { "detail": "int", "kind": 4, "label": "a", "tags": [] }, + { "detail": "int", "kind": 4, "label": "b", "tags": [] }, + { "detail": "option", "kind": 4, "label": "opt2", "tags": [] } ] Complete src/Completion.res 310:21 @@ -2923,24 +2292,8 @@ ContextPath Value[ff] Path ff Found type for function (~a: int, ~b: int) => int [ - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "a", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "b", - "tags": [] - } + { "detail": "int", "kind": 4, "label": "a", "tags": [] }, + { "detail": "int", "kind": 4, "label": "b", "tags": [] } ] Complete src/Completion.res 313:23 @@ -2955,24 +2308,8 @@ ContextPath Value[ff] Path ff Found type for function (~a: int, ~opt2: int=?, unit) => int [ - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "a", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "option", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "opt2", - "tags": [] - } + { "detail": "int", "kind": 4, "label": "a", "tags": [] }, + { "detail": "option", "kind": 4, "label": "opt2", "tags": [] } ] Complete src/Completion.res 316:16 @@ -2987,42 +2324,10 @@ ContextPath Value[ff] Path ff Found type for function (~opt1: int=?, ~a: int, ~b: int, unit, unit, ~c: int) => int [ - { - "data": null, - "deprecated": false, - "detail": "option", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "opt1", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "a", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "b", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "c", - "tags": [] - } + { "detail": "option", "kind": 4, "label": "opt1", "tags": [] }, + { "detail": "int", "kind": 4, "label": "a", "tags": [] }, + { "detail": "int", "kind": 4, "label": "b", "tags": [] }, + { "detail": "int", "kind": 4, "label": "c", "tags": [] } ] Complete src/Completion.res 326:17 @@ -3036,24 +2341,8 @@ ContextPath Value[withCallback] Path withCallback Found type for function (~b: int) => callback [ - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "b", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "a", - "tags": [] - } + { "detail": "int", "kind": 4, "label": "b", "tags": [] }, + { "detail": "int", "kind": 4, "label": "a", "tags": [] } ] Complete src/Completion.res 329:21 @@ -3068,24 +2357,8 @@ ContextPath Value[withCallback] Path withCallback Found type for function (~b: int) => callback [ - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "b", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "a", - "tags": [] - } + { "detail": "int", "kind": 4, "label": "b", "tags": [] }, + { "detail": "int", "kind": 4, "label": "a", "tags": [] } ] Complete src/Completion.res 332:21 @@ -3099,17 +2372,7 @@ ContextPath Value[withCallback](~b) ContextPath Value[withCallback] Path withCallback Found type for function callback -[ - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "a", - "tags": [] - } -] +[ { "detail": "int", "kind": 4, "label": "a", "tags": [] } ] Complete src/Completion.res 339:26 posCursor:[339:26] posNoWhite:[339:25] Found expr:[336:2->349:23] @@ -3131,23 +2394,13 @@ Resolved opens 3 Stdlib Completion Completion ContextPath Type[Res] Path Res [ - { - "data": null, - "deprecated": false, - "detail": "module Result", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 9, - "label": "Result", - "tags": [] - }, + { "detail": "module Result", "kind": 9, "label": "Result", "tags": [] }, { "data": { "modulePath": "RescriptReactErrorBoundary", "filePath": "src/Completion.res" }, - "deprecated": false, "detail": "module RescriptReactErrorBoundary", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "RescriptReactErrorBoundary", "tags": [] @@ -3157,9 +2410,7 @@ Path Res "modulePath": "RescriptReactRouter", "filePath": "src/Completion.res" }, - "deprecated": false, "detail": "module RescriptReactRouter", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "RescriptReactRouter", "tags": [] @@ -3169,9 +2420,7 @@ Path Res "modulePath": "RescriptTools", "filePath": "src/Completion.res" }, - "deprecated": false, "detail": "module RescriptTools", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "RescriptTools", "tags": [] @@ -3181,9 +2430,7 @@ Path Res "modulePath": "RescriptTools_Docgen", "filePath": "src/Completion.res" }, - "deprecated": false, "detail": "module RescriptTools_Docgen", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "RescriptTools_Docgen", "tags": [] @@ -3193,9 +2440,7 @@ Path Res "modulePath": "RescriptTools_ExtractCodeBlocks", "filePath": "src/Completion.res" }, - "deprecated": false, "detail": "module RescriptTools_ExtractCodeBlocks", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "RescriptTools_ExtractCodeBlocks", "tags": [] @@ -3214,10 +2459,7 @@ ContextPath Value[this] Path this [ { - "data": null, - "deprecated": false, "detail": "\\\"Type Not Known\"", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "thisIsNotSaved", "tags": [] @@ -3304,8 +2546,6 @@ ContextPath Value[T] Path T [ { - "data": null, - "deprecated": false, "detail": "That", "documentation": { "kind": "markdown", @@ -3316,8 +2556,6 @@ Path T "tags": [] }, { - "data": null, - "deprecated": false, "detail": "This", "documentation": { "kind": "markdown", @@ -3328,49 +2566,31 @@ Path T "tags": [] }, { - "data": null, - "deprecated": false, "detail": "module TypedArray", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "TypedArray", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "module TimeoutId", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "TimeoutId", "tags": [] }, - { - "data": null, - "deprecated": false, - "detail": "module Type", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 9, - "label": "Type", - "tags": [] - }, + { "detail": "module Type", "kind": 9, "label": "Type", "tags": [] }, { "data": { "modulePath": "TableclothMap", "filePath": "src/Completion.res" }, - "deprecated": false, "detail": "module TableclothMap", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "TableclothMap", "tags": [] }, { "data": { "modulePath": "TypeArgCtx", "filePath": "src/Completion.res" }, - "deprecated": false, "detail": "module TypeArgCtx", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "TypeArgCtx", "tags": [] @@ -3380,9 +2600,7 @@ Path T "modulePath": "TypeAtPosCompletion", "filePath": "src/Completion.res" }, - "deprecated": false, "detail": "module TypeAtPosCompletion", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "TypeAtPosCompletion", "tags": [] @@ -3392,9 +2610,7 @@ Path T "modulePath": "TypeConstraint", "filePath": "src/Completion.res" }, - "deprecated": false, "detail": "module TypeConstraint", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "TypeConstraint", "tags": [] @@ -3404,9 +2620,7 @@ Path T "modulePath": "TypeDefinition", "filePath": "src/Completion.res" }, - "deprecated": false, "detail": "module TypeDefinition", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "TypeDefinition", "tags": [] @@ -3426,8 +2640,6 @@ ContextPath Value[AndThatOther, T] Path AndThatOther.T [ { - "data": null, - "deprecated": false, "detail": "ThatOther", "documentation": { "kind": "markdown", @@ -3453,24 +2665,8 @@ Resolved opens 3 Stdlib Completion Completion ContextPath Value[ForAuto, ""] Path ForAuto. [ - { - "data": null, - "deprecated": false, - "detail": "(t, int) => t", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "abc", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "(t, int) => t", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "abd", - "tags": [] - } + { "detail": "(t, int) => t", "kind": 12, "label": "abc", "tags": [] }, + { "detail": "(t, int) => t", "kind": 12, "label": "abd", "tags": [] } ] Complete src/Completion.res 384:38 @@ -3488,20 +2684,9 @@ ContextPath Value[FAO, forAutoObject][""] ContextPath Value[FAO, forAutoObject] Path FAO.forAutoObject [ + { "detail": "int", "kind": 4, "label": "age", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "age", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "FAR.forAutoRecord", - "documentation": { "kind": "markdown", "value": "" }, "kind": 4, "label": "forAutoLabel", "tags": [] @@ -3530,8 +2715,6 @@ Path Completion. Path [ { - "data": null, - "deprecated": false, "detail": "(~name: string) => unit", "documentation": { "kind": "markdown", @@ -3542,8 +2725,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -3570,8 +2751,6 @@ Path ArrayUtils.ma Path ma [ { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a => 'b) => array<'b>", "documentation": { "kind": "markdown", @@ -3582,8 +2761,6 @@ Path ma "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, ('a, int) => 'b) => array<'b>", "documentation": { "kind": "markdown", @@ -3608,17 +2785,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Value[red] Path red -[ - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "red", - "tags": [] - } -] +[ { "detail": "string", "kind": 12, "label": "red", "tags": [] } ] Complete src/Completion.res 404:25 posCursor:[404:25] posNoWhite:[404:24] Found expr:[402:14->404:31] @@ -3633,17 +2800,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 3 Stdlib Completion Completion ContextPath Value[red] Path red -[ - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "red", - "tags": [] - } -] +[ { "detail": "string", "kind": 12, "label": "red", "tags": [] } ] Complete src/Completion.res 407:22 posCursor:[407:22] posNoWhite:[407:21] Found expr:[407:11->485:0] @@ -3660,27 +2817,9 @@ Resolved opens 3 Stdlib Completion Completion ContextPath Value[r] Path r [ + { "detail": "string", "kind": 12, "label": "red", "tags": [] }, + { "detail": "unit => aa", "kind": 12, "label": "retAA", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "red", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "unit => aa", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "retAA", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "rAlias", "documentation": { "kind": "markdown", @@ -3705,24 +2844,8 @@ Resolved opens 3 Stdlib Completion Completion ContextPath Value[SomeLocalModule, ""] Path SomeLocalModule. [ - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "bb", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "aa", - "tags": [] - } + { "detail": "int", "kind": 12, "label": "bb", "tags": [] }, + { "detail": "int", "kind": 12, "label": "aa", "tags": [] } ] Complete src/Completion.res 414:21 @@ -3739,24 +2862,8 @@ Resolved opens 3 Stdlib Completion Completion ContextPath Value[SomeLocalModule, ""] Path SomeLocalModule. [ - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "bb", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "aa", - "tags": [] - } + { "detail": "int", "kind": 12, "label": "bb", "tags": [] }, + { "detail": "int", "kind": 12, "label": "aa", "tags": [] } ] Complete src/Completion.res 419:17 @@ -3771,7 +2878,6 @@ Path Stdlib.Int.t Path t [ { - "data": null, "deprecated": true, "detail": "(int, ~radix: int) => string", "documentation": { @@ -3783,7 +2889,6 @@ Path t "tags": [ 1 ] }, { - "data": null, "deprecated": true, "detail": "(int, ~digits: int) => string", "documentation": { @@ -3795,7 +2900,6 @@ Path t "tags": [ 1 ] }, { - "data": null, "deprecated": true, "detail": "(int, ~digits: int) => string", "documentation": { @@ -3807,7 +2911,6 @@ Path t "tags": [ 1 ] }, { - "data": null, "deprecated": true, "detail": "(int, ~digits: int) => string", "documentation": { @@ -3819,8 +2922,6 @@ Path t "tags": [ 1 ] }, { - "data": null, - "deprecated": false, "detail": "(int, ~digits: int=?) => string", "documentation": { "kind": "markdown", @@ -3831,8 +2932,6 @@ Path t "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, ~radix: int=?) => string", "documentation": { "kind": "markdown", @@ -3843,8 +2942,6 @@ Path t "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int => float", "documentation": { "kind": "markdown", @@ -3855,8 +2952,6 @@ Path t "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int => string", "documentation": { "kind": "markdown", @@ -3867,8 +2962,6 @@ Path t "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, ~digits: int=?) => string", "documentation": { "kind": "markdown", @@ -3879,8 +2972,6 @@ Path t "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, ~digits: int=?) => string", "documentation": { "kind": "markdown", @@ -3904,7 +2995,6 @@ Path Stdlib.Float.t Path t [ { - "data": null, "deprecated": true, "detail": "(float, ~radix: int) => string", "documentation": { @@ -3916,7 +3006,6 @@ Path t "tags": [ 1 ] }, { - "data": null, "deprecated": true, "detail": "(float, ~digits: int) => string", "documentation": { @@ -3928,8 +3017,6 @@ Path t "tags": [ 1 ] }, { - "data": null, - "deprecated": false, "detail": "float => int", "documentation": { "kind": "markdown", @@ -3940,7 +3027,6 @@ Path t "tags": [] }, { - "data": null, "deprecated": true, "detail": "(float, ~digits: int) => string", "documentation": { @@ -3952,7 +3038,6 @@ Path t "tags": [ 1 ] }, { - "data": null, "deprecated": true, "detail": "(float, ~digits: int) => string", "documentation": { @@ -3964,8 +3049,6 @@ Path t "tags": [ 1 ] }, { - "data": null, - "deprecated": false, "detail": "(float, ~digits: int=?) => string", "documentation": { "kind": "markdown", @@ -3976,8 +3059,6 @@ Path t "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(float, ~radix: int=?) => string", "documentation": { "kind": "markdown", @@ -3988,8 +3069,6 @@ Path t "tags": [] }, { - "data": null, - "deprecated": false, "detail": "float => string", "documentation": { "kind": "markdown", @@ -4000,8 +3079,6 @@ Path t "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(float, ~digits: int=?) => string", "documentation": { "kind": "markdown", @@ -4012,8 +3089,6 @@ Path t "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(float, ~digits: int=?) => string", "documentation": { "kind": "markdown", @@ -4038,7 +3113,6 @@ Path Stdlib.Result.g Path g [ { - "data": null, "deprecated": true, "detail": "(result<'a, 'b>, ~message: string=?) => 'a", "documentation": { @@ -4050,8 +3124,6 @@ Path g "tags": [ 1 ] }, { - "data": null, - "deprecated": false, "detail": "(result<'a, 'b>, ~message: string=?) => 'a", "documentation": { "kind": "markdown", @@ -4062,8 +3134,6 @@ Path g "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(result<'a, 'b>, 'a) => 'a", "documentation": { "kind": "markdown", @@ -4074,7 +3144,6 @@ Path g "tags": [] }, { - "data": null, "deprecated": true, "detail": "(result<'a, 'b>, 'a) => 'a", "documentation": { @@ -4105,7 +3174,6 @@ Path Completion.so Path so [ { - "data": null, "deprecated": true, "detail": "int", "documentation": { @@ -4117,7 +3185,6 @@ Path so "tags": [ 1 ] }, { - "data": null, "deprecated": true, "detail": "float", "documentation": { @@ -4140,7 +3207,6 @@ ContextPath Type[someVariantWithDeprecated] Path someVariantWithDeprecated [ { - "data": null, "deprecated": true, "detail": "DoNotUseMe", "documentation": { @@ -4154,8 +3220,6 @@ Path someVariantWithDeprecated "tags": [ 1 ] }, { - "data": null, - "deprecated": false, "detail": "UseMeInstead", "documentation": { "kind": "markdown", @@ -4168,7 +3232,6 @@ Path someVariantWithDeprecated "tags": [] }, { - "data": null, "deprecated": true, "detail": "AndNotMe", "documentation": { @@ -4197,7 +3260,6 @@ Path Stdlib.Int.toS Path toS [ { - "data": null, "deprecated": true, "detail": "(int, ~radix: int) => string", "documentation": { @@ -4209,8 +3271,6 @@ Path toS "tags": [ 1 ] }, { - "data": null, - "deprecated": false, "detail": "(int, ~radix: int=?) => string", "documentation": { "kind": "markdown", @@ -4232,10 +3292,7 @@ ContextPath Type[withUncurried] Path withUncurried [ { - "data": null, - "deprecated": false, "detail": "int => unit", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "${1:v} => ${0:v}", "insertTextFormat": 2, "kind": 12, @@ -4256,8 +3313,6 @@ ContextPath ValueOrField[FAR, ""] Path FAR. [ { - "data": null, - "deprecated": false, "detail": "forAutoRecord", "documentation": { "kind": "markdown", @@ -4268,8 +3323,6 @@ Path FAR. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "ForAuto.t", "documentation": { "kind": "markdown", @@ -4280,8 +3333,6 @@ Path FAR. "tags": [] }, { - "data": null, - "deprecated": false, "detail": "option", "documentation": { "kind": "markdown", @@ -4303,8 +3354,6 @@ ContextPath Type[someVariantWithRecord] Path someVariantWithRecord [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -4315,8 +3364,6 @@ Path someVariantWithRecord "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -4338,8 +3385,6 @@ ContextPath Type[someVariantWithRecord] Path someVariantWithRecord [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -4350,8 +3395,6 @@ Path someVariantWithRecord "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -4373,8 +3416,6 @@ ContextPath Type[someVariantWithInlineRecord] Path someVariantWithInlineRecord [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -4385,8 +3426,6 @@ Path someVariantWithInlineRecord "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -4408,8 +3447,6 @@ ContextPath Type[someVariantWithInlineRecord] Path someVariantWithInlineRecord [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -4420,8 +3457,6 @@ Path someVariantWithInlineRecord "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", diff --git a/tests/analysis_tests/tests/src/expected/CompletionAttributes.res.txt b/tests/analysis_tests/tests/src/expected/CompletionAttributes.res.txt index 7f4063b4132..ee833853eec 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionAttributes.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionAttributes.res.txt @@ -5,8 +5,6 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib [ { - "data": null, - "deprecated": false, "detail": "", "documentation": { "kind": "markdown", @@ -26,33 +24,9 @@ Completable: CdecoratorPayload(module=) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib [ - { - "data": null, - "deprecated": false, - "detail": "Package", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "@rescript/react", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "Local file", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "./test.json", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "Local file", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "./tst.js", - "tags": [] - } + { "detail": "Package", "kind": 4, "label": "@rescript/react", "tags": [] }, + { "detail": "Local file", "kind": 4, "label": "./test.json", "tags": [] }, + { "detail": "Local file", "kind": 4, "label": "./tst.js", "tags": [] } ] Complete src/CompletionAttributes.res 6:7 @@ -62,8 +36,6 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib [ { - "data": null, - "deprecated": false, "detail": "", "documentation": { "kind": "markdown", @@ -84,8 +56,6 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -96,8 +66,6 @@ Resolved opens 1 Stdlib "tags": [] }, { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -108,8 +76,6 @@ Resolved opens 1 Stdlib "tags": [] }, { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -128,8 +94,6 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -140,8 +104,6 @@ Resolved opens 1 Stdlib "tags": [] }, { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -160,10 +122,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib [ { - "data": null, - "deprecated": false, "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "\"$0\"", "insertTextFormat": 2, "kind": 12, @@ -180,8 +139,6 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -192,8 +149,6 @@ Resolved opens 1 Stdlib "tags": [] }, { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -212,8 +167,6 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -224,8 +177,6 @@ Resolved opens 1 Stdlib "tags": [] }, { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -244,8 +195,6 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib [ { - "data": null, - "deprecated": false, "detail": "importAttributesConfig", "documentation": { "kind": "markdown", @@ -267,8 +216,6 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -286,33 +233,9 @@ Completable: CdecoratorPayload(module=) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib [ - { - "data": null, - "deprecated": false, - "detail": "Package", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "@rescript/react", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "Local file", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "./test.json", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "Local file", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "./tst.js", - "tags": [] - } + { "detail": "Package", "kind": 4, "label": "@rescript/react", "tags": [] }, + { "detail": "Local file", "kind": 4, "label": "./test.json", "tags": [] }, + { "detail": "Local file", "kind": 4, "label": "./tst.js", "tags": [] } ] Complete src/CompletionAttributes.res 33:17 @@ -321,33 +244,9 @@ Completable: CdecoratorPayload(module=) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib [ - { - "data": null, - "deprecated": false, - "detail": "Package", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "@rescript/react", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "Local file", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "./test.json", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "Local file", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "./tst.js", - "tags": [] - } + { "detail": "Package", "kind": 4, "label": "@rescript/react", "tags": [] }, + { "detail": "Local file", "kind": 4, "label": "./test.json", "tags": [] }, + { "detail": "Local file", "kind": 4, "label": "./tst.js", "tags": [] } ] Complete src/CompletionAttributes.res 36:14 @@ -357,20 +256,14 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib [ { - "data": null, - "deprecated": false, "detail": "`%todo` is used to tell the compiler that some code still needs to be implemented.", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "todo", "kind": 4, "label": "todo", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "`%todo` is used to tell the compiler that some code still needs to be implemented. With a payload.", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "todo(\"${0:TODO}\")", "insertTextFormat": 2, "kind": 4, diff --git a/tests/analysis_tests/tests/src/expected/CompletionConfiguredBuiltins.res.txt b/tests/analysis_tests/tests/src/expected/CompletionConfiguredBuiltins.res.txt index 9ba91582d7b..16b2766451f 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionConfiguredBuiltins.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionConfiguredBuiltins.res.txt @@ -11,10 +11,7 @@ Path ArrayUtils.em Path em [ { - "data": null, - "deprecated": false, "detail": "array<'a> => bool", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "ArrayUtils.empty", "tags": [] @@ -35,10 +32,7 @@ Path FastifyExt.doSt Path doSt [ { - "data": null, - "deprecated": false, "detail": "Fastify.t => unit", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "FastifyExt.doStuff", "tags": [] diff --git a/tests/analysis_tests/tests/src/expected/CompletionDicts.res.txt b/tests/analysis_tests/tests/src/expected/CompletionDicts.res.txt index d078a57cf57..86f52b8c81c 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionDicts.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionDicts.res.txt @@ -9,10 +9,7 @@ ContextPath Value[Dict, fromArray] Path Dict.fromArray [ { - "data": null, - "deprecated": false, "detail": "(string, 'a)", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "(${1:_}, ${2:_})", "insertTextFormat": 2, "kind": 12, @@ -32,10 +29,7 @@ ContextPath Value[Dict, fromArray] Path Dict.fromArray [ { - "data": null, - "deprecated": false, "detail": "(string, 'a)", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "(${1:_}, ${2:_})", "insertTextFormat": 2, "kind": 12, @@ -66,24 +60,8 @@ ContextPath CArgument Value[Dict, fromArray]($0) ContextPath Value[Dict, fromArray] Path Dict.fromArray [ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "true", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] diff --git a/tests/analysis_tests/tests/src/expected/CompletionExpressions.res.txt b/tests/analysis_tests/tests/src/expected/CompletionExpressions.res.txt index ac38b758281..9c6b1137266 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionExpressions.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionExpressions.res.txt @@ -10,10 +10,7 @@ ContextPath Value[f] Path f [ { - "data": null, - "deprecated": false, "detail": "(bool, option>)", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "(${1:_}, ${2:_})", "insertTextFormat": 2, "kind": 12, @@ -33,8 +30,6 @@ ContextPath Value[fnTakingRecord] Path fnTakingRecord [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -45,8 +40,6 @@ Path fnTakingRecord "tags": [] }, { - "data": null, - "deprecated": false, "detail": "bool", "documentation": { "kind": "markdown", @@ -57,8 +50,6 @@ Path fnTakingRecord "tags": [] }, { - "data": null, - "deprecated": false, "detail": "option", "documentation": { "kind": "markdown", @@ -69,8 +60,6 @@ Path fnTakingRecord "tags": [] }, { - "data": null, - "deprecated": false, "detail": "someVariant", "documentation": { "kind": "markdown", @@ -81,8 +70,6 @@ Path fnTakingRecord "tags": [] }, { - "data": null, - "deprecated": false, "detail": "somePolyVariant", "documentation": { "kind": "markdown", @@ -93,8 +80,6 @@ Path fnTakingRecord "tags": [] }, { - "data": null, - "deprecated": false, "detail": "option", "documentation": { "kind": "markdown", @@ -117,8 +102,6 @@ ContextPath Value[fnTakingRecord] Path fnTakingRecord [ { - "data": null, - "deprecated": false, "detail": "option", "documentation": { "kind": "markdown", @@ -140,24 +123,8 @@ ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord [ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "true", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] Complete src/CompletionExpressions.res 35:36 @@ -171,8 +138,6 @@ ContextPath Value[fnTakingRecord] Path fnTakingRecord [ { - "data": null, - "deprecated": false, "detail": "bool", "documentation": { "kind": "markdown", @@ -183,8 +148,6 @@ Path fnTakingRecord "tags": [] }, { - "data": null, - "deprecated": false, "detail": "option", "documentation": { "kind": "markdown", @@ -195,8 +158,6 @@ Path fnTakingRecord "tags": [] }, { - "data": null, - "deprecated": false, "detail": "someVariant", "documentation": { "kind": "markdown", @@ -207,8 +168,6 @@ Path fnTakingRecord "tags": [] }, { - "data": null, - "deprecated": false, "detail": "somePolyVariant", "documentation": { "kind": "markdown", @@ -219,8 +178,6 @@ Path fnTakingRecord "tags": [] }, { - "data": null, - "deprecated": false, "detail": "option", "documentation": { "kind": "markdown", @@ -243,8 +200,6 @@ ContextPath Value[fnTakingRecord] Path fnTakingRecord [ { - "data": null, - "deprecated": false, "detail": "option", "documentation": { "kind": "markdown", @@ -255,8 +210,6 @@ Path fnTakingRecord "tags": [] }, { - "data": null, - "deprecated": false, "detail": "someVariant", "documentation": { "kind": "markdown", @@ -267,8 +220,6 @@ Path fnTakingRecord "tags": [] }, { - "data": null, - "deprecated": false, "detail": "somePolyVariant", "documentation": { "kind": "markdown", @@ -279,8 +230,6 @@ Path fnTakingRecord "tags": [] }, { - "data": null, - "deprecated": false, "detail": "option", "documentation": { "kind": "markdown", @@ -303,8 +252,6 @@ ContextPath Value[fnTakingRecord] Path fnTakingRecord [ { - "data": null, - "deprecated": false, "detail": "otherRecord", "documentation": { "kind": "markdown", @@ -317,8 +264,6 @@ Path fnTakingRecord "tags": [] }, { - "data": null, - "deprecated": false, "detail": "otherRecord", "documentation": { "kind": "markdown", @@ -331,8 +276,6 @@ Path fnTakingRecord "tags": [] }, { - "data": null, - "deprecated": false, "detail": "otherRecord", "documentation": { "kind": "markdown", @@ -343,8 +286,6 @@ Path fnTakingRecord "tags": [] }, { - "data": null, - "deprecated": false, "detail": "otherRecord", "documentation": { "kind": "markdown", @@ -380,8 +321,6 @@ ContextPath Value[fnTakingRecord] Path fnTakingRecord [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -392,8 +331,6 @@ Path fnTakingRecord "tags": [] }, { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -416,8 +353,6 @@ ContextPath Value[fnTakingRecord] Path fnTakingRecord [ { - "data": null, - "deprecated": false, "detail": "One", "documentation": { "kind": "markdown", @@ -430,8 +365,6 @@ Path fnTakingRecord "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Two", "documentation": { "kind": "markdown", @@ -444,8 +377,6 @@ Path fnTakingRecord "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Three(int, string)", "documentation": { "kind": "markdown", @@ -470,8 +401,6 @@ ContextPath Value[fnTakingRecord] Path fnTakingRecord [ { - "data": null, - "deprecated": false, "detail": "One", "documentation": { "kind": "markdown", @@ -496,8 +425,6 @@ ContextPath Value[fnTakingRecord] Path fnTakingRecord [ { - "data": null, - "deprecated": false, "detail": "someRecord", "documentation": { "kind": "markdown", @@ -522,24 +449,8 @@ ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord [ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "true", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] Complete src/CompletionExpressions.res 62:62 @@ -553,18 +464,13 @@ ContextPath Value[fnTakingRecord] Path fnTakingRecord [ { - "data": null, - "deprecated": false, "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, "kind": 4, "label": "true", "sortText": "A true", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "'a => Type.t", "documentation": { "kind": "markdown", @@ -587,10 +493,7 @@ ContextPath Value[fnTakingArray] Path fnTakingArray [ { - "data": null, - "deprecated": false, "detail": "option", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "[$0]", "insertTextFormat": 2, "kind": 12, @@ -610,44 +513,17 @@ ContextPath CArgument Value[fnTakingArray]($0) ContextPath Value[fnTakingArray] Path fnTakingArray [ + { "detail": "bool", "kind": 12, "label": "None", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "None", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "Some($0)", "insertTextFormat": 2, "kind": 12, "label": "Some(_)", "tags": [] }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "Some(true)", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "Some(false)", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "Some(true)", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "Some(false)", "tags": [] } ] Complete src/CompletionExpressions.res 75:26 @@ -660,18 +536,8 @@ ContextPath CArgument Value[fnTakingArray]($0) ContextPath Value[fnTakingArray] Path fnTakingArray [ + { "detail": "bool", "kind": 12, "label": "s", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "s", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "(unit => unit, float) => timeoutId", "documentation": { "kind": "markdown", @@ -682,8 +548,6 @@ Path fnTakingArray "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(unit => unit, float) => intervalId", "documentation": { "kind": "markdown", @@ -694,8 +558,6 @@ Path fnTakingArray "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(unit => unit, int) => intervalId", "documentation": { "kind": "markdown", @@ -706,8 +568,6 @@ Path fnTakingArray "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(unit => unit, int) => timeoutId", "documentation": { "kind": "markdown", @@ -729,24 +589,8 @@ ContextPath CArgument Value[fnTakingArray]($0) ContextPath Value[fnTakingArray] Path fnTakingArray [ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "true", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] Complete src/CompletionExpressions.res 81:31 @@ -759,44 +603,17 @@ ContextPath CArgument Value[fnTakingArray]($0) ContextPath Value[fnTakingArray] Path fnTakingArray [ + { "detail": "bool", "kind": 12, "label": "None", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "None", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "Some($0)", "insertTextFormat": 2, "kind": 12, "label": "Some(_)", "tags": [] }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "Some(true)", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "Some(false)", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "Some(true)", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "Some(false)", "tags": [] } ] Complete src/CompletionExpressions.res 84:31 @@ -809,44 +626,17 @@ ContextPath CArgument Value[fnTakingArray]($0) ContextPath Value[fnTakingArray] Path fnTakingArray [ + { "detail": "bool", "kind": 12, "label": "None", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "None", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "Some($0)", "insertTextFormat": 2, "kind": 12, "label": "Some(_)", "tags": [] }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "Some(true)", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "Some(false)", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "Some(true)", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "Some(false)", "tags": [] } ] Complete src/CompletionExpressions.res 89:38 @@ -858,17 +648,7 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord -[ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "someBoolVar", - "tags": [] - } -] +[ { "detail": "bool", "kind": 12, "label": "someBoolVar", "tags": [] } ] Complete src/CompletionExpressions.res 96:43 posCursor:[96:43] posNoWhite:[96:42] Found expr:[96:11->96:46] @@ -881,10 +661,7 @@ ContextPath Value[fnTakingOtherRecord] Path fnTakingOtherRecord [ { - "data": null, - "deprecated": false, "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "\"$0\"", "insertTextFormat": 2, "kind": 12, @@ -904,24 +681,8 @@ ContextPath CArgument Value[fnTakingRecordWithOptionalField]($0) ContextPath Value[fnTakingRecordWithOptionalField] Path fnTakingRecordWithOptionalField [ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "true", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] Complete src/CompletionExpressions.res 116:53 @@ -935,8 +696,6 @@ ContextPath Value[fnTakingRecordWithOptVariant] Path fnTakingRecordWithOptVariant [ { - "data": null, - "deprecated": false, "detail": "someVariant", "documentation": { "kind": "markdown", @@ -949,8 +708,6 @@ Path fnTakingRecordWithOptVariant "tags": [] }, { - "data": null, - "deprecated": false, "detail": "someVariant", "documentation": { "kind": "markdown", @@ -963,8 +720,6 @@ Path fnTakingRecordWithOptVariant "tags": [] }, { - "data": null, - "deprecated": false, "detail": "someVariant", "documentation": { "kind": "markdown", @@ -975,8 +730,6 @@ Path fnTakingRecordWithOptVariant "tags": [] }, { - "data": null, - "deprecated": false, "detail": "One", "documentation": { "kind": "markdown", @@ -989,8 +742,6 @@ Path fnTakingRecordWithOptVariant "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Two", "documentation": { "kind": "markdown", @@ -1003,8 +754,6 @@ Path fnTakingRecordWithOptVariant "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Three(int, string)", "documentation": { "kind": "markdown", @@ -1029,8 +778,6 @@ ContextPath Value[fnTakingInlineRecord] Path fnTakingInlineRecord [ { - "data": null, - "deprecated": false, "detail": "{someBoolField: bool, otherField: option, nestedRecord: otherRecord}", "documentation": { "kind": "markdown", @@ -1056,8 +803,6 @@ ContextPath Value[fnTakingInlineRecord] Path fnTakingInlineRecord [ { - "data": null, - "deprecated": false, "detail": "bool", "documentation": { "kind": "markdown", @@ -1068,8 +813,6 @@ Path fnTakingInlineRecord "tags": [] }, { - "data": null, - "deprecated": false, "detail": "option", "documentation": { "kind": "markdown", @@ -1080,8 +823,6 @@ Path fnTakingInlineRecord "tags": [] }, { - "data": null, - "deprecated": false, "detail": "otherRecord", "documentation": { "kind": "markdown", @@ -1104,8 +845,6 @@ ContextPath Value[fnTakingInlineRecord] Path fnTakingInlineRecord [ { - "data": null, - "deprecated": false, "detail": "bool", "documentation": { "kind": "markdown", @@ -1128,8 +867,6 @@ ContextPath Value[fnTakingInlineRecord] Path fnTakingInlineRecord [ { - "data": null, - "deprecated": false, "detail": "otherRecord", "documentation": { "kind": "markdown", @@ -1155,8 +892,6 @@ ContextPath Value[fnTakingInlineRecord] Path fnTakingInlineRecord [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -1167,8 +902,6 @@ Path fnTakingInlineRecord "tags": [] }, { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -1191,10 +924,7 @@ ContextPath Value[fnTakingCallback] Path fnTakingCallback [ { - "data": null, - "deprecated": false, "detail": "unit => unit", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "() => ${0:()}", "insertTextFormat": 2, "kind": 12, @@ -1215,8 +945,6 @@ ContextPath Value[fnTakingCallback] Path fnTakingCallback [ { - "data": null, - "deprecated": false, "detail": "('a, 'a) => unit", "documentation": { "kind": "markdown", @@ -1239,10 +967,7 @@ ContextPath Value[fnTakingCallback] Path fnTakingCallback [ { - "data": null, - "deprecated": false, "detail": "bool => unit", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "${1:v} => ${0:v}", "insertTextFormat": 2, "kind": 12, @@ -1263,10 +988,7 @@ ContextPath Value[fnTakingCallback] Path fnTakingCallback [ { - "data": null, - "deprecated": false, "detail": "ReactEvent.Mouse.t => unit", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "${1:event} => ${0:event}", "insertTextFormat": 2, "kind": 12, @@ -1287,10 +1009,7 @@ ContextPath Value[fnTakingCallback] Path fnTakingCallback [ { - "data": null, - "deprecated": false, "detail": "(~on: bool, ~off: bool=?, variant) => int", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "(~on, ~off=?, ${1:variant}) => {${0:()}}", "insertTextFormat": 2, "kind": 12, @@ -1311,10 +1030,7 @@ ContextPath Value[fnTakingCallback] Path fnTakingCallback [ { - "data": null, - "deprecated": false, "detail": "(bool, option, bool) => unit", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "(${1:v1}, ${2:v2}, ${3:v3}) => {${0:()}}", "insertTextFormat": 2, "kind": 12, @@ -1335,10 +1051,7 @@ ContextPath Value[fnTakingCallback] Path fnTakingCallback [ { - "data": null, - "deprecated": false, "detail": "(~on: bool=?, ~off: bool=?, unit) => int", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "(~on=?, ~off=?, ()) => {${0:()}}", "insertTextFormat": 2, "kind": 12, @@ -1362,45 +1075,11 @@ ContextPath CArgument Value[Console, log]($0) ContextPath Value[Console, log] Path Console.log [ + { "detail": "int", "kind": 12, "label": "second2", "tags": [] }, + { "detail": "bool", "kind": 12, "label": "second", "tags": [] }, + { "detail": "bool", "kind": 12, "label": "someBoolVar", "tags": [] }, + { "detail": "bool", "kind": 12, "label": "s", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "second2", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "second", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "someBoolVar", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "s", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "(unit => unit, float) => timeoutId", "documentation": { "kind": "markdown", @@ -1411,8 +1090,6 @@ Path Console.log "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(unit => unit, float) => intervalId", "documentation": { "kind": "markdown", @@ -1423,8 +1100,6 @@ Path Console.log "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(unit => unit, int) => intervalId", "documentation": { "kind": "markdown", @@ -1435,8 +1110,6 @@ Path Console.log "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(unit => unit, int) => timeoutId", "documentation": { "kind": "markdown", @@ -1465,8 +1138,6 @@ Path CompletionExpressions.someOpt Path someOpt [ { - "data": null, - "deprecated": false, "detail": "bool", "documentation": { "kind": "markdown", @@ -1489,10 +1160,7 @@ ContextPath Value[takesCb] Path takesCb [ { - "data": null, - "deprecated": false, "detail": "someTyp => 'a", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "${1:someTyp} => ${0:someTyp}", "insertTextFormat": 2, "kind": 12, @@ -1513,10 +1181,7 @@ ContextPath Value[takesCb2] Path takesCb2 [ { - "data": null, - "deprecated": false, "detail": "Environment.t => 'a", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "${1:environment} => ${0:environment}", "insertTextFormat": 2, "kind": 12, @@ -1537,10 +1202,7 @@ ContextPath Value[takesCb3] Path takesCb3 [ { - "data": null, - "deprecated": false, "detail": "apiCallResult => 'a", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "${1:apiCallResult} => ${0:apiCallResult}", "insertTextFormat": 2, "kind": 12, @@ -1561,10 +1223,7 @@ ContextPath Value[takesCb4] Path takesCb4 [ { - "data": null, - "deprecated": false, "detail": "option => 'a", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "${1:apiCallResult} => ${0:apiCallResult}", "insertTextFormat": 2, "kind": 12, @@ -1585,10 +1244,7 @@ ContextPath Value[takesCb5] Path takesCb5 [ { - "data": null, - "deprecated": false, "detail": "array> => 'a", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "${1:apiCallResults} => ${0:apiCallResults}", "insertTextFormat": 2, "kind": 12, @@ -1609,10 +1265,7 @@ ContextPath Value[commitLocalUpdate] Path commitLocalUpdate [ { - "data": null, - "deprecated": false, "detail": "RecordSourceSelectorProxy.t => unit", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "${1:recordSourceSelectorProxy} => ${0:recordSourceSelectorProxy}", "insertTextFormat": 2, "kind": 12, @@ -1633,10 +1286,7 @@ ContextPath Value[fnTakingAsyncCallback] Path fnTakingAsyncCallback [ { - "data": null, - "deprecated": false, "detail": "unit => promise", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "async () => ${0:()}", "insertTextFormat": 2, "kind": 12, @@ -1656,10 +1306,7 @@ ContextPath Value[Belt, Array, map] Path Belt.Array.map [ { - "data": null, - "deprecated": false, "detail": "'a => 'b", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "${1:v} => ${0:v}", "insertTextFormat": 2, "kind": 12, @@ -1680,8 +1327,6 @@ ContextPath Value[takesExotic] Path takesExotic [ { - "data": null, - "deprecated": false, "detail": "#\"some exotic\"", "documentation": { "kind": "markdown", @@ -1706,8 +1351,6 @@ ContextPath Value[fnTakingPolyVariant] Path fnTakingPolyVariant [ { - "data": null, - "deprecated": false, "detail": "#one", "documentation": { "kind": "markdown", @@ -1720,8 +1363,6 @@ Path fnTakingPolyVariant "tags": [] }, { - "data": null, - "deprecated": false, "detail": "#three(someRecord, bool)", "documentation": { "kind": "markdown", @@ -1734,8 +1375,6 @@ Path fnTakingPolyVariant "tags": [] }, { - "data": null, - "deprecated": false, "detail": "#two(bool)", "documentation": { "kind": "markdown", @@ -1760,8 +1399,6 @@ ContextPath Value[fnTakingPolyVariant] Path fnTakingPolyVariant [ { - "data": null, - "deprecated": false, "detail": "#one", "documentation": { "kind": "markdown", @@ -1774,8 +1411,6 @@ Path fnTakingPolyVariant "tags": [] }, { - "data": null, - "deprecated": false, "detail": "#three(someRecord, bool)", "documentation": { "kind": "markdown", @@ -1788,8 +1423,6 @@ Path fnTakingPolyVariant "tags": [] }, { - "data": null, - "deprecated": false, "detail": "#two(bool)", "documentation": { "kind": "markdown", @@ -1814,8 +1447,6 @@ ContextPath Value[fnTakingPolyVariant] Path fnTakingPolyVariant [ { - "data": null, - "deprecated": false, "detail": "#one", "documentation": { "kind": "markdown", @@ -1840,8 +1471,6 @@ ContextPath Value[fnTakingPolyVariant] Path fnTakingPolyVariant [ { - "data": null, - "deprecated": false, "detail": "#one", "documentation": { "kind": "markdown", @@ -1864,10 +1493,7 @@ ContextPath Type[withIntLocal] Path withIntLocal [ { - "data": null, - "deprecated": false, "detail": "int => t", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "SuperInt.make($0)", "insertTextFormat": 2, "kind": 12, @@ -1887,10 +1513,7 @@ ContextPath Value[CompletionSupport, makeTestHidden] Path CompletionSupport.makeTestHidden [ { - "data": null, - "deprecated": false, "detail": "int => t", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "CompletionSupport.TestHidden.make($0)", "insertTextFormat": 2, "kind": 12, @@ -1911,10 +1534,7 @@ ContextPath Value[CompletionSupport, makeTestHidden] Path CompletionSupport.makeTestHidden [ { - "data": null, - "deprecated": false, "detail": "int => t", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "TestHidden.make($0)", "insertTextFormat": 2, "kind": 12, @@ -1935,10 +1555,7 @@ ContextPath Value[mkStuff] Path mkStuff [ { - "data": null, - "deprecated": false, "detail": "Regular expression", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "/$0/g", "insertTextFormat": 2, "kind": 4, @@ -1946,10 +1563,7 @@ Path mkStuff "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(string, ~flags: string=?) => t", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "RegExp.fromString($0)", "insertTextFormat": 2, "kind": 12, @@ -1957,10 +1571,7 @@ Path mkStuff "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(string, ~flags: string) => t", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "RegExp.fromStringWithFlags($0)", "insertTextFormat": 2, "kind": 12, @@ -1981,10 +1592,7 @@ ContextPath Value[tArgCompletionTestFn] Path tArgCompletionTestFn [ { - "data": null, - "deprecated": false, "detail": "int => t", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "Money.fromInt($0)", "insertTextFormat": 2, "kind": 12, @@ -1992,10 +1600,7 @@ Path tArgCompletionTestFn "tags": [] }, { - "data": null, - "deprecated": false, "detail": "unit => t", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "Money.make($0)", "insertTextFormat": 2, "kind": 12, @@ -2003,10 +1608,7 @@ Path tArgCompletionTestFn "tags": [] }, { - "data": null, - "deprecated": false, "detail": "t", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "Money.zero", "insertTextFormat": 2, "kind": 12, @@ -2027,10 +1629,7 @@ ContextPath Value[labeledTArgCompletionTestFn] Path labeledTArgCompletionTestFn [ { - "data": null, - "deprecated": false, "detail": "int => t", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "Money.fromInt($0)", "insertTextFormat": 2, "kind": 12, @@ -2038,10 +1637,7 @@ Path labeledTArgCompletionTestFn "tags": [] }, { - "data": null, - "deprecated": false, "detail": "unit => t", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "Money.make($0)", "insertTextFormat": 2, "kind": 12, @@ -2049,10 +1645,7 @@ Path labeledTArgCompletionTestFn "tags": [] }, { - "data": null, - "deprecated": false, "detail": "t", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "Money.zero", "insertTextFormat": 2, "kind": 12, @@ -2080,8 +1673,6 @@ Path CompletionExpressions. Path [ { - "data": null, - "deprecated": false, "detail": "bool", "documentation": { "kind": "markdown", @@ -2105,8 +1696,6 @@ ContextPath Value[hook] Path hook [ { - "data": null, - "deprecated": false, "detail": "[#\"and\" | #or]", "documentation": { "kind": "markdown", @@ -2130,8 +1719,6 @@ ContextPath Value[hook] Path hook [ { - "data": null, - "deprecated": false, "detail": "[#\"and\" | #or]", "documentation": { "kind": "markdown", @@ -2162,8 +1749,6 @@ Path CompletionExpressions. Path [ { - "data": null, - "deprecated": false, "detail": "bool", "documentation": { "kind": "markdown", diff --git a/tests/analysis_tests/tests/src/expected/CompletionFromModule.res.txt b/tests/analysis_tests/tests/src/expected/CompletionFromModule.res.txt index f29bacb9d3e..738afd8d01f 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionFromModule.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionFromModule.res.txt @@ -15,8 +15,6 @@ Path SomeModule. Path [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -36,10 +34,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeModule.getName", "kind": 12, "label": "->SomeModule.getName", @@ -66,8 +61,6 @@ Path CompletionFromModule.SomeOtherModule. Path [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -87,10 +80,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeOtherModule.getNName", "kind": 12, "label": "->SomeOtherModule.getNName", @@ -107,10 +97,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeOtherModule.getNName2", "kind": 12, "label": "->SomeOtherModule.getNName2", @@ -127,10 +114,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeOtherModule.getNName", "kind": 12, "label": "->SomeOtherModule.getNName", @@ -147,10 +131,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeOtherModule.getNName2", "kind": 12, "label": "->SomeOtherModule.getNName2", @@ -168,10 +149,7 @@ ContextPath Module[SomeOthe] Path SomeOthe [ { - "data": null, - "deprecated": false, "detail": "module SomeOtherModule", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "SomeOtherModule", "tags": [] @@ -192,19 +170,13 @@ Path CompletionFromModule.SomeOtherModule. Path [ { - "data": null, - "deprecated": false, "detail": "t => string", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "SomeOtherModule.getNName", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "SomeOtherModule.getNName2", "tags": [] @@ -225,20 +197,9 @@ Path CompletionFromModule. Path CompletionFromModule.SomeOtherModule. Path [ + { "detail": "t => string", "kind": 12, "label": "getNName", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "t => string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "getNName", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "getNName2", "tags": [] diff --git a/tests/analysis_tests/tests/src/expected/CompletionFromModule2.res.txt b/tests/analysis_tests/tests/src/expected/CompletionFromModule2.res.txt index 4b2dc43a310..790684f6236 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionFromModule2.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionFromModule2.res.txt @@ -15,8 +15,6 @@ Path CompletionFromModule.SomeModule. Path [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -36,10 +34,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->CompletionFromModule.SomeModule.getName", "kind": 12, "label": "->CompletionFromModule.SomeModule.getName", @@ -66,8 +61,6 @@ Path CompletionFromModule.SomeOtherModule. Path [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -87,10 +80,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->CompletionFromModule.SomeOtherModule.getNName", "kind": 12, "label": "->CompletionFromModule.SomeOtherModule.getNName", @@ -107,10 +97,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->CompletionFromModule.SomeOtherModule.getNName2", "kind": 12, "label": "->CompletionFromModule.SomeOtherModule.getNName2", @@ -127,10 +114,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->CompletionFromModule.SomeOtherModule.getNName", "kind": 12, "label": "->CompletionFromModule.SomeOtherModule.getNName", @@ -147,10 +131,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->CompletionFromModule.SomeOtherModule.getNName2", "kind": 12, "label": "->CompletionFromModule.SomeOtherModule.getNName2", @@ -173,19 +154,13 @@ Path CompletionFromModule.SomeOtherModule. Path [ { - "data": null, - "deprecated": false, "detail": "t => string", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "CompletionFromModule.SomeOtherModule.getNName", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "CompletionFromModule.SomeOtherModule.getNName2", "tags": [] @@ -206,20 +181,9 @@ Path CompletionFromModule. Path CompletionFromModule.SomeOtherModule. Path [ + { "detail": "t => string", "kind": 12, "label": "getNName", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "t => string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "getNName", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "getNName2", "tags": [] diff --git a/tests/analysis_tests/tests/src/expected/CompletionFunctionArguments.res.txt b/tests/analysis_tests/tests/src/expected/CompletionFunctionArguments.res.txt index 58125946098..e5a13c3b6dc 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionFunctionArguments.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionFunctionArguments.res.txt @@ -8,24 +8,8 @@ ContextPath CArgument Value[someFn](~isOn) ContextPath Value[someFn] Path someFn [ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "true", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] Complete src/CompletionFunctionArguments.res 13:25 @@ -39,27 +23,14 @@ ContextPath Value[someFn] Path someFn [ { - "data": null, - "deprecated": false, "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, "kind": 4, "label": "true", "sortText": "A true", "tags": [] }, + { "detail": "bool", "kind": 12, "label": "tLocalVar", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "tLocalVar", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "'a => Type.t", "documentation": { "kind": "markdown", @@ -81,24 +52,8 @@ ContextPath CArgument Value[someFn](~isOff) ContextPath Value[someFn] Path someFn [ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "true", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] Complete src/CompletionFunctionArguments.res 21:27 @@ -115,24 +70,8 @@ ContextPath CArgument Value[someFn](~isOn) ContextPath Value[someFn] Path someFn [ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "true", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] Complete src/CompletionFunctionArguments.res 34:24 @@ -144,17 +83,7 @@ Resolved opens 1 Stdlib ContextPath CArgument Value[someOtherFn]($0) ContextPath Value[someOtherFn] Path someOtherFn -[ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } -] +[ { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] Complete src/CompletionFunctionArguments.res 51:39 posCursor:[51:39] posNoWhite:[51:38] Found expr:[51:11->51:40] @@ -167,8 +96,6 @@ ContextPath Value[someFnTakingVariant] Path someFnTakingVariant [ { - "data": null, - "deprecated": false, "detail": "One", "documentation": { "kind": "markdown", @@ -181,8 +108,6 @@ Path someFnTakingVariant "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Two", "documentation": { "kind": "markdown", @@ -195,8 +120,6 @@ Path someFnTakingVariant "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Three(int, string)", "documentation": { "kind": "markdown", @@ -221,8 +144,6 @@ ContextPath Value[someFnTakingVariant] Path someFnTakingVariant [ { - "data": null, - "deprecated": false, "detail": "One", "documentation": { "kind": "markdown", @@ -236,49 +157,20 @@ Path someFnTakingVariant "tags": [] }, { - "data": null, - "deprecated": false, "detail": "module OIncludeMeInCompletions", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "OIncludeMeInCompletions", "tags": [] }, - { - "data": null, - "deprecated": false, - "detail": "module Option", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 9, - "label": "Option", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "module Ordering", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 9, - "label": "Ordering", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "module Object", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 9, - "label": "Object", - "tags": [] - }, + { "detail": "module Option", "kind": 9, "label": "Option", "tags": [] }, + { "detail": "module Ordering", "kind": 9, "label": "Ordering", "tags": [] }, + { "detail": "module Object", "kind": 9, "label": "Object", "tags": [] }, { "data": { "modulePath": "Obj", "filePath": "src/CompletionFunctionArguments.res" }, - "deprecated": false, "detail": "module Obj", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "Obj", "tags": [] @@ -288,9 +180,7 @@ Path someFnTakingVariant "modulePath": "Objects", "filePath": "src/CompletionFunctionArguments.res" }, - "deprecated": false, "detail": "module Objects", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "Objects", "tags": [] @@ -308,8 +198,6 @@ ContextPath Value[someFnTakingVariant] Path someFnTakingVariant [ { - "data": null, - "deprecated": false, "detail": "someVariant", "documentation": { "kind": "markdown", @@ -334,8 +222,6 @@ ContextPath Value[someFnTakingVariant] Path someFnTakingVariant [ { - "data": null, - "deprecated": false, "detail": "One", "documentation": { "kind": "markdown", @@ -349,49 +235,20 @@ Path someFnTakingVariant "tags": [] }, { - "data": null, - "deprecated": false, "detail": "module OIncludeMeInCompletions", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "OIncludeMeInCompletions", "tags": [] }, - { - "data": null, - "deprecated": false, - "detail": "module Option", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 9, - "label": "Option", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "module Ordering", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 9, - "label": "Ordering", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "module Object", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 9, - "label": "Object", - "tags": [] - }, + { "detail": "module Option", "kind": 9, "label": "Option", "tags": [] }, + { "detail": "module Ordering", "kind": 9, "label": "Ordering", "tags": [] }, + { "detail": "module Object", "kind": 9, "label": "Object", "tags": [] }, { "data": { "modulePath": "Obj", "filePath": "src/CompletionFunctionArguments.res" }, - "deprecated": false, "detail": "module Obj", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "Obj", "tags": [] @@ -401,9 +258,7 @@ Path someFnTakingVariant "modulePath": "Objects", "filePath": "src/CompletionFunctionArguments.res" }, - "deprecated": false, "detail": "module Objects", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "Objects", "tags": [] @@ -420,24 +275,8 @@ ContextPath CArgument Value[someOtherFn]($0) ContextPath Value[someOtherFn] Path someOtherFn [ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "true", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] Complete src/CompletionFunctionArguments.res 66:28 @@ -450,24 +289,8 @@ ContextPath CArgument Value[someOtherFn]($2) ContextPath Value[someOtherFn] Path someOtherFn [ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "true", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] Complete src/CompletionFunctionArguments.res 69:30 @@ -480,27 +303,14 @@ ContextPath Value[someOtherFn] Path someOtherFn [ { - "data": null, - "deprecated": false, "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, "kind": 4, "label": "true", "sortText": "A true", "tags": [] }, + { "detail": "bool", "kind": 12, "label": "tLocalVar", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "tLocalVar", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "'a => Type.t", "documentation": { "kind": "markdown", @@ -523,10 +333,7 @@ ContextPath Value[fnTakingTuple] Path fnTakingTuple [ { - "data": null, - "deprecated": false, "detail": "(int, int, float)", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "(${1:_}, ${2:_}, ${3:_})", "insertTextFormat": 2, "kind": 12, @@ -546,8 +353,6 @@ ContextPath Value[fnTakingRecord] Path fnTakingRecord [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -558,8 +363,6 @@ Path fnTakingRecord "tags": [] }, { - "data": null, - "deprecated": false, "detail": "bool", "documentation": { "kind": "markdown", @@ -570,8 +373,6 @@ Path fnTakingRecord "tags": [] }, { - "data": null, - "deprecated": false, "detail": "option", "documentation": { "kind": "markdown", @@ -601,10 +402,7 @@ Path JsxEvent.Mouse.a Path a [ { - "data": null, - "deprecated": false, "detail": "t => bool", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "JsxEvent.Mouse.altKey", "tags": [] @@ -629,10 +427,7 @@ Path JsxEvent.Mouse.a Path a [ { - "data": null, - "deprecated": false, "detail": "t => bool", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "JsxEvent.Mouse.altKey", "tags": [] @@ -655,10 +450,7 @@ Path FineModule. Path [ { - "data": null, - "deprecated": false, "detail": "t => t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "FineModule.setToFalse", "tags": [] diff --git a/tests/analysis_tests/tests/src/expected/CompletionInferValues.res.txt b/tests/analysis_tests/tests/src/expected/CompletionInferValues.res.txt index 85e79452be0..881ae2ea386 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionInferValues.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionInferValues.res.txt @@ -13,7 +13,6 @@ Path Stdlib.Int.t Path t [ { - "data": null, "deprecated": true, "detail": "(int, ~radix: int) => string", "documentation": { @@ -25,7 +24,6 @@ Path t "tags": [ 1 ] }, { - "data": null, "deprecated": true, "detail": "(int, ~digits: int) => string", "documentation": { @@ -37,7 +35,6 @@ Path t "tags": [ 1 ] }, { - "data": null, "deprecated": true, "detail": "(int, ~digits: int) => string", "documentation": { @@ -49,7 +46,6 @@ Path t "tags": [ 1 ] }, { - "data": null, "deprecated": true, "detail": "(int, ~digits: int) => string", "documentation": { @@ -61,8 +57,6 @@ Path t "tags": [ 1 ] }, { - "data": null, - "deprecated": false, "detail": "(int, ~digits: int=?) => string", "documentation": { "kind": "markdown", @@ -73,8 +67,6 @@ Path t "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, ~radix: int=?) => string", "documentation": { "kind": "markdown", @@ -85,8 +77,6 @@ Path t "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int => float", "documentation": { "kind": "markdown", @@ -97,8 +87,6 @@ Path t "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int => string", "documentation": { "kind": "markdown", @@ -109,8 +97,6 @@ Path t "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, ~digits: int=?) => string", "documentation": { "kind": "markdown", @@ -121,8 +107,6 @@ Path t "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, ~digits: int=?) => string", "documentation": { "kind": "markdown", @@ -157,8 +141,6 @@ Path CompletionInferValues. Path [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -169,8 +151,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -209,8 +189,6 @@ Path CompletionInferValues. Path [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -221,8 +199,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -264,8 +240,6 @@ Path CompletionInferValues. Path [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -276,8 +250,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -323,8 +295,6 @@ Path CompletionInferValues. Path [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -335,8 +305,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -368,10 +336,7 @@ Path ReactEvent.Mouse.pr Path pr [ { - "data": null, - "deprecated": false, "detail": "t => unit", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "ReactEvent.Mouse.preventDefault", "tags": [] @@ -398,10 +363,7 @@ Path JsxEvent.Mouse.pr Path pr [ { - "data": null, - "deprecated": false, "detail": "t => unit", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "JsxEvent.Mouse.preventDefault", "tags": [] @@ -427,10 +389,7 @@ Path JsxEvent.Mouse.pr Path pr [ { - "data": null, - "deprecated": false, "detail": "t => unit", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "JsxEvent.Mouse.preventDefault", "tags": [] @@ -456,7 +415,6 @@ Path Stdlib.Int.t Path t [ { - "data": null, "deprecated": true, "detail": "(int, ~radix: int) => string", "documentation": { @@ -468,7 +426,6 @@ Path t "tags": [ 1 ] }, { - "data": null, "deprecated": true, "detail": "(int, ~digits: int) => string", "documentation": { @@ -480,7 +437,6 @@ Path t "tags": [ 1 ] }, { - "data": null, "deprecated": true, "detail": "(int, ~digits: int) => string", "documentation": { @@ -492,7 +448,6 @@ Path t "tags": [ 1 ] }, { - "data": null, "deprecated": true, "detail": "(int, ~digits: int) => string", "documentation": { @@ -504,8 +459,6 @@ Path t "tags": [ 1 ] }, { - "data": null, - "deprecated": false, "detail": "(int, ~digits: int=?) => string", "documentation": { "kind": "markdown", @@ -516,8 +469,6 @@ Path t "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, ~radix: int=?) => string", "documentation": { "kind": "markdown", @@ -528,8 +479,6 @@ Path t "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int => float", "documentation": { "kind": "markdown", @@ -540,8 +489,6 @@ Path t "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int => string", "documentation": { "kind": "markdown", @@ -552,8 +499,6 @@ Path t "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, ~digits: int=?) => string", "documentation": { "kind": "markdown", @@ -564,8 +509,6 @@ Path t "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, ~digits: int=?) => string", "documentation": { "kind": "markdown", @@ -614,8 +557,6 @@ Path ArrayUtils.ma Path ma [ { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a => 'b) => array<'b>", "documentation": { "kind": "markdown", @@ -626,8 +567,6 @@ Path ma "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, ('a, int) => 'b) => array<'b>", "documentation": { "kind": "markdown", @@ -666,8 +605,6 @@ Path CompletionInferValues. Path [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -678,8 +615,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -718,8 +653,6 @@ Path CompletionInferValues. Path [ { - "data": null, - "deprecated": false, "detail": "someRecord", "documentation": { "kind": "markdown", @@ -758,8 +691,6 @@ Path CompletionInferValues. Path [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -770,8 +701,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -800,8 +729,6 @@ Path Stdlib.String.slic Path slic [ { - "data": null, - "deprecated": false, "detail": "(string, ~start: int, ~end: int=?) => string", "documentation": { "kind": "markdown", @@ -812,7 +739,6 @@ Path slic "tags": [] }, { - "data": null, "deprecated": true, "detail": "(string, ~start: int) => string", "documentation": { @@ -842,7 +768,6 @@ Path Stdlib.Int.toS Path toS [ { - "data": null, "deprecated": true, "detail": "(int, ~radix: int) => string", "documentation": { @@ -854,8 +779,6 @@ Path toS "tags": [ 1 ] }, { - "data": null, - "deprecated": false, "detail": "(int, ~radix: int=?) => string", "documentation": { "kind": "markdown", @@ -887,7 +810,6 @@ Path Stdlib.Int.toS Path toS [ { - "data": null, "deprecated": true, "detail": "(int, ~radix: int) => string", "documentation": { @@ -899,8 +821,6 @@ Path toS "tags": [ 1 ] }, { - "data": null, - "deprecated": false, "detail": "(int, ~radix: int=?) => string", "documentation": { "kind": "markdown", @@ -933,7 +853,6 @@ Path Stdlib.Int.toS Path toS [ { - "data": null, "deprecated": true, "detail": "(int, ~radix: int) => string", "documentation": { @@ -945,8 +864,6 @@ Path toS "tags": [ 1 ] }, { - "data": null, - "deprecated": false, "detail": "(int, ~radix: int=?) => string", "documentation": { "kind": "markdown", @@ -975,8 +892,6 @@ Path Stdlib.String.slic Path slic [ { - "data": null, - "deprecated": false, "detail": "(string, ~start: int, ~end: int=?) => string", "documentation": { "kind": "markdown", @@ -987,7 +902,6 @@ Path slic "tags": [] }, { - "data": null, "deprecated": true, "detail": "(string, ~start: int) => string", "documentation": { @@ -1017,8 +931,6 @@ Path Stdlib.String.slic Path slic [ { - "data": null, - "deprecated": false, "detail": "(string, ~start: int, ~end: int=?) => string", "documentation": { "kind": "markdown", @@ -1029,7 +941,6 @@ Path slic "tags": [] }, { - "data": null, "deprecated": true, "detail": "(string, ~start: int) => string", "documentation": { @@ -1059,8 +970,6 @@ Path Stdlib.String.slic Path slic [ { - "data": null, - "deprecated": false, "detail": "(string, ~start: int, ~end: int=?) => string", "documentation": { "kind": "markdown", @@ -1071,7 +980,6 @@ Path slic "tags": [] }, { - "data": null, "deprecated": true, "detail": "(string, ~start: int) => string", "documentation": { @@ -1099,7 +1007,6 @@ Path Stdlib.Int.toSt Path toSt [ { - "data": null, "deprecated": true, "detail": "(int, ~radix: int) => string", "documentation": { @@ -1111,8 +1018,6 @@ Path toSt "tags": [ 1 ] }, { - "data": null, - "deprecated": false, "detail": "(int, ~radix: int=?) => string", "documentation": { "kind": "markdown", @@ -1139,8 +1044,6 @@ ContextPath Value[fnWithRecordCallback] Path fnWithRecordCallback [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -1151,8 +1054,6 @@ Path fnWithRecordCallback "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -1186,19 +1087,13 @@ Path ReactDOM.Client.Root. Path [ { - "data": null, - "deprecated": false, "detail": "(t, unit) => unit", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "ReactDOM.Client.Root.unmount", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(t, React.element) => unit", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "ReactDOM.Client.Root.render", "tags": [] @@ -1227,19 +1122,13 @@ Path CompletionSupport.Test. Path [ { - "data": null, - "deprecated": false, "detail": "t => int", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "CompletionSupport.Test.add", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "t => t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "CompletionSupport.Test.addSelf", "tags": [] @@ -1256,10 +1145,7 @@ ContextPath Value[Belt, Int, toString] Path Belt.Int.toString [ { - "data": null, - "deprecated": false, "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "\"$0\"", "insertTextFormat": 2, "kind": 12, @@ -1279,10 +1165,7 @@ ContextPath Value[String, split] Path String.split [ { - "data": null, - "deprecated": false, "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "[$0]", "insertTextFormat": 2, "kind": 12, @@ -1322,8 +1205,6 @@ Path CompletionSupport.Nested. Path [ { - "data": null, - "deprecated": false, "detail": "ReactDOM.Client.Root.t", "documentation": { "kind": "markdown", @@ -1357,19 +1238,13 @@ Path ReactDOM.Client.Root. Path [ { - "data": null, - "deprecated": false, "detail": "(t, unit) => unit", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "ReactDOM.Client.Root.unmount", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(t, React.element) => unit", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "ReactDOM.Client.Root.render", "tags": [] diff --git a/tests/analysis_tests/tests/src/expected/CompletionJsx.res.txt b/tests/analysis_tests/tests/src/expected/CompletionJsx.res.txt index fcc945400ab..4a660c15557 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionJsx.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionJsx.res.txt @@ -10,8 +10,6 @@ Path Stdlib.String.st Path st [ { - "data": null, - "deprecated": false, "detail": "(string, string) => bool", "documentation": { "kind": "markdown", @@ -22,8 +20,6 @@ Path st "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(string, string, int) => bool", "documentation": { "kind": "markdown", @@ -53,8 +49,6 @@ Path Stdlib.String.st Path st [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -67,8 +61,6 @@ Path st "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(string, string) => bool", "documentation": { "kind": "markdown", @@ -79,8 +71,6 @@ Path st "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(string, string, int) => bool", "documentation": { "kind": "markdown", @@ -111,8 +101,6 @@ Path Stdlib.String.st Path st [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -125,8 +113,6 @@ Path st "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(string, string) => bool", "documentation": { "kind": "markdown", @@ -137,8 +123,6 @@ Path st "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(string, string, int) => bool", "documentation": { "kind": "markdown", @@ -168,8 +152,6 @@ Path Stdlib.String.st Path st [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -182,8 +164,6 @@ Path st "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(string, string) => bool", "documentation": { "kind": "markdown", @@ -194,8 +174,6 @@ Path st "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(string, string, int) => bool", "documentation": { "kind": "markdown", @@ -227,8 +205,6 @@ Path Stdlib.String.st Path st [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -241,8 +217,6 @@ Path st "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(string, string) => bool", "documentation": { "kind": "markdown", @@ -253,8 +227,6 @@ Path st "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(string, string, int) => bool", "documentation": { "kind": "markdown", @@ -285,8 +257,6 @@ Path Stdlib.Int. Path [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -299,16 +269,12 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, int) => bool", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "Int.equal", "tags": [] }, { - "data": null, "deprecated": true, "detail": "(int, ~radix: int) => string", "documentation": { @@ -320,7 +286,6 @@ Path "tags": [ 1 ] }, { - "data": null, "deprecated": true, "detail": "(int, ~digits: int) => string", "documentation": { @@ -332,8 +297,6 @@ Path "tags": [ 1 ] }, { - "data": null, - "deprecated": false, "detail": "(int, int) => int", "documentation": { "kind": "markdown", @@ -344,8 +307,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(~min: int=?, ~max: int=?, int) => int", "documentation": { "kind": "markdown", @@ -356,7 +317,6 @@ Path "tags": [] }, { - "data": null, "deprecated": true, "detail": "(int, ~digits: int) => string", "documentation": { @@ -368,7 +328,6 @@ Path "tags": [ 1 ] }, { - "data": null, "deprecated": true, "detail": "(int, ~digits: int) => string", "documentation": { @@ -380,8 +339,6 @@ Path "tags": [ 1 ] }, { - "data": null, - "deprecated": false, "detail": "(int, int) => int", "documentation": { "kind": "markdown", @@ -392,8 +349,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, int) => int", "documentation": { "kind": "markdown", @@ -404,17 +359,12 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, int) => Ordering.t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "Int.compare", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int => unit", "documentation": { "kind": "markdown", @@ -425,8 +375,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, int) => int", "documentation": { "kind": "markdown", @@ -437,8 +385,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, ~digits: int=?) => string", "documentation": { "kind": "markdown", @@ -449,8 +395,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, int, ~options: rangeOptions=?) => array", "documentation": { "kind": "markdown", @@ -461,8 +405,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, ~radix: int=?) => string", "documentation": { "kind": "markdown", @@ -473,8 +415,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, int) => int", "documentation": { "kind": "markdown", @@ -485,8 +425,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int => float", "documentation": { "kind": "markdown", @@ -497,8 +435,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, int) => int", "documentation": { "kind": "markdown", @@ -509,7 +445,6 @@ Path "tags": [] }, { - "data": null, "deprecated": true, "detail": "(int, int, rangeOptions) => array", "documentation": { @@ -521,8 +456,6 @@ Path "tags": [ 1 ] }, { - "data": null, - "deprecated": false, "detail": "(int, int) => int", "documentation": { "kind": "markdown", @@ -533,8 +466,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int => string", "documentation": { "kind": "markdown", @@ -545,8 +476,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int => int", "documentation": { "kind": "markdown", @@ -557,8 +486,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, ~digits: int=?) => string", "documentation": { "kind": "markdown", @@ -569,8 +496,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, ~digits: int=?) => string", "documentation": { "kind": "markdown", @@ -600,8 +525,6 @@ Path Stdlib.Int. Path [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -614,16 +537,12 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, int) => bool", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "Int.equal", "tags": [] }, { - "data": null, "deprecated": true, "detail": "(int, ~radix: int) => string", "documentation": { @@ -635,7 +554,6 @@ Path "tags": [ 1 ] }, { - "data": null, "deprecated": true, "detail": "(int, ~digits: int) => string", "documentation": { @@ -647,8 +565,6 @@ Path "tags": [ 1 ] }, { - "data": null, - "deprecated": false, "detail": "(int, int) => int", "documentation": { "kind": "markdown", @@ -659,8 +575,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(~min: int=?, ~max: int=?, int) => int", "documentation": { "kind": "markdown", @@ -671,7 +585,6 @@ Path "tags": [] }, { - "data": null, "deprecated": true, "detail": "(int, ~digits: int) => string", "documentation": { @@ -683,7 +596,6 @@ Path "tags": [ 1 ] }, { - "data": null, "deprecated": true, "detail": "(int, ~digits: int) => string", "documentation": { @@ -695,8 +607,6 @@ Path "tags": [ 1 ] }, { - "data": null, - "deprecated": false, "detail": "(int, int) => int", "documentation": { "kind": "markdown", @@ -707,8 +617,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, int) => int", "documentation": { "kind": "markdown", @@ -719,17 +627,12 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, int) => Ordering.t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "Int.compare", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int => unit", "documentation": { "kind": "markdown", @@ -740,8 +643,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, int) => int", "documentation": { "kind": "markdown", @@ -752,8 +653,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, ~digits: int=?) => string", "documentation": { "kind": "markdown", @@ -764,8 +663,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, int, ~options: rangeOptions=?) => array", "documentation": { "kind": "markdown", @@ -776,8 +673,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, ~radix: int=?) => string", "documentation": { "kind": "markdown", @@ -788,8 +683,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, int) => int", "documentation": { "kind": "markdown", @@ -800,8 +693,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int => float", "documentation": { "kind": "markdown", @@ -812,8 +703,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, int) => int", "documentation": { "kind": "markdown", @@ -824,7 +713,6 @@ Path "tags": [] }, { - "data": null, "deprecated": true, "detail": "(int, int, rangeOptions) => array", "documentation": { @@ -836,8 +724,6 @@ Path "tags": [ 1 ] }, { - "data": null, - "deprecated": false, "detail": "(int, int) => int", "documentation": { "kind": "markdown", @@ -848,8 +734,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int => string", "documentation": { "kind": "markdown", @@ -860,8 +744,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int => int", "documentation": { "kind": "markdown", @@ -872,8 +754,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, ~digits: int=?) => string", "documentation": { "kind": "markdown", @@ -884,8 +764,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, ~digits: int=?) => string", "documentation": { "kind": "markdown", @@ -917,8 +795,6 @@ Path ArrayUtils.a Path a [ { - "data": null, - "deprecated": false, "detail": "array", "documentation": { "kind": "markdown", @@ -931,8 +807,6 @@ Path a "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, int) => option<'a>", "documentation": { "kind": "markdown", @@ -943,8 +817,6 @@ Path a "tags": [] }, { - "data": null, - "deprecated": false, "detail": "array<'a> => Iterable.t<'a>", "documentation": { "kind": "markdown", @@ -971,8 +843,6 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib [ { - "data": null, - "deprecated": false, "detail": "Defines a dialog box or subwindow.", "documentation": { "kind": "markdown", @@ -984,7 +854,6 @@ Resolved opens 1 Stdlib "tags": [] }, { - "data": null, "deprecated": true, "detail": "Defines a directory list. Use
          instead.", "documentation": { @@ -997,8 +866,6 @@ Resolved opens 1 Stdlib "tags": [ 1 ] }, { - "data": null, - "deprecated": false, "detail": "Specifies a division or a section in a document.", "documentation": { "kind": "markdown", @@ -1018,17 +885,7 @@ Completable: Cjsx([CompWithoutJsxPpx], n, [n]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path CompWithoutJsxPpx.make -[ - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "name", - "tags": [] - } -] +[ { "detail": "string", "kind": 4, "label": "name", "tags": [] } ] Complete src/CompletionJsx.res 48:27 posCursor:[48:27] posNoWhite:[48:26] Found expr:[48:3->48:28] @@ -1040,10 +897,7 @@ ContextPath CJsxPropValue [SomeComponent] someProp Path SomeComponent.make [ { - "data": null, - "deprecated": false, "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "{\"$0\"}", "insertTextFormat": 2, "kind": 12, @@ -1061,17 +915,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path ReactDOM.domProps Path JsxDOM.domProps -[ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "hidden", - "tags": [] - } -] +[ { "detail": "bool", "kind": 4, "label": "hidden", "tags": [] } ] Complete src/CompletionJsx.res 61:30 posCursor:[61:30] posNoWhite:[61:28] Found expr:[61:3->61:29] @@ -1081,33 +925,9 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path IntrinsicElementLowercase.make [ - { - "data": null, - "deprecated": false, - "detail": "option", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "name", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "option", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "age", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "key", - "tags": [] - } + { "detail": "option", "kind": 4, "label": "name", "tags": [] }, + { "detail": "option", "kind": 4, "label": "age", "tags": [] }, + { "detail": "string", "kind": 4, "label": "key", "tags": [] } ] Complete src/CompletionJsx.res 73:36 @@ -1120,8 +940,6 @@ ContextPath CJsxPropValue [MultiPropComp] time Path MultiPropComp.make [ { - "data": null, - "deprecated": false, "detail": "Now", "documentation": { "kind": "markdown", @@ -1134,8 +952,6 @@ Path MultiPropComp.make "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Later", "documentation": { "kind": "markdown", @@ -1159,8 +975,6 @@ ContextPath CJsxPropValue [MultiPropComp] time Path MultiPropComp.make [ { - "data": null, - "deprecated": false, "detail": "Now", "documentation": { "kind": "markdown", @@ -1173,8 +987,6 @@ Path MultiPropComp.make "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Later", "documentation": { "kind": "markdown", @@ -1198,8 +1010,6 @@ ContextPath CJsxPropValue [MultiPropComp] time Path MultiPropComp.make [ { - "data": null, - "deprecated": false, "detail": "Now", "documentation": { "kind": "markdown", @@ -1212,8 +1022,6 @@ Path MultiPropComp.make "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Later", "documentation": { "kind": "markdown", @@ -1234,17 +1042,7 @@ Completable: Cjsx([Info], "", [_type]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path Info.make -[ - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "key", - "tags": [] - } -] +[ { "detail": "string", "kind": 4, "label": "key", "tags": [] } ] Complete src/CompletionJsx.res 93:19 posCursor:[93:19] posNoWhite:[93:18] Found expr:[93:11->93:24] @@ -1271,8 +1069,6 @@ Path s } } ], - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -1295,8 +1091,6 @@ Path s } } ], - "data": null, - "deprecated": false, "detail": "(string, RegExp.t) => option", "documentation": { "kind": "markdown", @@ -1318,8 +1112,6 @@ Path s } } ], - "data": null, - "deprecated": false, "detail": "(string, RegExp.t, ~limit: int) => array>", "documentation": { "kind": "markdown", @@ -1341,8 +1133,6 @@ Path s } } ], - "data": null, - "deprecated": false, "detail": "(string, ~start: int, ~end: int=?) => string", "documentation": { "kind": "markdown", @@ -1364,7 +1154,6 @@ Path s } } ], - "data": null, "deprecated": true, "detail": "(string, ~start: int) => string", "documentation": { @@ -1387,8 +1176,6 @@ Path s } } ], - "data": null, - "deprecated": false, "detail": "(string, string) => bool", "documentation": { "kind": "markdown", @@ -1410,8 +1197,6 @@ Path s } } ], - "data": null, - "deprecated": false, "detail": "(string, string, ~limit: int) => array", "documentation": { "kind": "markdown", @@ -1433,7 +1218,6 @@ Path s } } ], - "data": null, "deprecated": true, "detail": "(string, ~start: int) => string", "documentation": { @@ -1456,8 +1240,6 @@ Path s } } ], - "data": null, - "deprecated": false, "detail": "(string, RegExp.t) => array>", "documentation": { "kind": "markdown", @@ -1479,8 +1261,6 @@ Path s } } ], - "data": null, - "deprecated": false, "detail": "(string, string, int) => bool", "documentation": { "kind": "markdown", @@ -1502,8 +1282,6 @@ Path s } } ], - "data": null, - "deprecated": false, "detail": "(string, string) => array", "documentation": { "kind": "markdown", @@ -1525,8 +1303,6 @@ Path s } } ], - "data": null, - "deprecated": false, "detail": "(string, ~start: int, ~end: int=?) => string", "documentation": { "kind": "markdown", @@ -1548,8 +1324,6 @@ Path s } } ], - "data": null, - "deprecated": false, "detail": "(string, RegExp.t) => int", "documentation": { "kind": "markdown", diff --git a/tests/analysis_tests/tests/src/expected/CompletionJsxProps.res.txt b/tests/analysis_tests/tests/src/expected/CompletionJsxProps.res.txt index ec691a188c0..7d6405d1408 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionJsxProps.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionJsxProps.res.txt @@ -7,24 +7,8 @@ Resolved opens 1 Stdlib ContextPath CJsxPropValue [CompletionSupport, TestComponent] on Path CompletionSupport.TestComponent.make [ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "true", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] Complete src/CompletionJsxProps.res 3:48 @@ -37,18 +21,13 @@ ContextPath CJsxPropValue [CompletionSupport, TestComponent] on Path CompletionSupport.TestComponent.make [ { - "data": null, - "deprecated": false, "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, "kind": 4, "label": "true", "sortText": "A true", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "'a => Type.t", "documentation": { "kind": "markdown", @@ -70,8 +49,6 @@ ContextPath CJsxPropValue [CompletionSupport, TestComponent] test Path CompletionSupport.TestComponent.make [ { - "data": null, - "deprecated": false, "detail": "Two", "documentation": { "kind": "markdown", @@ -85,8 +62,6 @@ Path CompletionSupport.TestComponent.make "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Three(int)", "documentation": { "kind": "markdown", @@ -100,40 +75,24 @@ Path CompletionSupport.TestComponent.make "tags": [] }, { - "data": null, - "deprecated": false, "detail": "module TypedArray", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "TypedArray", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "module TimeoutId", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "TimeoutId", "tags": [] }, - { - "data": null, - "deprecated": false, - "detail": "module Type", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 9, - "label": "Type", - "tags": [] - }, + { "detail": "module Type", "kind": 9, "label": "Type", "tags": [] }, { "data": { "modulePath": "TableclothMap", "filePath": "src/CompletionJsxProps.res" }, - "deprecated": false, "detail": "module TableclothMap", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "TableclothMap", "tags": [] @@ -143,9 +102,7 @@ Path CompletionSupport.TestComponent.make "modulePath": "TypeArgCtx", "filePath": "src/CompletionJsxProps.res" }, - "deprecated": false, "detail": "module TypeArgCtx", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "TypeArgCtx", "tags": [] @@ -155,9 +112,7 @@ Path CompletionSupport.TestComponent.make "modulePath": "TypeAtPosCompletion", "filePath": "src/CompletionJsxProps.res" }, - "deprecated": false, "detail": "module TypeAtPosCompletion", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "TypeAtPosCompletion", "tags": [] @@ -167,9 +122,7 @@ Path CompletionSupport.TestComponent.make "modulePath": "TypeConstraint", "filePath": "src/CompletionJsxProps.res" }, - "deprecated": false, "detail": "module TypeConstraint", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "TypeConstraint", "tags": [] @@ -179,9 +132,7 @@ Path CompletionSupport.TestComponent.make "modulePath": "TypeDefinition", "filePath": "src/CompletionJsxProps.res" }, - "deprecated": false, "detail": "module TypeDefinition", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "TypeDefinition", "tags": [] @@ -198,8 +149,6 @@ ContextPath CJsxPropValue [CompletionSupport, TestComponent] polyArg Path CompletionSupport.TestComponent.make [ { - "data": null, - "deprecated": false, "detail": "#one", "documentation": { "kind": "markdown", @@ -212,8 +161,6 @@ Path CompletionSupport.TestComponent.make "tags": [] }, { - "data": null, - "deprecated": false, "detail": "#three(int, bool)", "documentation": { "kind": "markdown", @@ -226,8 +173,6 @@ Path CompletionSupport.TestComponent.make "tags": [] }, { - "data": null, - "deprecated": false, "detail": "#two", "documentation": { "kind": "markdown", @@ -240,8 +185,6 @@ Path CompletionSupport.TestComponent.make "tags": [] }, { - "data": null, - "deprecated": false, "detail": "#two2", "documentation": { "kind": "markdown", @@ -265,8 +208,6 @@ ContextPath CJsxPropValue [CompletionSupport, TestComponent] polyArg Path CompletionSupport.TestComponent.make [ { - "data": null, - "deprecated": false, "detail": "#three(int, bool)", "documentation": { "kind": "markdown", @@ -279,8 +220,6 @@ Path CompletionSupport.TestComponent.make "tags": [] }, { - "data": null, - "deprecated": false, "detail": "#two", "documentation": { "kind": "markdown", @@ -293,8 +232,6 @@ Path CompletionSupport.TestComponent.make "tags": [] }, { - "data": null, - "deprecated": false, "detail": "#two2", "documentation": { "kind": "markdown", @@ -318,24 +255,8 @@ ContextPath CJsxPropValue [div] muted Path ReactDOM.domProps Path JsxDOM.domProps [ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "true", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] Complete src/CompletionJsxProps.res 18:29 @@ -349,10 +270,7 @@ Path ReactDOM.domProps Path JsxDOM.domProps [ { - "data": null, - "deprecated": false, "detail": "JsxEvent.Mouse.t => unit", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "{${1:event} => ${0:event}}", "insertTextFormat": 2, "kind": 12, @@ -372,8 +290,6 @@ ContextPath CJsxPropValue [CompletionSupport, TestComponent] testArr Path CompletionSupport.TestComponent.make [ { - "data": null, - "deprecated": false, "detail": "testVariant", "documentation": { "kind": "markdown", @@ -398,8 +314,6 @@ ContextPath CJsxPropValue [CompletionSupport, TestComponent] testArr Path CompletionSupport.TestComponent.make [ { - "data": null, - "deprecated": false, "detail": "One", "documentation": { "kind": "markdown", @@ -412,8 +326,6 @@ Path CompletionSupport.TestComponent.make "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Two", "documentation": { "kind": "markdown", @@ -426,8 +338,6 @@ Path CompletionSupport.TestComponent.make "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Three(int)", "documentation": { "kind": "markdown", @@ -451,8 +361,6 @@ ContextPath CJsxPropValue [CompletionSupport, TestComponent] polyArg Path CompletionSupport.TestComponent.make [ { - "data": null, - "deprecated": false, "detail": "#one", "documentation": { "kind": "markdown", @@ -465,8 +373,6 @@ Path CompletionSupport.TestComponent.make "tags": [] }, { - "data": null, - "deprecated": false, "detail": "#three(int, bool)", "documentation": { "kind": "markdown", @@ -479,8 +385,6 @@ Path CompletionSupport.TestComponent.make "tags": [] }, { - "data": null, - "deprecated": false, "detail": "#two", "documentation": { "kind": "markdown", @@ -493,8 +397,6 @@ Path CompletionSupport.TestComponent.make "tags": [] }, { - "data": null, - "deprecated": false, "detail": "#two2", "documentation": { "kind": "markdown", @@ -517,27 +419,9 @@ Resolved opens 1 Stdlib ContextPath CJsxPropValue [CompletionSupport, TestComponent] on Path CompletionSupport.TestComponent.make [ + { "detail": "bool", "kind": 4, "label": "true", "tags": [] }, + { "detail": "[> #two]", "kind": 12, "label": "tsomeVar", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "[> #two]", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "tsomeVar", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "'a => Type.t", "documentation": { "kind": "markdown", @@ -559,8 +443,6 @@ ContextPath CJsxPropValue [CompletableComponentLazy] status Path CompletableComponentLazy.make [ { - "data": null, - "deprecated": false, "detail": "On", "documentation": { "kind": "markdown", @@ -573,8 +455,6 @@ Path CompletableComponentLazy.make "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Off", "documentation": { "kind": "markdown", diff --git a/tests/analysis_tests/tests/src/expected/CompletionMultipleEditorCompleteFrom.res.txt b/tests/analysis_tests/tests/src/expected/CompletionMultipleEditorCompleteFrom.res.txt index 7d928d8e033..f5383e166fb 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionMultipleEditorCompleteFrom.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionMultipleEditorCompleteFrom.res.txt @@ -26,10 +26,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "A.a => int", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->B.b", "kind": 12, "label": "->B.b", @@ -46,10 +43,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "A.a => char", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->C.c", "kind": 12, "label": "->C.c", diff --git a/tests/analysis_tests/tests/src/expected/CompletionNullNullable.res.txt b/tests/analysis_tests/tests/src/expected/CompletionNullNullable.res.txt index e84a9ded5c8..3fdbfa4534f 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionNullNullable.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionNullNullable.res.txt @@ -23,8 +23,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, t<'b>, ('a, 'b) => bool) => bool", "documentation": { "kind": "markdown", @@ -46,8 +44,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => 'a", "documentation": { "kind": "markdown", @@ -69,8 +65,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => 'b) => t<'b>", "documentation": { "kind": "markdown", @@ -92,7 +86,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "t<'a> => 'a", "documentation": { @@ -115,8 +108,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, t<'b>, ('a, 'b) => Ordering.t) => Ordering.t", "documentation": { "kind": "markdown", @@ -138,8 +129,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => unit", "documentation": { "kind": "markdown", @@ -161,8 +150,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => 'a", "documentation": { "kind": "markdown", @@ -184,8 +171,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => option<'a>", "documentation": { "kind": "markdown", @@ -207,8 +192,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => 'a", "documentation": { "kind": "markdown", @@ -230,8 +213,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'b, 'a => 'b) => 'b", "documentation": { "kind": "markdown", @@ -253,7 +234,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, 'b, 'a => 'b) => 'b", "documentation": { @@ -276,7 +256,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, 'a) => 'a", "documentation": { @@ -299,8 +278,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => Nullable.t<'a>", "documentation": { "kind": "markdown", @@ -322,8 +299,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => unit) => unit", "documentation": { "kind": "markdown", @@ -345,8 +320,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => t<'b>) => t<'b>", "documentation": { "kind": "markdown", @@ -385,10 +358,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, t<'b>, ('a, 'b) => bool) => bool", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->Nullable.equal", "kind": 12, "label": "->Nullable.equal", @@ -405,8 +375,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => 'a", "documentation": { "kind": "markdown", @@ -428,8 +396,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => 'b) => t<'b>", "documentation": { "kind": "markdown", @@ -451,7 +417,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "t<'a> => 'a", "documentation": { @@ -474,10 +439,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, t<'b>, ('a, 'b) => Ordering.t) => Ordering.t", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->Nullable.compare", "kind": 12, "label": "->Nullable.compare", @@ -494,8 +456,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => unit", "documentation": { "kind": "markdown", @@ -517,8 +477,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => 'a", "documentation": { "kind": "markdown", @@ -540,8 +498,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => option<'a>", "documentation": { "kind": "markdown", @@ -563,8 +519,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => 'a", "documentation": { "kind": "markdown", @@ -586,8 +540,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'b, 'a => 'b) => 'b", "documentation": { "kind": "markdown", @@ -609,7 +561,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, 'b, 'a => 'b) => 'b", "documentation": { @@ -632,7 +583,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, 'a) => 'a", "documentation": { @@ -655,8 +605,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => bool", "documentation": { "kind": "markdown", @@ -678,8 +626,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => unit) => unit", "documentation": { "kind": "markdown", @@ -701,8 +647,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => t<'b>) => t<'b>", "documentation": { "kind": "markdown", diff --git a/tests/analysis_tests/tests/src/expected/CompletionObjects.res.txt b/tests/analysis_tests/tests/src/expected/CompletionObjects.res.txt index c21eb0ac9c2..8bc83dda759 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionObjects.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionObjects.res.txt @@ -9,43 +9,16 @@ Resolved opens 1 Stdlib ContextPath Value[x] Path x [ + { "detail": "bool", "kind": 12, "label": "None", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "None", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "Some(${1:_})", "insertTextFormat": 2, "kind": 12, "label": "Some(_)", "tags": [] }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "Some(true)", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "Some(false)", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "Some(true)", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "Some(false)", "tags": [] } ] diff --git a/tests/analysis_tests/tests/src/expected/CompletionPattern.res.txt b/tests/analysis_tests/tests/src/expected/CompletionPattern.res.txt index a37aafe05e1..bd60dbe226c 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionPattern.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionPattern.res.txt @@ -11,10 +11,7 @@ ContextPath Value[v] Path v [ { - "data": null, - "deprecated": false, "detail": "(bool, option, (bool, bool))", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "(${1:_}, ${2:_}, ${3:_})", "insertTextFormat": 2, "kind": 12, @@ -31,17 +28,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[v] Path v -[ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - } -] +[ { "detail": "bool", "kind": 4, "label": "true", "tags": [] } ] Complete src/CompletionPattern.res 16:25 posCursor:[16:25] posNoWhite:[16:24] Found pattern:[16:16->16:30] @@ -52,17 +39,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[v] Path v -[ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } -] +[ { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] Complete src/CompletionPattern.res 21:15 XXX Not found! @@ -72,24 +49,8 @@ Resolved opens 1 Stdlib ContextPath Value[x] Path x [ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "true", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] Complete src/CompletionPattern.res 24:17 @@ -99,17 +60,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[x] Path x -[ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - } -] +[ { "detail": "bool", "kind": 4, "label": "true", "tags": [] } ] Complete src/CompletionPattern.res 46:15 XXX Not found! @@ -120,8 +71,6 @@ ContextPath Value[f] Path f [ { - "data": null, - "deprecated": false, "detail": "someRecord", "documentation": { "kind": "markdown", @@ -145,8 +94,6 @@ ContextPath Value[f] Path f [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -157,8 +104,6 @@ Path f "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(bool, option)", "documentation": { "kind": "markdown", @@ -169,8 +114,6 @@ Path f "tags": [] }, { - "data": null, - "deprecated": false, "detail": "option<[#first | #second(someRecord)]>", "documentation": { "kind": "markdown", @@ -181,8 +124,6 @@ Path f "tags": [] }, { - "data": null, - "deprecated": false, "detail": "nestedRecord", "documentation": { "kind": "markdown", @@ -203,8 +144,6 @@ ContextPath Value[f] Path f [ { - "data": null, - "deprecated": false, "detail": "option<[#first | #second(someRecord)]>", "documentation": { "kind": "markdown", @@ -215,8 +154,6 @@ Path f "tags": [] }, { - "data": null, - "deprecated": false, "detail": "nestedRecord", "documentation": { "kind": "markdown", @@ -238,8 +175,6 @@ ContextPath Value[f] Path f [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -262,8 +197,6 @@ ContextPath Value[z] Path z [ { - "data": null, - "deprecated": false, "detail": "option<[#first | #second(someRecord)]>", "documentation": { "kind": "markdown", @@ -284,8 +217,6 @@ ContextPath Value[f] Path f [ { - "data": null, - "deprecated": false, "detail": "nestedRecord", "documentation": { "kind": "markdown", @@ -310,8 +241,6 @@ ContextPath Value[f] Path f [ { - "data": null, - "deprecated": false, "detail": "bool", "documentation": { "kind": "markdown", @@ -334,8 +263,6 @@ ContextPath Value[nest] Path nest [ { - "data": null, - "deprecated": false, "detail": "bool", "documentation": { "kind": "markdown", @@ -356,8 +283,6 @@ ContextPath Value[f] Path f [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -368,8 +293,6 @@ Path f "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(bool, option)", "documentation": { "kind": "markdown", @@ -380,8 +303,6 @@ Path f "tags": [] }, { - "data": null, - "deprecated": false, "detail": "option<[#first | #second(someRecord)]>", "documentation": { "kind": "markdown", @@ -392,8 +313,6 @@ Path f "tags": [] }, { - "data": null, - "deprecated": false, "detail": "nestedRecord", "documentation": { "kind": "markdown", @@ -416,8 +335,6 @@ ContextPath Value[f] Path f [ { - "data": null, - "deprecated": false, "detail": "bool", "documentation": { "kind": "markdown", @@ -440,24 +357,8 @@ Resolved opens 1 Stdlib ContextPath Value[z] Path z [ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "true", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] Complete src/CompletionPattern.res 90:21 @@ -469,17 +370,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[z] Path z -[ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - } -] +[ { "detail": "bool", "kind": 4, "label": "true", "tags": [] } ] Complete src/CompletionPattern.res 93:23 posCursor:[93:23] posNoWhite:[93:22] Found pattern:[93:16->93:25] @@ -492,8 +383,6 @@ ContextPath Value[z] Path z [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -504,8 +393,6 @@ Path z "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(bool, option)", "documentation": { "kind": "markdown", @@ -516,8 +403,6 @@ Path z "tags": [] }, { - "data": null, - "deprecated": false, "detail": "option<[#first | #second(someRecord)]>", "documentation": { "kind": "markdown", @@ -528,8 +413,6 @@ Path z "tags": [] }, { - "data": null, - "deprecated": false, "detail": "nestedRecord", "documentation": { "kind": "markdown", @@ -551,17 +434,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[z] Path z -[ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - } -] +[ { "detail": "bool", "kind": 4, "label": "true", "tags": [] } ] Complete src/CompletionPattern.res 103:21 posCursor:[103:21] posNoWhite:[103:20] Found pattern:[103:16->103:22] @@ -573,24 +446,8 @@ Resolved opens 1 Stdlib ContextPath Value[b] Path b [ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "true", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] Complete src/CompletionPattern.res 106:22 @@ -601,17 +458,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[b] Path b -[ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - } -] +[ { "detail": "bool", "kind": 4, "label": "true", "tags": [] } ] Complete src/CompletionPattern.res 109:24 posCursor:[109:24] posNoWhite:[109:23] Found pattern:[109:16->109:26] @@ -623,8 +470,6 @@ ContextPath Value[b] Path b [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -635,8 +480,6 @@ Path b "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(bool, option)", "documentation": { "kind": "markdown", @@ -647,8 +490,6 @@ Path b "tags": [] }, { - "data": null, - "deprecated": false, "detail": "option<[#first | #second(someRecord)]>", "documentation": { "kind": "markdown", @@ -659,8 +500,6 @@ Path b "tags": [] }, { - "data": null, - "deprecated": false, "detail": "nestedRecord", "documentation": { "kind": "markdown", @@ -681,17 +520,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[b] Path b -[ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - } -] +[ { "detail": "bool", "kind": 4, "label": "true", "tags": [] } ] Complete src/CompletionPattern.res 118:15 XXX Not found! @@ -702,10 +531,7 @@ ContextPath Value[c] Path c [ { - "data": null, - "deprecated": false, "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "[$0]", "insertTextFormat": 2, "kind": 12, @@ -723,24 +549,8 @@ Resolved opens 1 Stdlib ContextPath Value[c] Path c [ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "true", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] Complete src/CompletionPattern.res 127:21 @@ -754,24 +564,8 @@ Resolved opens 1 Stdlib ContextPath Value[o] Path o [ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "true", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] Complete src/CompletionPattern.res 134:23 @@ -783,24 +577,8 @@ Resolved opens 1 Stdlib ContextPath Value[p] Path p [ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "true", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] Complete src/CompletionPattern.res 137:29 @@ -813,44 +591,17 @@ Resolved opens 1 Stdlib ContextPath Value[p] Path p [ + { "detail": "bool", "kind": 12, "label": "None", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "None", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "Some(${1:_})", "insertTextFormat": 2, "kind": 12, "label": "Some(_)", "tags": [] }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "Some(true)", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "Some(false)", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "Some(true)", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "Some(false)", "tags": [] } ] Complete src/CompletionPattern.res 140:23 @@ -863,24 +614,8 @@ Resolved opens 1 Stdlib ContextPath Value[p] Path p [ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "true", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] Complete src/CompletionPattern.res 143:35 @@ -894,10 +629,7 @@ ContextPath Value[p] Path p [ { - "data": null, - "deprecated": false, "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "[$0]", "insertTextFormat": 2, "kind": 12, @@ -915,24 +647,8 @@ Resolved opens 1 Stdlib ContextPath Value[v] Path v [ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "true", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] Complete src/CompletionPattern.res 153:30 @@ -944,44 +660,17 @@ Resolved opens 1 Stdlib ContextPath Value[v] Path v [ + { "detail": "bool", "kind": 12, "label": "None", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "None", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "Some(${1:_})", "insertTextFormat": 2, "kind": 12, "label": "Some(_)", "tags": [] }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "Some(true)", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "Some(false)", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "Some(true)", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "Some(false)", "tags": [] } ] Complete src/CompletionPattern.res 156:24 @@ -993,24 +682,8 @@ Resolved opens 1 Stdlib ContextPath Value[v] Path v [ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "true", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] Complete src/CompletionPattern.res 159:36 @@ -1023,10 +696,7 @@ ContextPath Value[v] Path v [ { - "data": null, - "deprecated": false, "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "[$0]", "insertTextFormat": 2, "kind": 12, @@ -1045,24 +715,8 @@ Resolved opens 1 Stdlib ContextPath Value[s] Path s [ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "true", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] Complete src/CompletionPattern.res 167:23 @@ -1073,44 +727,17 @@ Resolved opens 1 Stdlib ContextPath Value[s] Path s [ + { "detail": "bool", "kind": 12, "label": "None", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "None", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "Some(${1:_})", "insertTextFormat": 2, "kind": 12, "label": "Some(_)", "tags": [] }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "Some(true)", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "Some(false)", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "Some(true)", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "Some(false)", "tags": [] } ] Complete src/CompletionPattern.res 170:22 @@ -1121,44 +748,17 @@ Resolved opens 1 Stdlib ContextPath Value[s] Path s [ + { "detail": "bool", "kind": 12, "label": "None", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "None", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "Some(${1:_})", "insertTextFormat": 2, "kind": 12, "label": "Some(_)", "tags": [] }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "Some(true)", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "Some(false)", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "Some(true)", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "Some(false)", "tags": [] } ] Complete src/CompletionPattern.res 173:35 @@ -1170,10 +770,7 @@ ContextPath Value[s] Path s [ { - "data": null, - "deprecated": false, "detail": "(bool, option, array)", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "(${1:_}, ${2:_}, ${3:_})", "insertTextFormat": 2, "kind": 12, @@ -1190,44 +787,17 @@ Resolved opens 1 Stdlib ContextPath Value[s] Path s [ + { "detail": "bool", "kind": 12, "label": "None", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "None", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "Some(${1:_})", "insertTextFormat": 2, "kind": 12, "label": "Some(_)", "tags": [] }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "Some(true)", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "Some(false)", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "Some(true)", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "Some(false)", "tags": [] } ] Complete src/CompletionPattern.res 179:21 @@ -1239,8 +809,6 @@ ContextPath Value[z] Path z [ { - "data": null, - "deprecated": false, "detail": "One", "documentation": { "kind": "markdown", @@ -1253,8 +821,6 @@ Path z "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Two(bool)", "documentation": { "kind": "markdown", @@ -1267,8 +833,6 @@ Path z "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Three(someRecord, bool)", "documentation": { "kind": "markdown", @@ -1292,24 +856,8 @@ Resolved opens 1 Stdlib ContextPath Value[z] Path z [ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "true", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] Complete src/CompletionPattern.res 185:48 @@ -1323,24 +871,8 @@ Resolved opens 1 Stdlib ContextPath Value[z] Path z [ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "true", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] Complete src/CompletionPattern.res 188:34 @@ -1352,24 +884,8 @@ Resolved opens 1 Stdlib ContextPath Value[b] Path b [ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "true", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] Complete src/CompletionPattern.res 191:50 @@ -1382,24 +898,8 @@ Resolved opens 1 Stdlib ContextPath Value[b] Path b [ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "true", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] Complete src/CompletionPattern.res 194:24 @@ -1411,44 +911,17 @@ Resolved opens 1 Stdlib ContextPath Value[s] Path s [ + { "detail": "bool", "kind": 12, "label": "None", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "None", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "Some(${1:_})", "insertTextFormat": 2, "kind": 12, "label": "Some(_)", "tags": [] }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "Some(true)", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "Some(false)", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "Some(true)", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "Some(false)", "tags": [] } ] Complete src/CompletionPattern.res 201:25 @@ -1469,8 +942,6 @@ ContextPath Value[xn] Path xn [ { - "data": null, - "deprecated": false, "detail": "Catches errors from JavaScript errors.", "documentation": { "kind": "markdown", @@ -1493,8 +964,6 @@ ContextPath Value[getThing] Path getThing [ { - "data": null, - "deprecated": false, "detail": "One", "documentation": { "kind": "markdown", @@ -1507,8 +976,6 @@ Path getThing "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Two(bool)", "documentation": { "kind": "markdown", @@ -1521,8 +988,6 @@ Path getThing "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Three(someRecord, bool)", "documentation": { "kind": "markdown", @@ -1548,8 +1013,6 @@ ContextPath Value[res] Path res [ { - "data": null, - "deprecated": false, "detail": "One", "documentation": { "kind": "markdown", @@ -1562,8 +1025,6 @@ Path res "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Two(bool)", "documentation": { "kind": "markdown", @@ -1576,8 +1037,6 @@ Path res "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Three(someRecord, bool)", "documentation": { "kind": "markdown", @@ -1603,8 +1062,6 @@ ContextPath Value[res] Path res [ { - "data": null, - "deprecated": false, "detail": "#one", "documentation": { "kind": "markdown", @@ -1617,8 +1074,6 @@ Path res "tags": [] }, { - "data": null, - "deprecated": false, "detail": "#three(someRecord, bool)", "documentation": { "kind": "markdown", @@ -1631,8 +1086,6 @@ Path res "tags": [] }, { - "data": null, - "deprecated": false, "detail": "#two(bool)", "documentation": { "kind": "markdown", @@ -1658,8 +1111,6 @@ ContextPath Value[r] Path r [ { - "data": null, - "deprecated": false, "detail": "(bool, option)", "documentation": { "kind": "markdown", @@ -1670,8 +1121,6 @@ Path r "tags": [] }, { - "data": null, - "deprecated": false, "detail": "option<[#first | #second(someRecord)]>", "documentation": { "kind": "markdown", @@ -1682,8 +1131,6 @@ Path r "tags": [] }, { - "data": null, - "deprecated": false, "detail": "nestedRecord", "documentation": { "kind": "markdown", @@ -1705,8 +1152,6 @@ ContextPath Value[hitsUse] Path hitsUse [ { - "data": null, - "deprecated": false, "detail": "array", "documentation": { "kind": "markdown", diff --git a/tests/analysis_tests/tests/src/expected/CompletionPipeChain.res.txt b/tests/analysis_tests/tests/src/expected/CompletionPipeChain.res.txt index f95ebf76694..fd4f532bd61 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionPipeChain.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionPipeChain.res.txt @@ -10,38 +10,21 @@ CPPipe pathFromEnv:Integer found:true Path Integer. Path [ + { "detail": "t => int", "kind": 12, "label": "Integer.toInt", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "t => int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "Integer.toInt", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "(t, int) => t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "Integer.increment", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(t, int => int) => t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "Integer.decrement", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Integer.t => SuperFloat.t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "toFlt", "tags": [] @@ -62,10 +45,7 @@ Path SuperFloat. Path [ { - "data": null, - "deprecated": false, "detail": "t => Integer.t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "SuperFloat.toInteger", "tags": [] @@ -85,38 +65,21 @@ CPPipe pathFromEnv:Integer found:true Path Integer. Path [ + { "detail": "t => int", "kind": 12, "label": "Integer.toInt", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "t => int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "Integer.toInt", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "(t, int) => t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "Integer.increment", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(t, int => int) => t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "Integer.decrement", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Integer.t => SuperFloat.t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "toFlt", "tags": [] @@ -136,38 +99,21 @@ CPPipe pathFromEnv:Integer found:true Path Integer. Path [ + { "detail": "t => int", "kind": 12, "label": "Integer.toInt", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "t => int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "Integer.toInt", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "(t, int) => t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "Integer.increment", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(t, int => int) => t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "Integer.decrement", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Integer.t => SuperFloat.t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "toFlt", "tags": [] @@ -187,38 +133,21 @@ CPPipe pathFromEnv:Integer found:true Path Integer. Path [ + { "detail": "t => int", "kind": 12, "label": "Integer.toInt", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "t => int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "Integer.toInt", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "(t, int) => t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "Integer.increment", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(t, int => int) => t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "Integer.decrement", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Integer.t => SuperFloat.t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "toFlt", "tags": [] @@ -238,38 +167,21 @@ CPPipe pathFromEnv:Integer found:true Path Integer. Path [ + { "detail": "t => int", "kind": 12, "label": "Integer.toInt", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "t => int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "Integer.toInt", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "(t, int) => t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "Integer.increment", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(t, int => int) => t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "Integer.decrement", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Integer.t => SuperFloat.t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "toFlt", "tags": [] @@ -290,10 +202,7 @@ Path SuperFloat. Path [ { - "data": null, - "deprecated": false, "detail": "t => Integer.t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "SuperFloat.toInteger", "tags": [] @@ -314,10 +223,7 @@ Path SuperFloat.t Path t [ { - "data": null, - "deprecated": false, "detail": "t => Integer.t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "SuperFloat.toInteger", "tags": [] @@ -338,19 +244,13 @@ Path CompletionSupport.Test. Path [ { - "data": null, - "deprecated": false, "detail": "t => int", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "CompletionSupport.Test.add", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "t => t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "CompletionSupport.Test.addSelf", "tags": [] @@ -371,19 +271,13 @@ Path CompletionSupport.Test. Path [ { - "data": null, - "deprecated": false, "detail": "t => int", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "CompletionSupport.Test.add", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "t => t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "CompletionSupport.Test.addSelf", "tags": [] @@ -417,7 +311,6 @@ Path Stdlib.Int.t Path t [ { - "data": null, "deprecated": true, "detail": "(int, ~radix: int) => string", "documentation": { @@ -429,7 +322,6 @@ Path t "tags": [ 1 ] }, { - "data": null, "deprecated": true, "detail": "(int, ~digits: int) => string", "documentation": { @@ -441,7 +333,6 @@ Path t "tags": [ 1 ] }, { - "data": null, "deprecated": true, "detail": "(int, ~digits: int) => string", "documentation": { @@ -453,7 +344,6 @@ Path t "tags": [ 1 ] }, { - "data": null, "deprecated": true, "detail": "(int, ~digits: int) => string", "documentation": { @@ -465,8 +355,6 @@ Path t "tags": [ 1 ] }, { - "data": null, - "deprecated": false, "detail": "(int, ~digits: int=?) => string", "documentation": { "kind": "markdown", @@ -477,8 +365,6 @@ Path t "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, ~radix: int=?) => string", "documentation": { "kind": "markdown", @@ -489,8 +375,6 @@ Path t "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int => float", "documentation": { "kind": "markdown", @@ -501,8 +385,6 @@ Path t "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int => string", "documentation": { "kind": "markdown", @@ -513,8 +395,6 @@ Path t "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, ~digits: int=?) => string", "documentation": { "kind": "markdown", @@ -525,8 +405,6 @@ Path t "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(int, ~digits: int=?) => string", "documentation": { "kind": "markdown", @@ -551,19 +429,13 @@ Path CompletionSupport.Test. Path [ { - "data": null, - "deprecated": false, "detail": "t => int", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "CompletionSupport.Test.add", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "t => t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "CompletionSupport.Test.addSelf", "tags": [] @@ -583,19 +455,13 @@ Path CompletionSupport.Test. Path [ { - "data": null, - "deprecated": false, "detail": "t => int", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "CompletionSupport.Test.add", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "t => t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "CompletionSupport.Test.addSelf", "tags": [] @@ -641,10 +507,7 @@ Path ReactDOM.Client.Root.ren Path ren [ { - "data": null, - "deprecated": false, "detail": "(t, React.element) => unit", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "ReactDOM.Client.Root.render", "tags": [] @@ -671,10 +534,7 @@ Path ReactDOM.Client.Root.ren Path ren [ { - "data": null, - "deprecated": false, "detail": "(t, React.element) => unit", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "ReactDOM.Client.Root.render", "tags": [] @@ -696,38 +556,21 @@ CPPipe pathFromEnv:Integer found:true Path Integer. Path [ + { "detail": "t => int", "kind": 12, "label": "Integer.toInt", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "t => int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "Integer.toInt", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "(t, int) => t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "Integer.increment", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(t, int => int) => t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "Integer.decrement", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Integer.t => SuperFloat.t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "toFlt", "tags": [] @@ -748,20 +591,9 @@ CPPipe pathFromEnv:Integer found:true Path Integer.t Path t [ + { "detail": "t => int", "kind": 12, "label": "Integer.toInt", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "t => int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "Integer.toInt", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "Integer.t => SuperFloat.t", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "toFlt", "tags": [] @@ -780,8 +612,6 @@ Path Stdlib.RegExp.la Path la [ { - "data": null, - "deprecated": false, "detail": "t => int", "documentation": { "kind": "markdown", @@ -804,15 +634,5 @@ Path xx CPPipe pathFromEnv:Xyz found:true Path Xyz. Path -[ - { - "data": null, - "deprecated": false, - "detail": "xx => string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "Xyz.do", - "tags": [] - } -] +[ { "detail": "xx => string", "kind": 12, "label": "Xyz.do", "tags": [] } ] diff --git a/tests/analysis_tests/tests/src/expected/CompletionPipeProperty.res.txt b/tests/analysis_tests/tests/src/expected/CompletionPipeProperty.res.txt index c9bae2a1239..35d9831e114 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionPipeProperty.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionPipeProperty.res.txt @@ -29,8 +29,6 @@ Path ObservablePoint. Path [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -41,8 +39,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -62,10 +58,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(op, float) => unit", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->ObservablePoint.setBoth", "kind": 12, "label": "->ObservablePoint.setBoth", @@ -82,10 +75,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(op, float, float) => unit", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->ObservablePoint.set", "kind": 12, "label": "->ObservablePoint.set", diff --git a/tests/analysis_tests/tests/src/expected/CompletionPipeSubmodules.res.txt b/tests/analysis_tests/tests/src/expected/CompletionPipeSubmodules.res.txt index 510bb13afbb..948806c930b 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionPipeSubmodules.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionPipeSubmodules.res.txt @@ -11,17 +11,7 @@ Path A.B1.xx CPPipe pathFromEnv:A.B1 found:true Path A.B1. Path -[ - { - "data": null, - "deprecated": false, - "detail": "b1 => string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "A.B1.d", - "tags": [] - } -] +[ { "detail": "b1 => string", "kind": 12, "label": "A.B1.d", "tags": [] } ] Complete src/CompletionPipeSubmodules.res 17:18 posCursor:[17:18] posNoWhite:[17:17] Found expr:[17:11->23:23] @@ -43,17 +33,7 @@ Path v CPPipe pathFromEnv:A.B1 found:true Path A.B1. Path -[ - { - "data": null, - "deprecated": false, - "detail": "b1 => string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "A.B1.d", - "tags": [] - } -] +[ { "detail": "b1 => string", "kind": 12, "label": "A.B1.d", "tags": [] } ] Complete src/CompletionPipeSubmodules.res 41:20 posCursor:[41:20] posNoWhite:[41:19] Found expr:[41:11->0:-1] @@ -87,17 +67,7 @@ Path v CPPipe pathFromEnv:C found:false Path C. Path -[ - { - "data": null, - "deprecated": false, - "detail": "t => string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "C.do", - "tags": [] - } -] +[ { "detail": "t => string", "kind": 12, "label": "C.do", "tags": [] } ] Complete src/CompletionPipeSubmodules.res 45:21 posCursor:[45:21] posNoWhite:[45:20] Found expr:[45:11->0:-1] @@ -131,15 +101,5 @@ Path v2 CPPipe pathFromEnv:D.C2 found:true Path D.C2. Path -[ - { - "data": null, - "deprecated": false, - "detail": "t2 => string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "D.C2.do", - "tags": [] - } -] +[ { "detail": "t2 => string", "kind": 12, "label": "D.C2.do", "tags": [] } ] diff --git a/tests/analysis_tests/tests/src/expected/CompletionRegexp.res.txt b/tests/analysis_tests/tests/src/expected/CompletionRegexp.res.txt index df4a9d51192..52a73734951 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionRegexp.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionRegexp.res.txt @@ -10,8 +10,6 @@ Path Stdlib.RegExp. Path [ { - "data": null, - "deprecated": false, "detail": "t => int", "documentation": { "kind": "markdown", @@ -22,8 +20,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(t, int) => unit", "documentation": { "kind": "markdown", @@ -34,8 +30,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "t => bool", "documentation": { "kind": "markdown", @@ -46,8 +40,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "t => unit", "documentation": { "kind": "markdown", @@ -58,8 +50,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(t, string) => option", "documentation": { "kind": "markdown", @@ -70,8 +60,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "t => bool", "documentation": { "kind": "markdown", @@ -82,8 +70,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "t => bool", "documentation": { "kind": "markdown", @@ -94,8 +80,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "t => bool", "documentation": { "kind": "markdown", @@ -106,8 +90,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(t, string) => bool", "documentation": { "kind": "markdown", @@ -118,8 +100,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "t => bool", "documentation": { "kind": "markdown", @@ -130,8 +110,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "t => string", "documentation": { "kind": "markdown", @@ -142,8 +120,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "t => string", "documentation": { "kind": "markdown", diff --git a/tests/analysis_tests/tests/src/expected/CompletionTaggedTemplate.res.txt b/tests/analysis_tests/tests/src/expected/CompletionTaggedTemplate.res.txt index 04b0bad5d6a..7fe6d09ca6a 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionTaggedTemplate.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionTaggedTemplate.res.txt @@ -24,10 +24,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t, int) => int", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->M.xyz", "kind": 12, "label": "->M.xyz", @@ -44,10 +41,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->M.b", "kind": 12, "label": "->M.b", @@ -64,10 +58,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t => int", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->M.a", "kind": 12, "label": "->M.a", @@ -103,10 +94,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t, int) => int", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->M.xyz", "kind": 12, "label": "->M.xyz", @@ -123,10 +111,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->M.b", "kind": 12, "label": "->M.b", @@ -143,10 +128,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t => int", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->M.a", "kind": 12, "label": "->M.a", diff --git a/tests/analysis_tests/tests/src/expected/CompletionTypeAnnotation.res.txt b/tests/analysis_tests/tests/src/expected/CompletionTypeAnnotation.res.txt index ada3deb0560..79dbbe34d43 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionTypeAnnotation.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionTypeAnnotation.res.txt @@ -7,8 +7,6 @@ ContextPath Type[someRecord] Path someRecord [ { - "data": null, - "deprecated": false, "detail": "someRecord", "documentation": { "kind": "markdown", @@ -32,8 +30,6 @@ ContextPath Type[someRecord] Path someRecord [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -44,8 +40,6 @@ Path someRecord "tags": [] }, { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -66,8 +60,6 @@ ContextPath Type[someVariant] Path someVariant [ { - "data": null, - "deprecated": false, "detail": "One", "documentation": { "kind": "markdown", @@ -80,8 +72,6 @@ Path someVariant "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Two(bool)", "documentation": { "kind": "markdown", @@ -104,8 +94,6 @@ ContextPath Type[someVariant] Path someVariant [ { - "data": null, - "deprecated": false, "detail": "One", "documentation": { "kind": "markdown", @@ -118,41 +106,15 @@ Path someVariant "sortText": "A One", "tags": [] }, - { - "data": null, - "deprecated": false, - "detail": "module Option", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 9, - "label": "Option", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "module Ordering", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 9, - "label": "Ordering", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "module Object", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 9, - "label": "Object", - "tags": [] - }, + { "detail": "module Option", "kind": 9, "label": "Option", "tags": [] }, + { "detail": "module Ordering", "kind": 9, "label": "Ordering", "tags": [] }, + { "detail": "module Object", "kind": 9, "label": "Object", "tags": [] }, { "data": { "modulePath": "Obj", "filePath": "src/CompletionTypeAnnotation.res" }, - "deprecated": false, "detail": "module Obj", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "Obj", "tags": [] @@ -162,9 +124,7 @@ Path someVariant "modulePath": "Objects", "filePath": "src/CompletionTypeAnnotation.res" }, - "deprecated": false, "detail": "module Objects", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "Objects", "tags": [] @@ -180,8 +140,6 @@ ContextPath Type[somePolyVariant] Path somePolyVariant [ { - "data": null, - "deprecated": false, "detail": "#one", "documentation": { "kind": "markdown", @@ -194,8 +152,6 @@ Path somePolyVariant "tags": [] }, { - "data": null, - "deprecated": false, "detail": "#two(bool)", "documentation": { "kind": "markdown", @@ -218,8 +174,6 @@ ContextPath Type[somePolyVariant] Path somePolyVariant [ { - "data": null, - "deprecated": false, "detail": "#one", "documentation": { "kind": "markdown", @@ -242,10 +196,7 @@ ContextPath Type[someFunc] Path someFunc [ { - "data": null, - "deprecated": false, "detail": "(int, string) => bool", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "(${1:v1}, ${2:v2}) => {${0:()}}", "insertTextFormat": 2, "kind": 12, @@ -264,10 +215,7 @@ ContextPath Type[someTuple] Path someTuple [ { - "data": null, - "deprecated": false, "detail": "(bool, option)", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "(${1:_}, ${2:_})", "insertTextFormat": 2, "kind": 12, @@ -284,44 +232,17 @@ Resolved opens 1 Stdlib ContextPath Type[someTuple] Path someTuple [ + { "detail": "bool", "kind": 12, "label": "None", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "None", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "Some($0)", "insertTextFormat": 2, "kind": 12, "label": "Some(_)", "tags": [] }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "Some(true)", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "Some(false)", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "Some(true)", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "Some(false)", "tags": [] } ] Complete src/CompletionTypeAnnotation.res 40:31 @@ -334,8 +255,6 @@ ContextPath Type[someVariant] Path someVariant [ { - "data": null, - "deprecated": false, "detail": "someVariant", "documentation": { "kind": "markdown", @@ -346,8 +265,6 @@ Path someVariant "tags": [] }, { - "data": null, - "deprecated": false, "detail": "someVariant", "documentation": { "kind": "markdown", @@ -360,8 +277,6 @@ Path someVariant "tags": [] }, { - "data": null, - "deprecated": false, "detail": "One", "documentation": { "kind": "markdown", @@ -374,8 +289,6 @@ Path someVariant "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Two(bool)", "documentation": { "kind": "markdown", @@ -399,8 +312,6 @@ ContextPath Type[someVariant] Path someVariant [ { - "data": null, - "deprecated": false, "detail": "One", "documentation": { "kind": "markdown", @@ -413,8 +324,6 @@ Path someVariant "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Two(bool)", "documentation": { "kind": "markdown", @@ -438,8 +347,6 @@ ContextPath Type[someVariant] Path someVariant [ { - "data": null, - "deprecated": false, "detail": "someVariant", "documentation": { "kind": "markdown", @@ -464,8 +371,6 @@ ContextPath Type[someVariant] Path someVariant [ { - "data": null, - "deprecated": false, "detail": "One", "documentation": { "kind": "markdown", @@ -478,8 +383,6 @@ Path someVariant "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Two(bool)", "documentation": { "kind": "markdown", @@ -504,8 +407,6 @@ ContextPath Type[someVariant] Path someVariant [ { - "data": null, - "deprecated": false, "detail": "option", "documentation": { "kind": "markdown", @@ -531,8 +432,6 @@ ContextPath Type[someVariant] Path someVariant [ { - "data": null, - "deprecated": false, "detail": "One", "documentation": { "kind": "markdown", @@ -545,8 +444,6 @@ Path someVariant "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Two(bool)", "documentation": { "kind": "markdown", diff --git a/tests/analysis_tests/tests/src/expected/CompletionTypeT.res.txt b/tests/analysis_tests/tests/src/expected/CompletionTypeT.res.txt index b8bc6630e61..e09021182eb 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionTypeT.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionTypeT.res.txt @@ -7,8 +7,6 @@ ContextPath Value[date] Path date [ { - "data": null, - "deprecated": false, "detail": "Date.t", "documentation": { "kind": "markdown", @@ -19,8 +17,6 @@ Path date "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Date.t", "documentation": { "kind": "markdown", @@ -33,10 +29,7 @@ Path date "tags": [] }, { - "data": null, - "deprecated": false, "detail": "date", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "Some(${0:date})", "insertTextFormat": 2, "kind": 4, @@ -54,10 +47,7 @@ ContextPath Type[withDate] Path withDate [ { - "data": null, - "deprecated": false, "detail": "(~year: int, ~month: int, ~day: int) => t", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "Date.makeWithYMD($0)", "insertTextFormat": 2, "kind": 12, @@ -65,10 +55,7 @@ Path withDate "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(\n ~year: int,\n ~month: int,\n ~day: int,\n ~hours: int,\n ~minutes: int,\n) => t", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "Date.makeWithYMDHM($0)", "insertTextFormat": 2, "kind": 12, @@ -76,10 +63,7 @@ Path withDate "tags": [] }, { - "data": null, - "deprecated": false, "detail": "unit => t", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "Date.make($0)", "insertTextFormat": 2, "kind": 12, @@ -87,10 +71,7 @@ Path withDate "tags": [] }, { - "data": null, - "deprecated": false, "detail": "msSinceEpoch => t", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "Date.fromTime($0)", "insertTextFormat": 2, "kind": 12, @@ -98,10 +79,7 @@ Path withDate "tags": [] }, { - "data": null, - "deprecated": false, "detail": "string => t", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "Date.fromString($0)", "insertTextFormat": 2, "kind": 12, @@ -109,10 +87,7 @@ Path withDate "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(\n ~year: int,\n ~month: int,\n ~day: int,\n ~hours: int,\n ~minutes: int,\n ~seconds: int,\n ~milliseconds: int,\n) => t", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "Date.makeWithYMDHMSM($0)", "insertTextFormat": 2, "kind": 12, @@ -120,10 +95,7 @@ Path withDate "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(~year: int, ~month: int) => t", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "Date.makeWithYM($0)", "insertTextFormat": 2, "kind": 12, @@ -131,10 +103,7 @@ Path withDate "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(\n ~year: int,\n ~month: int,\n ~day: int,\n ~hours: int,\n ~minutes: int,\n ~seconds: int,\n) => t", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "Date.makeWithYMDHMS($0)", "insertTextFormat": 2, "kind": 12, @@ -142,10 +111,7 @@ Path withDate "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(~year: int, ~month: int, ~day: int, ~hours: int) => t", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "Date.makeWithYMDH($0)", "insertTextFormat": 2, "kind": 12, diff --git a/tests/analysis_tests/tests/src/expected/CompletionTypedArrays.res.txt b/tests/analysis_tests/tests/src/expected/CompletionTypedArrays.res.txt index bfce4d1d987..c9dff580bac 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionTypedArrays.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionTypedArrays.res.txt @@ -25,8 +25,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t => unit", "documentation": { "kind": "markdown", @@ -48,8 +46,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", "documentation": { "kind": "markdown", @@ -71,8 +67,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => int", "documentation": { "kind": "markdown", @@ -94,8 +88,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -117,8 +109,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -140,8 +130,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => t<'a>", "documentation": { "kind": "markdown", @@ -163,8 +151,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -186,8 +172,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => unit", "documentation": { "kind": "markdown", @@ -209,8 +193,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -232,8 +214,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -255,8 +235,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, string) => string", "documentation": { "kind": "markdown", @@ -278,8 +256,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => ArrayBuffer.t", "documentation": { "kind": "markdown", @@ -301,8 +277,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -324,8 +298,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => unit) => unit", "documentation": { "kind": "markdown", @@ -347,8 +319,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => t<'a>", "documentation": { "kind": "markdown", @@ -370,8 +340,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", "documentation": { "kind": "markdown", @@ -393,8 +361,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", "documentation": { "kind": "markdown", @@ -416,7 +382,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", "documentation": { @@ -439,8 +404,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -462,8 +425,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", "documentation": { "kind": "markdown", @@ -485,8 +446,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => bool", "documentation": { "kind": "markdown", @@ -508,7 +467,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, 'a, ~start: int) => t<'a>", "documentation": { @@ -531,8 +489,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => t<'a>", "documentation": { "kind": "markdown", @@ -554,8 +510,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -577,7 +531,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", "documentation": { @@ -600,8 +553,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int, 'a) => unit", "documentation": { "kind": "markdown", @@ -623,8 +574,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => string", "documentation": { "kind": "markdown", @@ -646,8 +595,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, int) => int", "documentation": { "kind": "markdown", @@ -669,8 +616,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", "documentation": { "kind": "markdown", @@ -692,8 +637,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => t<'a>", "documentation": { "kind": "markdown", @@ -715,8 +658,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", "documentation": { "kind": "markdown", @@ -738,8 +679,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", "documentation": { "kind": "markdown", @@ -761,8 +700,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", "documentation": { "kind": "markdown", @@ -784,8 +721,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -807,8 +742,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => int", "documentation": { "kind": "markdown", @@ -830,7 +763,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", "documentation": { @@ -853,8 +785,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", "documentation": { "kind": "markdown", @@ -876,8 +806,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -899,8 +827,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => 'b) => t<'b>", "documentation": { "kind": "markdown", @@ -922,8 +848,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", "documentation": { "kind": "markdown", @@ -945,8 +869,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~target: int) => array<'a>", "documentation": { "kind": "markdown", @@ -968,8 +890,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -991,8 +911,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, array<'a>) => unit", "documentation": { "kind": "markdown", @@ -1014,8 +932,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int) => option<'a>", "documentation": { "kind": "markdown", @@ -1037,8 +953,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int, 'a) => t<'a>", "documentation": { "kind": "markdown", @@ -1060,8 +974,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => t<'a>", "documentation": { "kind": "markdown", @@ -1083,8 +995,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", "documentation": { "kind": "markdown", @@ -1106,8 +1016,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", "documentation": { "kind": "markdown", @@ -1129,8 +1037,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => string", "documentation": { "kind": "markdown", @@ -1152,8 +1058,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, array<'a>, int) => unit", "documentation": { "kind": "markdown", @@ -1175,8 +1079,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => unit) => unit", "documentation": { "kind": "markdown", @@ -1198,8 +1100,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -1221,8 +1121,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -1244,8 +1142,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, int) => int", "documentation": { "kind": "markdown", @@ -1267,8 +1163,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => unit", "documentation": { "kind": "markdown", @@ -1290,8 +1184,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -1332,8 +1224,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t => unit", "documentation": { "kind": "markdown", @@ -1355,8 +1245,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", "documentation": { "kind": "markdown", @@ -1378,8 +1266,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => int", "documentation": { "kind": "markdown", @@ -1401,8 +1287,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -1424,8 +1308,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -1447,8 +1329,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => t<'a>", "documentation": { "kind": "markdown", @@ -1470,8 +1350,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -1493,8 +1371,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => unit", "documentation": { "kind": "markdown", @@ -1516,8 +1392,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -1539,8 +1413,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -1562,8 +1434,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, string) => string", "documentation": { "kind": "markdown", @@ -1585,8 +1455,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => ArrayBuffer.t", "documentation": { "kind": "markdown", @@ -1608,8 +1476,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -1631,8 +1497,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => unit) => unit", "documentation": { "kind": "markdown", @@ -1654,8 +1518,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => t<'a>", "documentation": { "kind": "markdown", @@ -1677,8 +1539,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", "documentation": { "kind": "markdown", @@ -1700,8 +1560,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", "documentation": { "kind": "markdown", @@ -1723,7 +1581,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", "documentation": { @@ -1746,8 +1603,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -1769,8 +1624,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", "documentation": { "kind": "markdown", @@ -1792,8 +1645,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => bool", "documentation": { "kind": "markdown", @@ -1815,7 +1666,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, 'a, ~start: int) => t<'a>", "documentation": { @@ -1838,8 +1688,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => t<'a>", "documentation": { "kind": "markdown", @@ -1861,8 +1709,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -1884,7 +1730,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", "documentation": { @@ -1907,8 +1752,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int, 'a) => unit", "documentation": { "kind": "markdown", @@ -1930,8 +1773,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => string", "documentation": { "kind": "markdown", @@ -1953,8 +1794,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, int) => int", "documentation": { "kind": "markdown", @@ -1976,8 +1815,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", "documentation": { "kind": "markdown", @@ -1999,8 +1836,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => t<'a>", "documentation": { "kind": "markdown", @@ -2022,8 +1857,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", "documentation": { "kind": "markdown", @@ -2045,8 +1878,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", "documentation": { "kind": "markdown", @@ -2068,8 +1899,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", "documentation": { "kind": "markdown", @@ -2091,8 +1920,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -2114,8 +1941,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => int", "documentation": { "kind": "markdown", @@ -2137,7 +1962,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", "documentation": { @@ -2160,8 +1984,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", "documentation": { "kind": "markdown", @@ -2183,8 +2005,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -2206,8 +2026,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => 'b) => t<'b>", "documentation": { "kind": "markdown", @@ -2229,8 +2047,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", "documentation": { "kind": "markdown", @@ -2252,8 +2068,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~target: int) => array<'a>", "documentation": { "kind": "markdown", @@ -2275,8 +2089,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -2298,8 +2110,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, array<'a>) => unit", "documentation": { "kind": "markdown", @@ -2321,8 +2131,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int) => option<'a>", "documentation": { "kind": "markdown", @@ -2344,8 +2152,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int, 'a) => t<'a>", "documentation": { "kind": "markdown", @@ -2367,8 +2173,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => t<'a>", "documentation": { "kind": "markdown", @@ -2390,8 +2194,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", "documentation": { "kind": "markdown", @@ -2413,8 +2215,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", "documentation": { "kind": "markdown", @@ -2436,8 +2236,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => string", "documentation": { "kind": "markdown", @@ -2459,8 +2257,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, array<'a>, int) => unit", "documentation": { "kind": "markdown", @@ -2482,8 +2278,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => unit) => unit", "documentation": { "kind": "markdown", @@ -2505,8 +2299,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -2528,8 +2320,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -2551,8 +2341,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, int) => int", "documentation": { "kind": "markdown", @@ -2574,8 +2362,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => unit", "documentation": { "kind": "markdown", @@ -2597,8 +2383,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -2639,8 +2423,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t => unit", "documentation": { "kind": "markdown", @@ -2662,8 +2444,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", "documentation": { "kind": "markdown", @@ -2685,8 +2465,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => int", "documentation": { "kind": "markdown", @@ -2708,8 +2486,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -2731,8 +2507,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -2754,8 +2528,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => t<'a>", "documentation": { "kind": "markdown", @@ -2777,8 +2549,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -2800,8 +2570,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => unit", "documentation": { "kind": "markdown", @@ -2823,8 +2591,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -2846,8 +2612,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -2869,8 +2633,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, string) => string", "documentation": { "kind": "markdown", @@ -2892,8 +2654,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => ArrayBuffer.t", "documentation": { "kind": "markdown", @@ -2915,8 +2675,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -2938,8 +2696,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => unit) => unit", "documentation": { "kind": "markdown", @@ -2961,8 +2717,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => t<'a>", "documentation": { "kind": "markdown", @@ -2984,8 +2738,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", "documentation": { "kind": "markdown", @@ -3007,8 +2759,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", "documentation": { "kind": "markdown", @@ -3030,7 +2780,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", "documentation": { @@ -3053,8 +2802,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -3076,8 +2823,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", "documentation": { "kind": "markdown", @@ -3099,8 +2844,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => bool", "documentation": { "kind": "markdown", @@ -3122,7 +2865,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, 'a, ~start: int) => t<'a>", "documentation": { @@ -3145,8 +2887,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => t<'a>", "documentation": { "kind": "markdown", @@ -3168,8 +2908,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -3191,7 +2929,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", "documentation": { @@ -3214,8 +2951,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int, 'a) => unit", "documentation": { "kind": "markdown", @@ -3237,8 +2972,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => string", "documentation": { "kind": "markdown", @@ -3260,8 +2993,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, int) => int", "documentation": { "kind": "markdown", @@ -3283,8 +3014,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", "documentation": { "kind": "markdown", @@ -3306,8 +3035,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => t<'a>", "documentation": { "kind": "markdown", @@ -3329,8 +3056,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", "documentation": { "kind": "markdown", @@ -3352,8 +3077,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", "documentation": { "kind": "markdown", @@ -3375,8 +3098,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", "documentation": { "kind": "markdown", @@ -3398,8 +3119,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -3421,8 +3140,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => int", "documentation": { "kind": "markdown", @@ -3444,7 +3161,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", "documentation": { @@ -3467,8 +3183,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", "documentation": { "kind": "markdown", @@ -3490,8 +3204,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -3513,8 +3225,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => 'b) => t<'b>", "documentation": { "kind": "markdown", @@ -3536,8 +3246,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", "documentation": { "kind": "markdown", @@ -3559,8 +3267,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~target: int) => array<'a>", "documentation": { "kind": "markdown", @@ -3582,8 +3288,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -3605,8 +3309,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, array<'a>) => unit", "documentation": { "kind": "markdown", @@ -3628,8 +3330,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int) => option<'a>", "documentation": { "kind": "markdown", @@ -3651,8 +3351,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int, 'a) => t<'a>", "documentation": { "kind": "markdown", @@ -3674,8 +3372,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => t<'a>", "documentation": { "kind": "markdown", @@ -3697,8 +3393,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", "documentation": { "kind": "markdown", @@ -3720,8 +3414,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", "documentation": { "kind": "markdown", @@ -3743,8 +3435,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => string", "documentation": { "kind": "markdown", @@ -3766,8 +3456,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, array<'a>, int) => unit", "documentation": { "kind": "markdown", @@ -3789,8 +3477,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => unit) => unit", "documentation": { "kind": "markdown", @@ -3812,8 +3498,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -3835,8 +3519,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -3858,8 +3540,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, int) => int", "documentation": { "kind": "markdown", @@ -3881,8 +3561,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => unit", "documentation": { "kind": "markdown", @@ -3904,8 +3582,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -3946,8 +3622,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t => unit", "documentation": { "kind": "markdown", @@ -3969,8 +3643,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", "documentation": { "kind": "markdown", @@ -3992,8 +3664,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => int", "documentation": { "kind": "markdown", @@ -4015,8 +3685,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -4038,8 +3706,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -4061,8 +3727,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => t<'a>", "documentation": { "kind": "markdown", @@ -4084,8 +3748,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -4107,8 +3769,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => unit", "documentation": { "kind": "markdown", @@ -4130,8 +3790,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -4153,8 +3811,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -4176,8 +3832,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, string) => string", "documentation": { "kind": "markdown", @@ -4199,8 +3853,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => ArrayBuffer.t", "documentation": { "kind": "markdown", @@ -4222,8 +3874,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -4245,8 +3895,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => unit) => unit", "documentation": { "kind": "markdown", @@ -4268,8 +3916,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => t<'a>", "documentation": { "kind": "markdown", @@ -4291,8 +3937,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", "documentation": { "kind": "markdown", @@ -4314,8 +3958,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", "documentation": { "kind": "markdown", @@ -4337,7 +3979,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", "documentation": { @@ -4360,8 +4001,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -4383,8 +4022,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", "documentation": { "kind": "markdown", @@ -4406,8 +4043,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => bool", "documentation": { "kind": "markdown", @@ -4429,7 +4064,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, 'a, ~start: int) => t<'a>", "documentation": { @@ -4452,8 +4086,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => t<'a>", "documentation": { "kind": "markdown", @@ -4475,8 +4107,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -4498,7 +4128,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", "documentation": { @@ -4521,8 +4150,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int, 'a) => unit", "documentation": { "kind": "markdown", @@ -4544,8 +4171,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => string", "documentation": { "kind": "markdown", @@ -4567,8 +4192,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, int) => int", "documentation": { "kind": "markdown", @@ -4590,8 +4213,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", "documentation": { "kind": "markdown", @@ -4613,8 +4234,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => t<'a>", "documentation": { "kind": "markdown", @@ -4636,8 +4255,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", "documentation": { "kind": "markdown", @@ -4659,8 +4276,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", "documentation": { "kind": "markdown", @@ -4682,8 +4297,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", "documentation": { "kind": "markdown", @@ -4705,8 +4318,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -4728,8 +4339,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => int", "documentation": { "kind": "markdown", @@ -4751,7 +4360,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", "documentation": { @@ -4774,8 +4382,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", "documentation": { "kind": "markdown", @@ -4797,8 +4403,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -4820,8 +4424,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => 'b) => t<'b>", "documentation": { "kind": "markdown", @@ -4843,8 +4445,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", "documentation": { "kind": "markdown", @@ -4866,8 +4466,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~target: int) => array<'a>", "documentation": { "kind": "markdown", @@ -4889,8 +4487,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -4912,8 +4508,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, array<'a>) => unit", "documentation": { "kind": "markdown", @@ -4935,8 +4529,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int) => option<'a>", "documentation": { "kind": "markdown", @@ -4958,8 +4550,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int, 'a) => t<'a>", "documentation": { "kind": "markdown", @@ -4981,8 +4571,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => t<'a>", "documentation": { "kind": "markdown", @@ -5004,8 +4592,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", "documentation": { "kind": "markdown", @@ -5027,8 +4613,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", "documentation": { "kind": "markdown", @@ -5050,8 +4634,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => string", "documentation": { "kind": "markdown", @@ -5073,8 +4655,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, array<'a>, int) => unit", "documentation": { "kind": "markdown", @@ -5096,8 +4676,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => unit) => unit", "documentation": { "kind": "markdown", @@ -5119,8 +4697,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -5142,8 +4718,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -5165,8 +4739,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, int) => int", "documentation": { "kind": "markdown", @@ -5188,8 +4760,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => unit", "documentation": { "kind": "markdown", @@ -5211,8 +4781,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -5253,8 +4821,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t => unit", "documentation": { "kind": "markdown", @@ -5276,8 +4842,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", "documentation": { "kind": "markdown", @@ -5299,8 +4863,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => int", "documentation": { "kind": "markdown", @@ -5322,8 +4884,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -5345,8 +4905,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -5368,8 +4926,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => t<'a>", "documentation": { "kind": "markdown", @@ -5391,8 +4947,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -5414,8 +4968,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => unit", "documentation": { "kind": "markdown", @@ -5437,8 +4989,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -5460,8 +5010,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -5483,8 +5031,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, string) => string", "documentation": { "kind": "markdown", @@ -5506,8 +5052,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => ArrayBuffer.t", "documentation": { "kind": "markdown", @@ -5529,8 +5073,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -5552,8 +5094,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => unit) => unit", "documentation": { "kind": "markdown", @@ -5575,8 +5115,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => t<'a>", "documentation": { "kind": "markdown", @@ -5598,8 +5136,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", "documentation": { "kind": "markdown", @@ -5621,8 +5157,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", "documentation": { "kind": "markdown", @@ -5644,7 +5178,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", "documentation": { @@ -5667,8 +5200,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -5690,8 +5221,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", "documentation": { "kind": "markdown", @@ -5713,8 +5242,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => bool", "documentation": { "kind": "markdown", @@ -5736,7 +5263,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, 'a, ~start: int) => t<'a>", "documentation": { @@ -5759,8 +5285,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => t<'a>", "documentation": { "kind": "markdown", @@ -5782,8 +5306,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -5805,7 +5327,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", "documentation": { @@ -5828,8 +5349,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int, 'a) => unit", "documentation": { "kind": "markdown", @@ -5851,8 +5370,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => string", "documentation": { "kind": "markdown", @@ -5874,8 +5391,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, int) => int", "documentation": { "kind": "markdown", @@ -5897,8 +5412,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", "documentation": { "kind": "markdown", @@ -5920,8 +5433,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => t<'a>", "documentation": { "kind": "markdown", @@ -5943,8 +5454,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", "documentation": { "kind": "markdown", @@ -5966,8 +5475,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", "documentation": { "kind": "markdown", @@ -5989,8 +5496,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", "documentation": { "kind": "markdown", @@ -6012,8 +5517,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -6035,8 +5538,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => int", "documentation": { "kind": "markdown", @@ -6058,7 +5559,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", "documentation": { @@ -6081,8 +5581,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", "documentation": { "kind": "markdown", @@ -6104,8 +5602,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -6127,8 +5623,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => 'b) => t<'b>", "documentation": { "kind": "markdown", @@ -6150,8 +5644,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", "documentation": { "kind": "markdown", @@ -6173,8 +5665,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~target: int) => array<'a>", "documentation": { "kind": "markdown", @@ -6196,8 +5686,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -6219,8 +5707,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, array<'a>) => unit", "documentation": { "kind": "markdown", @@ -6242,8 +5728,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int) => option<'a>", "documentation": { "kind": "markdown", @@ -6265,8 +5749,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int, 'a) => t<'a>", "documentation": { "kind": "markdown", @@ -6288,8 +5770,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => t<'a>", "documentation": { "kind": "markdown", @@ -6311,8 +5791,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", "documentation": { "kind": "markdown", @@ -6334,8 +5812,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", "documentation": { "kind": "markdown", @@ -6357,8 +5833,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => string", "documentation": { "kind": "markdown", @@ -6380,8 +5854,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, array<'a>, int) => unit", "documentation": { "kind": "markdown", @@ -6403,8 +5875,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => unit) => unit", "documentation": { "kind": "markdown", @@ -6426,8 +5896,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -6449,8 +5917,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -6472,8 +5938,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, int) => int", "documentation": { "kind": "markdown", @@ -6495,8 +5959,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => unit", "documentation": { "kind": "markdown", @@ -6518,8 +5980,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -6560,8 +6020,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t => unit", "documentation": { "kind": "markdown", @@ -6583,8 +6041,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", "documentation": { "kind": "markdown", @@ -6606,8 +6062,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => int", "documentation": { "kind": "markdown", @@ -6629,8 +6083,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -6652,8 +6104,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -6675,8 +6125,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => t<'a>", "documentation": { "kind": "markdown", @@ -6698,8 +6146,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -6721,8 +6167,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => unit", "documentation": { "kind": "markdown", @@ -6744,8 +6188,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -6767,8 +6209,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -6790,8 +6230,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, string) => string", "documentation": { "kind": "markdown", @@ -6813,8 +6251,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => ArrayBuffer.t", "documentation": { "kind": "markdown", @@ -6836,8 +6272,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -6859,8 +6293,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => unit) => unit", "documentation": { "kind": "markdown", @@ -6882,8 +6314,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => t<'a>", "documentation": { "kind": "markdown", @@ -6905,8 +6335,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", "documentation": { "kind": "markdown", @@ -6928,8 +6356,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", "documentation": { "kind": "markdown", @@ -6951,7 +6377,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", "documentation": { @@ -6974,8 +6399,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -6997,8 +6420,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", "documentation": { "kind": "markdown", @@ -7020,8 +6441,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => bool", "documentation": { "kind": "markdown", @@ -7043,7 +6462,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, 'a, ~start: int) => t<'a>", "documentation": { @@ -7066,8 +6484,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => t<'a>", "documentation": { "kind": "markdown", @@ -7089,8 +6505,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -7112,7 +6526,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", "documentation": { @@ -7135,8 +6548,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int, 'a) => unit", "documentation": { "kind": "markdown", @@ -7158,8 +6569,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => string", "documentation": { "kind": "markdown", @@ -7181,8 +6590,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, int) => int", "documentation": { "kind": "markdown", @@ -7204,8 +6611,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", "documentation": { "kind": "markdown", @@ -7227,8 +6632,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => t<'a>", "documentation": { "kind": "markdown", @@ -7250,8 +6653,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", "documentation": { "kind": "markdown", @@ -7273,8 +6674,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", "documentation": { "kind": "markdown", @@ -7296,8 +6695,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", "documentation": { "kind": "markdown", @@ -7319,8 +6716,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -7342,8 +6737,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => int", "documentation": { "kind": "markdown", @@ -7365,7 +6758,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", "documentation": { @@ -7388,8 +6780,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", "documentation": { "kind": "markdown", @@ -7411,8 +6801,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -7434,8 +6822,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => 'b) => t<'b>", "documentation": { "kind": "markdown", @@ -7457,8 +6843,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", "documentation": { "kind": "markdown", @@ -7480,8 +6864,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~target: int) => array<'a>", "documentation": { "kind": "markdown", @@ -7503,8 +6885,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -7526,8 +6906,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, array<'a>) => unit", "documentation": { "kind": "markdown", @@ -7549,8 +6927,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int) => option<'a>", "documentation": { "kind": "markdown", @@ -7572,8 +6948,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int, 'a) => t<'a>", "documentation": { "kind": "markdown", @@ -7595,8 +6969,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => t<'a>", "documentation": { "kind": "markdown", @@ -7618,8 +6990,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", "documentation": { "kind": "markdown", @@ -7641,8 +7011,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", "documentation": { "kind": "markdown", @@ -7664,8 +7032,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => string", "documentation": { "kind": "markdown", @@ -7687,8 +7053,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, array<'a>, int) => unit", "documentation": { "kind": "markdown", @@ -7710,8 +7074,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => unit) => unit", "documentation": { "kind": "markdown", @@ -7733,8 +7095,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -7756,8 +7116,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -7779,8 +7137,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, int) => int", "documentation": { "kind": "markdown", @@ -7802,8 +7158,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => unit", "documentation": { "kind": "markdown", @@ -7825,8 +7179,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -7867,8 +7219,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t => unit", "documentation": { "kind": "markdown", @@ -7890,8 +7240,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", "documentation": { "kind": "markdown", @@ -7913,8 +7261,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => int", "documentation": { "kind": "markdown", @@ -7936,8 +7282,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -7959,8 +7303,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -7982,8 +7324,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => t<'a>", "documentation": { "kind": "markdown", @@ -8005,8 +7345,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -8028,8 +7366,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => unit", "documentation": { "kind": "markdown", @@ -8051,8 +7387,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -8074,8 +7408,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -8097,8 +7429,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, string) => string", "documentation": { "kind": "markdown", @@ -8120,8 +7450,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => ArrayBuffer.t", "documentation": { "kind": "markdown", @@ -8143,8 +7471,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -8166,8 +7492,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => unit) => unit", "documentation": { "kind": "markdown", @@ -8189,8 +7513,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => t<'a>", "documentation": { "kind": "markdown", @@ -8212,8 +7534,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", "documentation": { "kind": "markdown", @@ -8235,8 +7555,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", "documentation": { "kind": "markdown", @@ -8258,7 +7576,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", "documentation": { @@ -8281,8 +7598,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -8304,8 +7619,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", "documentation": { "kind": "markdown", @@ -8327,8 +7640,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => bool", "documentation": { "kind": "markdown", @@ -8350,7 +7661,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, 'a, ~start: int) => t<'a>", "documentation": { @@ -8373,8 +7683,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => t<'a>", "documentation": { "kind": "markdown", @@ -8396,8 +7704,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -8419,7 +7725,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", "documentation": { @@ -8442,8 +7747,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int, 'a) => unit", "documentation": { "kind": "markdown", @@ -8465,8 +7768,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => string", "documentation": { "kind": "markdown", @@ -8488,8 +7789,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, int) => int", "documentation": { "kind": "markdown", @@ -8511,8 +7810,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", "documentation": { "kind": "markdown", @@ -8534,8 +7831,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => t<'a>", "documentation": { "kind": "markdown", @@ -8557,8 +7852,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", "documentation": { "kind": "markdown", @@ -8580,8 +7873,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", "documentation": { "kind": "markdown", @@ -8603,8 +7894,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", "documentation": { "kind": "markdown", @@ -8626,8 +7915,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -8649,8 +7936,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => int", "documentation": { "kind": "markdown", @@ -8672,7 +7957,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", "documentation": { @@ -8695,8 +7979,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", "documentation": { "kind": "markdown", @@ -8718,8 +8000,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -8741,8 +8021,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => 'b) => t<'b>", "documentation": { "kind": "markdown", @@ -8764,8 +8042,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", "documentation": { "kind": "markdown", @@ -8787,8 +8063,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~target: int) => array<'a>", "documentation": { "kind": "markdown", @@ -8810,8 +8084,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -8833,8 +8105,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, array<'a>) => unit", "documentation": { "kind": "markdown", @@ -8856,8 +8126,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int) => option<'a>", "documentation": { "kind": "markdown", @@ -8879,8 +8147,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int, 'a) => t<'a>", "documentation": { "kind": "markdown", @@ -8902,8 +8168,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => t<'a>", "documentation": { "kind": "markdown", @@ -8925,8 +8189,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", "documentation": { "kind": "markdown", @@ -8948,8 +8210,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", "documentation": { "kind": "markdown", @@ -8971,8 +8231,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => string", "documentation": { "kind": "markdown", @@ -8994,8 +8252,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, array<'a>, int) => unit", "documentation": { "kind": "markdown", @@ -9017,8 +8273,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => unit) => unit", "documentation": { "kind": "markdown", @@ -9040,8 +8294,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -9063,8 +8315,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -9086,8 +8336,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, int) => int", "documentation": { "kind": "markdown", @@ -9109,8 +8357,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => unit", "documentation": { "kind": "markdown", @@ -9132,8 +8378,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -9174,8 +8418,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t => unit", "documentation": { "kind": "markdown", @@ -9197,8 +8439,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", "documentation": { "kind": "markdown", @@ -9220,8 +8460,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => int", "documentation": { "kind": "markdown", @@ -9243,8 +8481,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -9266,8 +8502,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -9289,8 +8523,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => t<'a>", "documentation": { "kind": "markdown", @@ -9312,8 +8544,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -9335,8 +8565,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => unit", "documentation": { "kind": "markdown", @@ -9358,8 +8586,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -9381,8 +8607,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -9404,8 +8628,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, string) => string", "documentation": { "kind": "markdown", @@ -9427,8 +8649,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => ArrayBuffer.t", "documentation": { "kind": "markdown", @@ -9450,8 +8670,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -9473,8 +8691,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => unit) => unit", "documentation": { "kind": "markdown", @@ -9496,8 +8712,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => t<'a>", "documentation": { "kind": "markdown", @@ -9519,8 +8733,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", "documentation": { "kind": "markdown", @@ -9542,8 +8754,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", "documentation": { "kind": "markdown", @@ -9565,7 +8775,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", "documentation": { @@ -9588,8 +8797,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -9611,8 +8818,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", "documentation": { "kind": "markdown", @@ -9634,8 +8839,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => bool", "documentation": { "kind": "markdown", @@ -9657,7 +8860,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, 'a, ~start: int) => t<'a>", "documentation": { @@ -9680,8 +8882,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => t<'a>", "documentation": { "kind": "markdown", @@ -9703,8 +8903,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -9726,7 +8924,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", "documentation": { @@ -9749,8 +8946,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int, 'a) => unit", "documentation": { "kind": "markdown", @@ -9772,8 +8967,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => string", "documentation": { "kind": "markdown", @@ -9795,8 +8988,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, int) => int", "documentation": { "kind": "markdown", @@ -9818,8 +9009,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", "documentation": { "kind": "markdown", @@ -9841,8 +9030,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => t<'a>", "documentation": { "kind": "markdown", @@ -9864,8 +9051,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", "documentation": { "kind": "markdown", @@ -9887,8 +9072,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", "documentation": { "kind": "markdown", @@ -9910,8 +9093,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", "documentation": { "kind": "markdown", @@ -9933,8 +9114,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -9956,8 +9135,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => int", "documentation": { "kind": "markdown", @@ -9979,7 +9156,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", "documentation": { @@ -10002,8 +9178,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", "documentation": { "kind": "markdown", @@ -10025,8 +9199,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -10048,8 +9220,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => 'b) => t<'b>", "documentation": { "kind": "markdown", @@ -10071,8 +9241,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", "documentation": { "kind": "markdown", @@ -10094,8 +9262,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~target: int) => array<'a>", "documentation": { "kind": "markdown", @@ -10117,8 +9283,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -10140,8 +9304,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, array<'a>) => unit", "documentation": { "kind": "markdown", @@ -10163,8 +9325,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int) => option<'a>", "documentation": { "kind": "markdown", @@ -10186,8 +9346,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int, 'a) => t<'a>", "documentation": { "kind": "markdown", @@ -10209,8 +9367,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => t<'a>", "documentation": { "kind": "markdown", @@ -10232,8 +9388,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", "documentation": { "kind": "markdown", @@ -10255,8 +9409,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", "documentation": { "kind": "markdown", @@ -10278,8 +9430,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => string", "documentation": { "kind": "markdown", @@ -10301,8 +9451,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, array<'a>, int) => unit", "documentation": { "kind": "markdown", @@ -10324,8 +9472,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => unit) => unit", "documentation": { "kind": "markdown", @@ -10347,8 +9493,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -10370,8 +9514,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -10393,8 +9535,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, int) => int", "documentation": { "kind": "markdown", @@ -10416,8 +9556,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => unit", "documentation": { "kind": "markdown", @@ -10439,8 +9577,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -10481,8 +9617,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t => unit", "documentation": { "kind": "markdown", @@ -10504,8 +9638,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", "documentation": { "kind": "markdown", @@ -10527,8 +9659,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => int", "documentation": { "kind": "markdown", @@ -10550,8 +9680,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -10573,8 +9701,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -10596,8 +9722,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => t<'a>", "documentation": { "kind": "markdown", @@ -10619,8 +9743,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -10642,8 +9764,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => unit", "documentation": { "kind": "markdown", @@ -10665,8 +9785,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -10688,8 +9806,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -10711,8 +9827,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, string) => string", "documentation": { "kind": "markdown", @@ -10734,8 +9848,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => ArrayBuffer.t", "documentation": { "kind": "markdown", @@ -10757,8 +9869,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -10780,8 +9890,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => unit) => unit", "documentation": { "kind": "markdown", @@ -10803,8 +9911,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => t<'a>", "documentation": { "kind": "markdown", @@ -10826,8 +9932,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", "documentation": { "kind": "markdown", @@ -10849,8 +9953,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", "documentation": { "kind": "markdown", @@ -10872,7 +9974,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", "documentation": { @@ -10895,8 +9996,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -10918,8 +10017,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", "documentation": { "kind": "markdown", @@ -10941,8 +10038,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => bool", "documentation": { "kind": "markdown", @@ -10964,7 +10059,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, 'a, ~start: int) => t<'a>", "documentation": { @@ -10987,8 +10081,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => t<'a>", "documentation": { "kind": "markdown", @@ -11010,8 +10102,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -11033,7 +10123,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", "documentation": { @@ -11056,8 +10145,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int, 'a) => unit", "documentation": { "kind": "markdown", @@ -11079,8 +10166,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => string", "documentation": { "kind": "markdown", @@ -11102,8 +10187,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, int) => int", "documentation": { "kind": "markdown", @@ -11125,8 +10208,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", "documentation": { "kind": "markdown", @@ -11148,8 +10229,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => t<'a>", "documentation": { "kind": "markdown", @@ -11171,8 +10250,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", "documentation": { "kind": "markdown", @@ -11194,8 +10271,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", "documentation": { "kind": "markdown", @@ -11217,8 +10292,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", "documentation": { "kind": "markdown", @@ -11240,8 +10313,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -11263,8 +10334,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => int", "documentation": { "kind": "markdown", @@ -11286,7 +10355,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", "documentation": { @@ -11309,8 +10377,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", "documentation": { "kind": "markdown", @@ -11332,8 +10398,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -11355,8 +10419,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => 'b) => t<'b>", "documentation": { "kind": "markdown", @@ -11378,8 +10440,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", "documentation": { "kind": "markdown", @@ -11401,8 +10461,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~target: int) => array<'a>", "documentation": { "kind": "markdown", @@ -11424,8 +10482,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -11447,8 +10503,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, array<'a>) => unit", "documentation": { "kind": "markdown", @@ -11470,8 +10524,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int) => option<'a>", "documentation": { "kind": "markdown", @@ -11493,8 +10545,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int, 'a) => t<'a>", "documentation": { "kind": "markdown", @@ -11516,8 +10566,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => t<'a>", "documentation": { "kind": "markdown", @@ -11539,8 +10587,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", "documentation": { "kind": "markdown", @@ -11562,8 +10608,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", "documentation": { "kind": "markdown", @@ -11585,8 +10629,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => string", "documentation": { "kind": "markdown", @@ -11608,8 +10650,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, array<'a>, int) => unit", "documentation": { "kind": "markdown", @@ -11631,8 +10671,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => unit) => unit", "documentation": { "kind": "markdown", @@ -11654,8 +10692,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -11677,8 +10713,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -11700,8 +10734,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, int) => int", "documentation": { "kind": "markdown", @@ -11723,8 +10755,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => unit", "documentation": { "kind": "markdown", @@ -11746,8 +10776,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -11788,8 +10816,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t => unit", "documentation": { "kind": "markdown", @@ -11811,8 +10837,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", "documentation": { "kind": "markdown", @@ -11834,8 +10858,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => int", "documentation": { "kind": "markdown", @@ -11857,8 +10879,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -11880,8 +10900,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -11903,8 +10921,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => t<'a>", "documentation": { "kind": "markdown", @@ -11926,8 +10942,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -11949,8 +10963,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => unit", "documentation": { "kind": "markdown", @@ -11972,8 +10984,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -11995,8 +11005,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -12018,8 +11026,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, string) => string", "documentation": { "kind": "markdown", @@ -12041,8 +11047,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => ArrayBuffer.t", "documentation": { "kind": "markdown", @@ -12064,8 +11068,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -12087,8 +11089,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => unit) => unit", "documentation": { "kind": "markdown", @@ -12110,8 +11110,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => t<'a>", "documentation": { "kind": "markdown", @@ -12133,8 +11131,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", "documentation": { "kind": "markdown", @@ -12156,8 +11152,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", "documentation": { "kind": "markdown", @@ -12179,7 +11173,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", "documentation": { @@ -12202,8 +11195,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -12225,8 +11216,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", "documentation": { "kind": "markdown", @@ -12248,8 +11237,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => bool", "documentation": { "kind": "markdown", @@ -12271,7 +11258,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, 'a, ~start: int) => t<'a>", "documentation": { @@ -12294,8 +11280,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => t<'a>", "documentation": { "kind": "markdown", @@ -12317,8 +11301,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -12340,7 +11322,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", "documentation": { @@ -12363,8 +11344,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int, 'a) => unit", "documentation": { "kind": "markdown", @@ -12386,8 +11365,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => string", "documentation": { "kind": "markdown", @@ -12409,8 +11386,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, int) => int", "documentation": { "kind": "markdown", @@ -12432,8 +11407,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", "documentation": { "kind": "markdown", @@ -12455,8 +11428,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => t<'a>", "documentation": { "kind": "markdown", @@ -12478,8 +11449,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", "documentation": { "kind": "markdown", @@ -12501,8 +11470,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", "documentation": { "kind": "markdown", @@ -12524,8 +11491,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", "documentation": { "kind": "markdown", @@ -12547,8 +11512,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -12570,8 +11533,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => int", "documentation": { "kind": "markdown", @@ -12593,7 +11554,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", "documentation": { @@ -12616,8 +11576,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", "documentation": { "kind": "markdown", @@ -12639,8 +11597,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -12662,8 +11618,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => 'b) => t<'b>", "documentation": { "kind": "markdown", @@ -12685,8 +11639,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", "documentation": { "kind": "markdown", @@ -12708,8 +11660,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~target: int) => array<'a>", "documentation": { "kind": "markdown", @@ -12731,8 +11681,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -12754,8 +11702,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, array<'a>) => unit", "documentation": { "kind": "markdown", @@ -12777,8 +11723,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int) => option<'a>", "documentation": { "kind": "markdown", @@ -12800,8 +11744,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int, 'a) => t<'a>", "documentation": { "kind": "markdown", @@ -12823,8 +11765,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => t<'a>", "documentation": { "kind": "markdown", @@ -12846,8 +11786,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", "documentation": { "kind": "markdown", @@ -12869,8 +11807,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", "documentation": { "kind": "markdown", @@ -12892,8 +11828,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => string", "documentation": { "kind": "markdown", @@ -12915,8 +11849,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, array<'a>, int) => unit", "documentation": { "kind": "markdown", @@ -12938,8 +11870,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => unit) => unit", "documentation": { "kind": "markdown", @@ -12961,8 +11891,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -12984,8 +11912,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -13007,8 +11933,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, int) => int", "documentation": { "kind": "markdown", @@ -13030,8 +11954,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => unit", "documentation": { "kind": "markdown", @@ -13053,8 +11975,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -13095,8 +12015,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t => unit", "documentation": { "kind": "markdown", @@ -13118,8 +12036,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", "documentation": { "kind": "markdown", @@ -13141,8 +12057,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => int", "documentation": { "kind": "markdown", @@ -13164,8 +12078,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -13187,8 +12099,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -13210,8 +12120,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => t<'a>", "documentation": { "kind": "markdown", @@ -13233,8 +12141,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -13256,8 +12162,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => unit", "documentation": { "kind": "markdown", @@ -13279,8 +12183,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -13302,8 +12204,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -13325,8 +12225,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, string) => string", "documentation": { "kind": "markdown", @@ -13348,8 +12246,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => ArrayBuffer.t", "documentation": { "kind": "markdown", @@ -13371,8 +12267,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -13394,8 +12288,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => unit) => unit", "documentation": { "kind": "markdown", @@ -13417,8 +12309,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => t<'a>", "documentation": { "kind": "markdown", @@ -13440,8 +12330,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", "documentation": { "kind": "markdown", @@ -13463,8 +12351,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => int", "documentation": { "kind": "markdown", @@ -13486,7 +12372,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", "documentation": { @@ -13509,8 +12394,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -13532,8 +12415,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", "documentation": { "kind": "markdown", @@ -13555,8 +12436,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => bool", "documentation": { "kind": "markdown", @@ -13578,7 +12457,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, 'a, ~start: int) => t<'a>", "documentation": { @@ -13601,8 +12479,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => t<'a>", "documentation": { "kind": "markdown", @@ -13624,8 +12500,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -13647,7 +12521,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~start: int) => t<'a>", "documentation": { @@ -13670,8 +12543,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int, 'a) => unit", "documentation": { "kind": "markdown", @@ -13693,8 +12564,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => string", "documentation": { "kind": "markdown", @@ -13716,8 +12585,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, int) => int", "documentation": { "kind": "markdown", @@ -13739,8 +12606,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => int", "documentation": { "kind": "markdown", @@ -13762,8 +12627,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => t<'a>", "documentation": { "kind": "markdown", @@ -13785,8 +12648,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", "documentation": { "kind": "markdown", @@ -13808,8 +12669,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", "documentation": { "kind": "markdown", @@ -13831,8 +12690,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", "documentation": { "kind": "markdown", @@ -13854,8 +12711,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", @@ -13877,8 +12732,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a) => int", "documentation": { "kind": "markdown", @@ -13900,7 +12753,6 @@ Path } } ], - "data": null, "deprecated": true, "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", "documentation": { @@ -13923,8 +12775,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => bool) => bool", "documentation": { "kind": "markdown", @@ -13946,8 +12796,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", @@ -13969,8 +12817,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => 'b) => t<'b>", "documentation": { "kind": "markdown", @@ -13992,8 +12838,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", "documentation": { "kind": "markdown", @@ -14015,8 +12859,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~target: int) => array<'a>", "documentation": { "kind": "markdown", @@ -14038,8 +12880,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -14061,8 +12901,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, array<'a>) => unit", "documentation": { "kind": "markdown", @@ -14084,8 +12922,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int) => option<'a>", "documentation": { "kind": "markdown", @@ -14107,8 +12943,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, int, 'a) => t<'a>", "documentation": { "kind": "markdown", @@ -14130,8 +12964,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => t<'a>", "documentation": { "kind": "markdown", @@ -14153,8 +12985,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", "documentation": { "kind": "markdown", @@ -14176,8 +13006,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => bool", "documentation": { "kind": "markdown", @@ -14199,8 +13027,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => string", "documentation": { "kind": "markdown", @@ -14222,8 +13048,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, array<'a>, int) => unit", "documentation": { "kind": "markdown", @@ -14245,8 +13069,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a => unit) => unit", "documentation": { "kind": "markdown", @@ -14268,8 +13090,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, ('a, int) => bool) => option<'a>", "documentation": { "kind": "markdown", @@ -14291,8 +13111,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", "documentation": { "kind": "markdown", @@ -14314,8 +13132,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'a>, 'a, int) => int", "documentation": { "kind": "markdown", @@ -14337,8 +13153,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => unit", "documentation": { "kind": "markdown", @@ -14360,8 +13174,6 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t<'a> => int", "documentation": { "kind": "markdown", diff --git a/tests/analysis_tests/tests/src/expected/Debug.res.txt b/tests/analysis_tests/tests/src/expected/Debug.res.txt index fbceb5a80af..53064946e9a 100644 --- a/tests/analysis_tests/tests/src/expected/Debug.res.txt +++ b/tests/analysis_tests/tests/src/expected/Debug.res.txt @@ -18,7 +18,6 @@ ContextPath Value[eqN] Path eqN [ { - "data": null, "deprecated": true, "detail": "('a, nullable<'a>) => bool", "documentation": { @@ -30,7 +29,6 @@ Path eqN "tags": [ 1 ] }, { - "data": null, "deprecated": true, "detail": "('a, null<'a>) => bool", "documentation": { diff --git a/tests/analysis_tests/tests/src/expected/Destructuring.res.txt b/tests/analysis_tests/tests/src/expected/Destructuring.res.txt index 7aac4317e02..ef93ff42af2 100644 --- a/tests/analysis_tests/tests/src/expected/Destructuring.res.txt +++ b/tests/analysis_tests/tests/src/expected/Destructuring.res.txt @@ -7,8 +7,6 @@ ContextPath Value[x] Path x [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -29,8 +27,6 @@ ContextPath Value[x] Path x [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -41,8 +37,6 @@ Path x "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -65,8 +59,6 @@ ContextPath Value[x] Path x [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -89,8 +81,6 @@ ContextPath Value[x] Path x [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -101,8 +91,6 @@ Path x "tags": [] }, { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -123,8 +111,6 @@ ContextPath Value[x] Path x [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -135,8 +121,6 @@ Path x "tags": [] }, { - "data": null, - "deprecated": false, "detail": "option", "documentation": { "kind": "markdown", diff --git a/tests/analysis_tests/tests/src/expected/Div.res.txt b/tests/analysis_tests/tests/src/expected/Div.res.txt index 9dc155760cb..bad98fff5d0 100644 --- a/tests/analysis_tests/tests/src/expected/Div.res.txt +++ b/tests/analysis_tests/tests/src/expected/Div.res.txt @@ -11,10 +11,7 @@ Path ReactDOM.domProps Path JsxDOM.domProps [ { - "data": null, - "deprecated": false, "detail": "{\"__html\": string}", - "documentation": { "kind": "markdown", "value": "" }, "kind": 4, "label": "dangerouslySetInnerHTML", "tags": [] diff --git a/tests/analysis_tests/tests/src/expected/DotPipeCompleteFromCurrentModule.res.txt b/tests/analysis_tests/tests/src/expected/DotPipeCompleteFromCurrentModule.res.txt index 43bbf0c5b92..edf1be3fb1a 100644 --- a/tests/analysis_tests/tests/src/expected/DotPipeCompleteFromCurrentModule.res.txt +++ b/tests/analysis_tests/tests/src/expected/DotPipeCompleteFromCurrentModule.res.txt @@ -27,10 +27,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "X.t => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->z", "kind": 12, "label": "->z", diff --git a/tests/analysis_tests/tests/src/expected/DotPipeCompletionSpec.res.txt b/tests/analysis_tests/tests/src/expected/DotPipeCompletionSpec.res.txt index 39d67a6d1da..6e5b64bb4bf 100644 --- a/tests/analysis_tests/tests/src/expected/DotPipeCompletionSpec.res.txt +++ b/tests/analysis_tests/tests/src/expected/DotPipeCompletionSpec.res.txt @@ -15,8 +15,6 @@ Path SomeModule. Path [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -36,10 +34,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(~name: string=?, t) => unit", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeModule.withUnlabelledArgumentNotFirst", "kind": 12, "label": "->SomeModule.withUnlabelledArgumentNotFirst", @@ -56,10 +51,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeModule.getName", "kind": 12, "label": "->SomeModule.getName", @@ -87,8 +79,6 @@ Path DotPipeCompletionSpec.SomeOtherModule. Path [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -108,10 +98,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeOtherModule.getNName", "kind": 12, "label": "->SomeOtherModule.getNName", @@ -128,10 +115,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeOtherModule.getNName2", "kind": 12, "label": "->SomeOtherModule.getNName2", @@ -148,10 +132,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->CompleteFromThisToo.a", "kind": 12, "label": "->CompleteFromThisToo.a", @@ -168,10 +149,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeOtherModule.getNName", "kind": 12, "label": "->SomeOtherModule.getNName", @@ -188,10 +166,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeOtherModule.getNName2", "kind": 12, "label": "->SomeOtherModule.getNName2", @@ -208,10 +183,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->doWithTypeOutsideModule", "kind": 12, "label": "->doWithTypeOutsideModule", @@ -247,10 +219,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "a => unit", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->A.withA", "kind": 12, "label": "->A.withA", @@ -267,10 +236,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "A.a => int", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->B.b", "kind": 12, "label": "->B.b", @@ -296,8 +262,6 @@ Path CompletionFromModule.SomeModule. Path [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -317,10 +281,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->CompletionFromModule.SomeModule.getName", "kind": 12, "label": "->CompletionFromModule.SomeModule.getName", @@ -355,8 +316,6 @@ Path u } } ], - "data": null, - "deprecated": false, "detail": "(array<'a>, array<'a>) => unit", "documentation": { "kind": "markdown", @@ -378,8 +337,6 @@ Path u } } ], - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a) => unit", "documentation": { "kind": "markdown", @@ -401,7 +358,6 @@ Path u } } ], - "data": null, "deprecated": true, "detail": "(array<'a>, int) => 'a", "documentation": { @@ -424,8 +380,6 @@ Path u } } ], - "data": null, - "deprecated": false, "detail": "array<('a, 'b)> => (t<'a>, array<'b>)", "documentation": { "kind": "markdown", @@ -457,8 +411,6 @@ Path DotPipeCompletionSpec.SomeOtherModule. Path [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -478,10 +430,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->doWithTypeOutsideModule", "kind": 12, "label": "->doWithTypeOutsideModule", @@ -498,10 +447,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeOtherModule.getNName", "kind": 12, "label": "->SomeOtherModule.getNName", @@ -518,10 +464,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeOtherModule.getNName2", "kind": 12, "label": "->SomeOtherModule.getNName2", @@ -538,10 +481,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->doWithTypeOutsideModule", "kind": 12, "label": "->doWithTypeOutsideModule", @@ -579,8 +519,6 @@ Path filt } } ], - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a => option<'b>) => array<'b>", "documentation": { "kind": "markdown", @@ -602,8 +540,6 @@ Path filt } } ], - "data": null, - "deprecated": false, "detail": "(array<'a>, ('a, int) => option<'b>) => array<'b>", "documentation": { "kind": "markdown", @@ -625,8 +561,6 @@ Path filt } } ], - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a => bool) => array<'a>", "documentation": { "kind": "markdown", @@ -648,8 +582,6 @@ Path filt } } ], - "data": null, - "deprecated": false, "detail": "(array<'a>, ('a, int) => bool) => array<'a>", "documentation": { "kind": "markdown", @@ -691,8 +623,6 @@ Path includ } } ], - "data": null, - "deprecated": false, "detail": "(string, string) => bool", "documentation": { "kind": "markdown", @@ -714,8 +644,6 @@ Path includ } } ], - "data": null, - "deprecated": false, "detail": "(string, string, int) => bool", "documentation": { "kind": "markdown", @@ -756,8 +684,6 @@ Path toUpperCa } } ], - "data": null, - "deprecated": false, "detail": "string => string", "documentation": { "kind": "markdown", @@ -798,8 +724,6 @@ Path toLowerC } } ], - "data": null, - "deprecated": false, "detail": "string => string", "documentation": { "kind": "markdown", @@ -832,8 +756,6 @@ Path DotPipeCompletionSpec.SomeOtherModule. Path [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -853,10 +775,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->doWithTypeOutsideModule", "kind": 12, "label": "->doWithTypeOutsideModule", @@ -873,10 +792,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "t => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeOtherModule.getNName", "kind": 12, "label": "->SomeOtherModule.getNName", @@ -893,10 +809,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->SomeOtherModule.getNName2", "kind": 12, "label": "->SomeOtherModule.getNName2", @@ -913,10 +826,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "typeOutsideModule => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->doWithTypeOutsideModule", "kind": 12, "label": "->doWithTypeOutsideModule", @@ -938,9 +848,7 @@ Path Dot "modulePath": "DotPipeCompleteFromCurrentModule", "filePath": "src/DotPipeCompletionSpec.res" }, - "deprecated": false, "detail": "module DotPipeCompleteFromCurrentModule", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "DotPipeCompleteFromCurrentModule", "tags": [] @@ -950,9 +858,7 @@ Path Dot "modulePath": "DotPipeCompletionSpec", "filePath": "src/DotPipeCompletionSpec.res" }, - "deprecated": false, "detail": "module DotPipeCompletionSpec", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "DotPipeCompletionSpec", "tags": [] @@ -974,9 +880,7 @@ Path CompletionPipe "modulePath": "CompletionPipeChain", "filePath": "src/DotPipeCompletionSpec.res" }, - "deprecated": false, "detail": "module CompletionPipeChain", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "CompletionPipeChain", "tags": [] @@ -986,9 +890,7 @@ Path CompletionPipe "modulePath": "CompletionPipeProperty", "filePath": "src/DotPipeCompletionSpec.res" }, - "deprecated": false, "detail": "module CompletionPipeProperty", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "CompletionPipeProperty", "tags": [] @@ -998,9 +900,7 @@ Path CompletionPipe "modulePath": "CompletionPipeSubmodules", "filePath": "src/DotPipeCompletionSpec.res" }, - "deprecated": false, "detail": "module CompletionPipeSubmodules", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "CompletionPipeSubmodules", "tags": [] @@ -1022,9 +922,7 @@ Path Dot "modulePath": "DotPipeCompleteFromCurrentModule", "filePath": "src/DotPipeCompletionSpec.res" }, - "deprecated": false, "detail": "module DotPipeCompleteFromCurrentModule", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "DotPipeCompleteFromCurrentModule", "tags": [] @@ -1034,9 +932,7 @@ Path Dot "modulePath": "DotPipeCompletionSpec", "filePath": "src/DotPipeCompletionSpec.res" }, - "deprecated": false, "detail": "module DotPipeCompletionSpec", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "DotPipeCompletionSpec", "tags": [] @@ -1066,10 +962,7 @@ Path someObj } } ], - "data": null, - "deprecated": false, "detail": "{\"age\": int, \"name\": string}", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "[\"age\"]", "kind": 4, "label": "[\"age\"]", @@ -1085,10 +978,7 @@ Path someObj } } ], - "data": null, - "deprecated": false, "detail": "{\"age\": int, \"name\": string}", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "[\"name\"]", "kind": 4, "label": "[\"name\"]", @@ -1119,10 +1009,7 @@ Path someObj } } ], - "data": null, - "deprecated": false, "detail": "{\"age\": int, \"name\": string}", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "[\"name\"]", "kind": 4, "label": "[\"name\"]", @@ -1148,8 +1035,6 @@ Path DotPipeCompletionSpec.HTMLButtonElement. Path [ { - "data": null, - "deprecated": false, "detail": "bool", "documentation": { "kind": "markdown", @@ -1169,10 +1054,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "DOMAPI.htmlButtonElement => bool", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->HTMLButtonElement.checkValidity", "kind": 12, "label": "->HTMLButtonElement.checkValidity", diff --git a/tests/analysis_tests/tests/src/expected/EnvCompletion.res.txt b/tests/analysis_tests/tests/src/expected/EnvCompletion.res.txt index ebc1978fd36..984700667e5 100644 --- a/tests/analysis_tests/tests/src/expected/EnvCompletion.res.txt +++ b/tests/analysis_tests/tests/src/expected/EnvCompletion.res.txt @@ -7,8 +7,6 @@ ContextPath Value[res] Path res [ { - "data": null, - "deprecated": false, "detail": "Okay('a)", "documentation": { "kind": "markdown", @@ -21,8 +19,6 @@ Path res "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Failure('b)", "documentation": { "kind": "markdown", @@ -48,8 +44,6 @@ ContextPath Value[res] Path res [ { - "data": null, - "deprecated": false, "detail": "One", "documentation": { "kind": "markdown", @@ -62,8 +56,6 @@ Path res "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Two", "documentation": { "kind": "markdown", @@ -89,10 +81,7 @@ ContextPath Value[res] Path res [ { - "data": null, - "deprecated": false, "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "\"$0\"", "insertTextFormat": 2, "kind": 12, @@ -112,8 +101,6 @@ ContextPath Value[use] Path use [ { - "data": null, - "deprecated": false, "detail": "EnvCompletionOtherFile.response", "documentation": { "kind": "markdown", @@ -138,8 +125,6 @@ ContextPath Value[use] Path use [ { - "data": null, - "deprecated": false, "detail": "theVariant", "documentation": { "kind": "markdown", @@ -150,8 +135,6 @@ Path use "tags": [] }, { - "data": null, - "deprecated": false, "detail": "someResult", "documentation": { "kind": "markdown", @@ -173,8 +156,6 @@ ContextPath Value[use] Path use [ { - "data": null, - "deprecated": false, "detail": "First", "documentation": { "kind": "markdown", @@ -187,8 +168,6 @@ Path use "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Second(r1)", "documentation": { "kind": "markdown", @@ -216,8 +195,6 @@ ContextPath Value[use] Path use [ { - "data": null, - "deprecated": false, "detail": "r1", "documentation": { "kind": "markdown", @@ -245,8 +222,6 @@ ContextPath Value[use] Path use [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -268,8 +243,6 @@ ContextPath Value[use] Path use [ { - "data": null, - "deprecated": false, "detail": "Okay('a)", "documentation": { "kind": "markdown", @@ -282,8 +255,6 @@ Path use "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Failure('b)", "documentation": { "kind": "markdown", @@ -311,8 +282,6 @@ ContextPath Value[use] Path use [ { - "data": null, - "deprecated": false, "detail": "First", "documentation": { "kind": "markdown", @@ -325,8 +294,6 @@ Path use "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Second(r1)", "documentation": { "kind": "markdown", @@ -356,8 +323,6 @@ ContextPath Value[use] Path use [ { - "data": null, - "deprecated": false, "detail": "r1", "documentation": { "kind": "markdown", @@ -387,8 +352,6 @@ ContextPath Value[use] Path use [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -409,8 +372,6 @@ ContextPath Value[res2] Path res2 [ { - "data": null, - "deprecated": false, "detail": "EnvCompletionOtherFile.someRecord", "documentation": { "kind": "markdown", @@ -434,8 +395,6 @@ ContextPath Value[res2] Path res2 [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -446,8 +405,6 @@ Path res2 "tags": [] }, { - "data": null, - "deprecated": false, "detail": "'thing", "documentation": { "kind": "markdown", @@ -458,8 +415,6 @@ Path res2 "tags": [] }, { - "data": null, - "deprecated": false, "detail": "theVariant", "documentation": { "kind": "markdown", @@ -480,8 +435,6 @@ ContextPath Value[res2] Path res2 [ { - "data": null, - "deprecated": false, "detail": "Four", "documentation": { "kind": "markdown", @@ -494,8 +447,6 @@ Path res2 "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Five", "documentation": { "kind": "markdown", @@ -518,8 +469,6 @@ ContextPath Value[res2] Path res2 [ { - "data": null, - "deprecated": false, "detail": "First", "documentation": { "kind": "markdown", @@ -532,8 +481,6 @@ Path res2 "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Second(r1)", "documentation": { "kind": "markdown", diff --git a/tests/analysis_tests/tests/src/expected/ExhaustiveSwitch.res.txt b/tests/analysis_tests/tests/src/expected/ExhaustiveSwitch.res.txt index 4088bf3e27d..06be72e9529 100644 --- a/tests/analysis_tests/tests/src/expected/ExhaustiveSwitch.res.txt +++ b/tests/analysis_tests/tests/src/expected/ExhaustiveSwitch.res.txt @@ -7,8 +7,6 @@ ContextPath Value[withSomeVarian] Path withSomeVarian [ { - "data": null, - "deprecated": false, "detail": "someVariant", "documentation": { "kind": "markdown", @@ -19,10 +17,7 @@ Path withSomeVarian "tags": [] }, { - "data": null, - "deprecated": false, "detail": "insert exhaustive switch for value", - "documentation": { "kind": "markdown", "value": "" }, "filterText": "withSomeVariant", "insertText": "withSomeVariant {\n | One => ${1:%todo}\n | Two => ${2:%todo}\n | Three(_) => ${3:%todo}\n }", "insertTextFormat": 2, @@ -41,19 +36,13 @@ ContextPath Value[withSomePol] Path withSomePol [ { - "data": null, - "deprecated": false, "detail": "somePolyVariant", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "withSomePoly", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "insert exhaustive switch for value", - "documentation": { "kind": "markdown", "value": "" }, "filterText": "withSomePoly", "insertText": "withSomePoly {\n | #\"switch\" => ${1:%todo}\n | #one => ${2:%todo}\n | #three(_) => ${3:%todo}\n | #two => ${4:%todo}\n | #\"exotic ident\" => ${5:%todo}\n }", "insertTextFormat": 2, @@ -71,20 +60,9 @@ Resolved opens 1 Stdlib ContextPath Value[someBoo] Path someBoo [ + { "detail": "bool", "kind": 12, "label": "someBool", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "someBool", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "insert exhaustive switch for value", - "documentation": { "kind": "markdown", "value": "" }, "filterText": "someBool", "insertText": "someBool {\n | true => ${1:%todo}\n | false => ${2:%todo}\n }", "insertTextFormat": 2, @@ -102,20 +80,9 @@ Resolved opens 1 Stdlib ContextPath Value[someOp] Path someOp [ + { "detail": "option", "kind": 12, "label": "someOpt", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "option", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "someOpt", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "insert exhaustive switch for value", - "documentation": { "kind": "markdown", "value": "" }, "filterText": "someOpt", "insertText": "someOpt {\n | Some($1) => ${2:%todo}\n | None => ${3:%todo}\n }", "insertTextFormat": 2, @@ -202,8 +169,6 @@ ContextPath Value[withSomeVarian] Path withSomeVarian [ { - "data": null, - "deprecated": false, "detail": "someVariant", "documentation": { "kind": "markdown", @@ -214,10 +179,7 @@ Path withSomeVarian "tags": [] }, { - "data": null, - "deprecated": false, "detail": "insert exhaustive switch for value", - "documentation": { "kind": "markdown", "value": "" }, "filterText": "withSomeVariant", "insertText": "withSomeVariant {\n | One => ${1:%todo}\n | Two => ${2:%todo}\n | Three(_) => ${3:%todo}\n }", "insertTextFormat": 2, diff --git a/tests/analysis_tests/tests/src/expected/Firebase.res.txt b/tests/analysis_tests/tests/src/expected/Firebase.res.txt index 9a57d461021..65b15690df0 100644 --- a/tests/analysis_tests/tests/src/expected/Firebase.res.txt +++ b/tests/analysis_tests/tests/src/expected/Firebase.res.txt @@ -16,8 +16,6 @@ Path Firebase.Firestore. Path [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -28,8 +26,6 @@ Path "tags": [] }, { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -49,10 +45,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "documentReference<\n 'documentdata,\n> => Promise.t>", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->Firestore.getDoc", "kind": 12, "label": "->Firestore.getDoc", diff --git a/tests/analysis_tests/tests/src/expected/FirstClassModules.res.txt b/tests/analysis_tests/tests/src/expected/FirstClassModules.res.txt index 11f40d8c5f7..34efeb08337 100644 --- a/tests/analysis_tests/tests/src/expected/FirstClassModules.res.txt +++ b/tests/analysis_tests/tests/src/expected/FirstClassModules.res.txt @@ -18,18 +18,8 @@ Resolved opens 1 Stdlib ContextPath Value[SomeModule, ""] Path SomeModule. [ + { "detail": "module Inner", "kind": 9, "label": "Inner", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "module Inner", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 9, - "label": "Inner", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "type t", "documentation": { "kind": "markdown", @@ -39,29 +29,10 @@ Path SomeModule. "label": "t", "tags": [] }, + { "detail": "t => int", "kind": 12, "label": "foo", "tags": [] }, + { "detail": "string => unit", "kind": 12, "label": "doStuff", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "t => int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "foo", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "string => unit", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "doStuff", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "string => unit", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "doOtherStuff", "tags": [] @@ -91,8 +62,6 @@ ContextPath Value[M, ""] Path M. [ { - "data": null, - "deprecated": false, "detail": "type t", "documentation": { "kind": "markdown", @@ -102,20 +71,9 @@ Path M. "label": "t", "tags": [] }, + { "detail": "t => string", "kind": 12, "label": "getName", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "t => string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "getName", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "unit => string", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "thisShouldNotBeCompletedFor", "tags": [] @@ -135,17 +93,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[M, g] Path M.g -[ - { - "data": null, - "deprecated": false, - "detail": "t => string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "getName", - "tags": [] - } -] +[ { "detail": "t => string", "kind": 12, "label": "getName", "tags": [] } ] Complete src/FirstClassModules.res 32:8 posCursor:[32:8] posNoWhite:[32:7] Found expr:[30:22->35:1] @@ -159,18 +107,8 @@ Resolved opens 1 Stdlib ContextPath Value[S2, ""] Path S2. [ + { "detail": "module Inner", "kind": 9, "label": "Inner", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "module Inner", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 9, - "label": "Inner", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "type t", "documentation": { "kind": "markdown", @@ -180,29 +118,10 @@ Path S2. "label": "t", "tags": [] }, + { "detail": "t => int", "kind": 12, "label": "foo", "tags": [] }, + { "detail": "string => unit", "kind": 12, "label": "doStuff", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "t => int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "foo", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "string => unit", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "doStuff", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "string => unit", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "doOtherStuff", "tags": [] @@ -218,18 +137,8 @@ Resolved opens 1 Stdlib ContextPath Value[X, ""] Path X. [ + { "detail": "module Inner", "kind": 9, "label": "Inner", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "module Inner", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 9, - "label": "Inner", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "type t", "documentation": { "kind": "markdown", @@ -239,29 +148,10 @@ Path X. "label": "t", "tags": [] }, + { "detail": "t => int", "kind": 12, "label": "foo", "tags": [] }, + { "detail": "string => unit", "kind": 12, "label": "doStuff", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "t => int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "foo", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "string => unit", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "doStuff", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "string => unit", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "doOtherStuff", "tags": [] @@ -288,18 +178,8 @@ Resolved opens 1 Stdlib ContextPath Value[SomeModule, ""] Path SomeModule. [ + { "detail": "module Inner", "kind": 9, "label": "Inner", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "module Inner", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 9, - "label": "Inner", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "type t", "documentation": { "kind": "markdown", @@ -309,29 +189,10 @@ Path SomeModule. "label": "t", "tags": [] }, + { "detail": "t => int", "kind": 12, "label": "foo", "tags": [] }, + { "detail": "string => unit", "kind": 12, "label": "doStuff", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "t => int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "foo", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "string => unit", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "doStuff", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "string => unit", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "doOtherStuff", "tags": [] @@ -352,18 +213,8 @@ Resolved opens 1 Stdlib ContextPath Value[SomeModule, ""] Path SomeModule. [ + { "detail": "module Inner", "kind": 9, "label": "Inner", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "module Inner", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 9, - "label": "Inner", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "type t", "documentation": { "kind": "markdown", @@ -373,29 +224,10 @@ Path SomeModule. "label": "t", "tags": [] }, + { "detail": "t => int", "kind": 12, "label": "foo", "tags": [] }, + { "detail": "string => unit", "kind": 12, "label": "doStuff", "tags": [] }, { - "data": null, - "deprecated": false, - "detail": "t => int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "foo", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "string => unit", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "doStuff", - "tags": [] - }, - { - "data": null, - "deprecated": false, "detail": "string => unit", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "doOtherStuff", "tags": [] diff --git a/tests/analysis_tests/tests/src/expected/Hover.res.txt b/tests/analysis_tests/tests/src/expected/Hover.res.txt index f9e5a125fd2..34120153e1c 100644 --- a/tests/analysis_tests/tests/src/expected/Hover.res.txt +++ b/tests/analysis_tests/tests/src/expected/Hover.res.txt @@ -246,8 +246,6 @@ Path Hover. Path [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -290,8 +288,6 @@ Path Hover. Path [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -334,8 +330,6 @@ Path Hover. Path [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -378,8 +372,6 @@ Path Hover. Path [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", diff --git a/tests/analysis_tests/tests/src/expected/IncludeModuleCompletion.res.txt b/tests/analysis_tests/tests/src/expected/IncludeModuleCompletion.res.txt index add8389304e..231cb223563 100644 --- a/tests/analysis_tests/tests/src/expected/IncludeModuleCompletion.res.txt +++ b/tests/analysis_tests/tests/src/expected/IncludeModuleCompletion.res.txt @@ -26,10 +26,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "Types.context => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->blah", "kind": 12, "label": "->blah", @@ -46,10 +43,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(Types.context, array) => 't", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->add", "kind": 12, "label": "->add", @@ -66,10 +60,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(Types.context, Types.vec2) => Types.comp", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->addPosFromVec2", "kind": 12, "label": "->addPosFromVec2", @@ -86,10 +77,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(Types.context, float, float) => Types.comp", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->addPos", "kind": 12, "label": "->addPos", @@ -110,28 +98,19 @@ ContextPath Value[add] Path add [ { - "data": null, - "deprecated": false, "detail": "(Types.context, array) => 't", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "add", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(Types.context, Types.vec2) => Types.comp", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "addPosFromVec2", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(Types.context, float, float) => Types.comp", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "addPos", "tags": [] @@ -149,19 +128,13 @@ ContextPath Value[add] Path add [ { - "data": null, - "deprecated": false, "detail": "(Types.context, Types.vec2) => Types.comp", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "addPosFromVec2", "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(Types.context, float, float) => Types.comp", - "documentation": { "kind": "markdown", "value": "" }, "kind": 12, "label": "addPos", "tags": [] @@ -196,10 +169,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "Types.context => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->blah", "kind": 12, "label": "->blah", @@ -216,10 +186,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(Types.context, array) => 't", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->add", "kind": 12, "label": "->add", @@ -236,10 +203,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(Types.context, string) => Types.comp", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->addSprite", "kind": 12, "label": "->addSprite", @@ -256,10 +220,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(Types.context, Types.vec2) => Types.comp", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->addPosFromVec2", "kind": 12, "label": "->addPosFromVec2", @@ -276,10 +237,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(Types.context, float, float) => Types.comp", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->addPos", "kind": 12, "label": "->addPos", @@ -313,10 +271,7 @@ Path l } } ], - "data": null, - "deprecated": false, "detail": "int => string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->lex", "kind": 12, "label": "->lex", @@ -333,15 +288,5 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[l] Path l -[ - { - "data": null, - "deprecated": false, - "detail": "int => string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "lex", - "tags": [] - } -] +[ { "detail": "int => string", "kind": 12, "label": "lex", "tags": [] } ] diff --git a/tests/analysis_tests/tests/src/expected/Jsx2.res.txt b/tests/analysis_tests/tests/src/expected/Jsx2.res.txt index 62eb0923735..de0ac1c3bb8 100644 --- a/tests/analysis_tests/tests/src/expected/Jsx2.res.txt +++ b/tests/analysis_tests/tests/src/expected/Jsx2.res.txt @@ -25,24 +25,8 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make [ - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "first", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "option", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "fun", - "tags": [] - } + { "detail": "string", "kind": 4, "label": "first", "tags": [] }, + { "detail": "option", "kind": 4, "label": "fun", "tags": [] } ] Complete src/Jsx2.res 14:13 @@ -54,38 +38,12 @@ Resolved opens 1 Stdlib ContextPath Module[M] Path M [ - { - "data": null, - "deprecated": false, - "detail": "module M", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 9, - "label": "M", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "module Math", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 9, - "label": "Math", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "module Map", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 9, - "label": "Map", - "tags": [] - }, + { "detail": "module M", "kind": 9, "label": "M", "tags": [] }, + { "detail": "module Math", "kind": 9, "label": "Math", "tags": [] }, + { "detail": "module Map", "kind": 9, "label": "Map", "tags": [] }, { "data": { "modulePath": "ModuleStuff", "filePath": "src/Jsx2.res" }, - "deprecated": false, "detail": "module ModuleStuff", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "ModuleStuff", "tags": [] @@ -99,17 +57,7 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[ - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "key", - "tags": [] - } -] +[ { "detail": "string", "kind": 4, "label": "key", "tags": [] } ] Complete src/Jsx2.res 25:17 posCursor:[25:17] posNoWhite:[25:16] Found expr:[25:3->25:17] @@ -118,17 +66,7 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[ - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "key", - "tags": [] - } -] +[ { "detail": "string", "kind": 4, "label": "key", "tags": [] } ] Complete src/Jsx2.res 28:21 posCursor:[28:21] posNoWhite:[28:20] Found expr:[28:3->28:21] @@ -137,17 +75,7 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[ - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "key", - "tags": [] - } -] +[ { "detail": "string", "kind": 4, "label": "key", "tags": [] } ] Complete src/Jsx2.res 31:24 posCursor:[31:24] posNoWhite:[31:23] Found expr:[31:3->31:24] @@ -156,17 +84,7 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[ - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "key", - "tags": [] - } -] +[ { "detail": "string", "kind": 4, "label": "key", "tags": [] } ] Complete src/Jsx2.res 34:18 posCursor:[34:18] posNoWhite:[34:17] Found expr:[34:3->34:18] @@ -175,17 +93,7 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[ - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "key", - "tags": [] - } -] +[ { "detail": "string", "kind": 4, "label": "key", "tags": [] } ] Complete src/Jsx2.res 37:16 posCursor:[37:16] posNoWhite:[37:15] Found expr:[37:3->37:16] @@ -194,17 +102,7 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[ - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "key", - "tags": [] - } -] +[ { "detail": "string", "kind": 4, "label": "key", "tags": [] } ] Complete src/Jsx2.res 40:17 posCursor:[40:17] posNoWhite:[40:16] Found expr:[40:3->40:17] @@ -213,17 +111,7 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[ - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "key", - "tags": [] - } -] +[ { "detail": "string", "kind": 4, "label": "key", "tags": [] } ] Complete src/Jsx2.res 43:18 posCursor:[43:18] posNoWhite:[43:17] Found expr:[43:3->43:18] @@ -232,17 +120,7 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[ - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "key", - "tags": [] - } -] +[ { "detail": "string", "kind": 4, "label": "key", "tags": [] } ] Complete src/Jsx2.res 46:16 posCursor:[46:16] posNoWhite:[46:15] Found expr:[46:3->46:16] @@ -251,17 +129,7 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[ - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "key", - "tags": [] - } -] +[ { "detail": "string", "kind": 4, "label": "key", "tags": [] } ] Complete src/Jsx2.res 49:27 posCursor:[49:27] posNoWhite:[49:26] Found expr:[49:3->49:27] @@ -270,17 +138,7 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[ - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "key", - "tags": [] - } -] +[ { "detail": "string", "kind": 4, "label": "key", "tags": [] } ] Complete src/Jsx2.res 52:38 posCursor:[52:38] posNoWhite:[52:37] Found expr:[52:3->52:38] @@ -289,17 +147,7 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[ - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "key", - "tags": [] - } -] +[ { "detail": "string", "kind": 4, "label": "key", "tags": [] } ] Complete src/Jsx2.res 55:25 posCursor:[55:25] posNoWhite:[55:24] Found expr:[55:3->55:25] @@ -308,17 +156,7 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[ - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "key", - "tags": [] - } -] +[ { "detail": "string", "kind": 4, "label": "key", "tags": [] } ] Definition src/Jsx2.res 58:11 { @@ -336,17 +174,7 @@ Completable: Cjsx([Ext], al, [al]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path Ext.make -[ - { - "data": null, - "deprecated": false, - "detail": "option", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "align", - "tags": [] - } -] +[ { "detail": "option", "kind": 4, "label": "align", "tags": [] } ] Complete src/Jsx2.res 71:11 posCursor:[71:11] posNoWhite:[71:10] Found expr:[71:3->71:11] @@ -364,17 +192,7 @@ Completable: Cjsx([M], k, [first, k]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[ - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "key", - "tags": [] - } -] +[ { "detail": "string", "kind": 4, "label": "key", "tags": [] } ] Complete src/Jsx2.res 77:23 posCursor:[77:23] posNoWhite:[77:22] Found expr:[77:3->77:23] @@ -383,17 +201,7 @@ Completable: Cjsx([M], k, [first, k]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M.make -[ - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "key", - "tags": [] - } -] +[ { "detail": "string", "kind": 4, "label": "key", "tags": [] } ] Complete src/Jsx2.res 80:6 posCursor:[80:6] posNoWhite:[80:5] Found expr:[80:3->85:69] @@ -414,10 +222,7 @@ ContextPath Module[WithChildren] Path WithChildren [ { - "data": null, - "deprecated": false, "detail": "module WithChildren", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "WithChildren", "tags": [] @@ -431,17 +236,7 @@ Completable: Cjsx([WithChildren], n, [n]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path WithChildren.make -[ - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "name", - "tags": [] - } -] +[ { "detail": "string", "kind": 4, "label": "name", "tags": [] } ] Complete src/Jsx2.res 94:18 posCursor:[94:18] posNoWhite:[94:17] Found pattern:[94:7->94:18] @@ -454,8 +249,6 @@ ContextPath Type[React, e] Path React.e [ { - "data": null, - "deprecated": false, "detail": "type element", "documentation": { "kind": "markdown", @@ -499,17 +292,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[DefineSomeFields, ""] Path DefineSomeFields. -[ - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "thisValue", - "tags": [] - } -] +[ { "detail": "int", "kind": 12, "label": "thisValue", "tags": [] } ] Complete src/Jsx2.res 108:36 posCursor:[108:36] posNoWhite:[108:35] Found expr:[108:11->108:36] @@ -523,8 +306,6 @@ ContextPath Module[DefineSomeFields].th Path DefineSomeFields.th [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -535,8 +316,6 @@ Path DefineSomeFields.th "tags": [] }, { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -558,17 +337,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[Outer, Inner, h] Path Outer.Inner.h -[ - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "hello", - "tags": [] - } -] +[ { "detail": "int", "kind": 12, "label": "hello", "tags": [] } ] Complete src/Jsx2.res 129:19 posCursor:[129:19] posNoWhite:[129:18] Found expr:[128:2->131:9] @@ -580,17 +349,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Value[Outer, Inner, ""] Path Outer.Inner. -[ - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "hello", - "tags": [] - } -] +[ { "detail": "int", "kind": 12, "label": "hello", "tags": [] } ] Complete src/Jsx2.res 136:7 posCursor:[136:7] posNoWhite:[136:6] Found expr:[135:2->138:9] @@ -603,10 +362,7 @@ Path ReactDOM.domProps Path JsxDOM.domProps [ { - "data": null, - "deprecated": false, "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "{\"$0\"}", "insertTextFormat": 2, "kind": 12, @@ -624,17 +380,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Module[Nested, Co] Path Nested.Co -[ - { - "data": null, - "deprecated": false, - "detail": "module Comp", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 9, - "label": "Comp", - "tags": [] - } -] +[ { "detail": "module Comp", "kind": 9, "label": "Comp", "tags": [] } ] Complete src/Jsx2.res 153:19 posCursor:[153:19] posNoWhite:[153:18] Found expr:[153:11->153:25] @@ -644,17 +390,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib ContextPath Module[Nested, ""] Path Nested. -[ - { - "data": null, - "deprecated": false, - "detail": "module Comp", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 9, - "label": "Comp", - "tags": [] - } -] +[ { "detail": "module Comp", "kind": 9, "label": "Comp", "tags": [] } ] Hover src/Jsx2.res 162:12 { diff --git a/tests/analysis_tests/tests/src/expected/Jsx2.resi.txt b/tests/analysis_tests/tests/src/expected/Jsx2.resi.txt index 86601cdb5e8..027b2ab45ad 100644 --- a/tests/analysis_tests/tests/src/expected/Jsx2.resi.txt +++ b/tests/analysis_tests/tests/src/expected/Jsx2.resi.txt @@ -19,8 +19,6 @@ ContextPath Type[React, e] Path React.e [ { - "data": null, - "deprecated": false, "detail": "type element", "documentation": { "kind": "markdown", @@ -42,8 +40,6 @@ ContextPath Type[React, e] Path React.e [ { - "data": null, - "deprecated": false, "detail": "type element", "documentation": { "kind": "markdown", diff --git a/tests/analysis_tests/tests/src/expected/JsxV4.res.txt b/tests/analysis_tests/tests/src/expected/JsxV4.res.txt index 70fffee94dd..fc75beafb13 100644 --- a/tests/analysis_tests/tests/src/expected/JsxV4.res.txt +++ b/tests/analysis_tests/tests/src/expected/JsxV4.res.txt @@ -14,17 +14,7 @@ Completable: Cjsx([M4], f, [first, f]) Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path M4.make -[ - { - "data": null, - "deprecated": false, - "detail": "option", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "fun", - "tags": [] - } -] +[ { "detail": "option", "kind": 4, "label": "fun", "tags": [] } ] Hover src/JsxV4.res 14:9 { diff --git a/tests/analysis_tests/tests/src/expected/RecordCompletion.res.txt b/tests/analysis_tests/tests/src/expected/RecordCompletion.res.txt index 6d71c563b2c..1e255e44057 100644 --- a/tests/analysis_tests/tests/src/expected/RecordCompletion.res.txt +++ b/tests/analysis_tests/tests/src/expected/RecordCompletion.res.txt @@ -18,8 +18,6 @@ Path ArrayUtils.m Path m [ { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a => 'b) => array<'b>", "documentation": { "kind": "markdown", @@ -30,8 +28,6 @@ Path m "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, ('a, int) => 'b) => array<'b>", "documentation": { "kind": "markdown", @@ -77,8 +73,6 @@ Path ArrayUtils.m Path m [ { - "data": null, - "deprecated": false, "detail": "(array<'a>, 'a => 'b) => array<'b>", "documentation": { "kind": "markdown", @@ -89,8 +83,6 @@ Path m "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(array<'a>, ('a, int) => 'b) => array<'b>", "documentation": { "kind": "markdown", @@ -112,8 +104,6 @@ ContextPath Module[R]."" Path R. [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -135,8 +125,6 @@ ContextPath Module[R]."" Path R. [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", diff --git a/tests/analysis_tests/tests/src/expected/RecoveryOnProp.res.txt b/tests/analysis_tests/tests/src/expected/RecoveryOnProp.res.txt index 1bb20596944..66c291a3e41 100644 --- a/tests/analysis_tests/tests/src/expected/RecoveryOnProp.res.txt +++ b/tests/analysis_tests/tests/src/expected/RecoveryOnProp.res.txt @@ -16,23 +16,13 @@ Resolved opens 1 Stdlib ContextPath Type[Res] Path Res [ - { - "data": null, - "deprecated": false, - "detail": "module Result", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 9, - "label": "Result", - "tags": [] - }, + { "detail": "module Result", "kind": 9, "label": "Result", "tags": [] }, { "data": { "modulePath": "RescriptReactErrorBoundary", "filePath": "src/RecoveryOnProp.res" }, - "deprecated": false, "detail": "module RescriptReactErrorBoundary", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "RescriptReactErrorBoundary", "tags": [] @@ -42,9 +32,7 @@ Path Res "modulePath": "RescriptReactRouter", "filePath": "src/RecoveryOnProp.res" }, - "deprecated": false, "detail": "module RescriptReactRouter", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "RescriptReactRouter", "tags": [] @@ -54,9 +42,7 @@ Path Res "modulePath": "RescriptTools", "filePath": "src/RecoveryOnProp.res" }, - "deprecated": false, "detail": "module RescriptTools", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "RescriptTools", "tags": [] @@ -66,9 +52,7 @@ Path Res "modulePath": "RescriptTools_Docgen", "filePath": "src/RecoveryOnProp.res" }, - "deprecated": false, "detail": "module RescriptTools_Docgen", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "RescriptTools_Docgen", "tags": [] @@ -78,9 +62,7 @@ Path Res "modulePath": "RescriptTools_ExtractCodeBlocks", "filePath": "src/RecoveryOnProp.res" }, - "deprecated": false, "detail": "module RescriptTools_ExtractCodeBlocks", - "documentation": { "kind": "markdown", "value": "" }, "kind": 9, "label": "RescriptTools_ExtractCodeBlocks", "tags": [] diff --git a/tests/analysis_tests/tests/src/expected/Reprod.res.txt b/tests/analysis_tests/tests/src/expected/Reprod.res.txt index 172fd24e1b4..a3fc27f052d 100644 --- a/tests/analysis_tests/tests/src/expected/Reprod.res.txt +++ b/tests/analysis_tests/tests/src/expected/Reprod.res.txt @@ -9,8 +9,6 @@ ContextPath Value[Query, use] Path Query.use [ { - "data": null, - "deprecated": false, "detail": "input_ByAddress", "documentation": { "kind": "markdown", @@ -34,8 +32,6 @@ ContextPath Value[record] Path record [ { - "data": null, - "deprecated": false, "detail": "One", "documentation": { "kind": "markdown", @@ -48,8 +44,6 @@ Path record "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Two(bool)", "documentation": { "kind": "markdown", @@ -62,8 +56,6 @@ Path record "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Three(someRecord, bool)", "documentation": { "kind": "markdown", @@ -86,8 +78,6 @@ ContextPath Value[record] Path record [ { - "data": null, - "deprecated": false, "detail": "SchemaAssets.input_ByAddress", "documentation": { "kind": "markdown", @@ -114,8 +104,6 @@ ContextPath Value[res] Path res [ { - "data": null, - "deprecated": false, "detail": "One", "documentation": { "kind": "markdown", @@ -128,8 +116,6 @@ Path res "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Two(bool)", "documentation": { "kind": "markdown", @@ -142,8 +128,6 @@ Path res "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Three(someRecord, bool)", "documentation": { "kind": "markdown", @@ -169,8 +153,6 @@ ContextPath Value[res] Path res [ { - "data": null, - "deprecated": false, "detail": "#one", "documentation": { "kind": "markdown", @@ -183,8 +165,6 @@ Path res "tags": [] }, { - "data": null, - "deprecated": false, "detail": "#three(someRecord, bool)", "documentation": { "kind": "markdown", @@ -197,8 +177,6 @@ Path res "tags": [] }, { - "data": null, - "deprecated": false, "detail": "#two(bool)", "documentation": { "kind": "markdown", @@ -224,8 +202,6 @@ ContextPath Value[resOpt] Path resOpt [ { - "data": null, - "deprecated": false, "detail": "someVariant", "documentation": { "kind": "markdown", @@ -236,8 +212,6 @@ Path resOpt "tags": [] }, { - "data": null, - "deprecated": false, "detail": "someVariant", "documentation": { "kind": "markdown", @@ -250,8 +224,6 @@ Path resOpt "tags": [] }, { - "data": null, - "deprecated": false, "detail": "One", "documentation": { "kind": "markdown", @@ -264,8 +236,6 @@ Path resOpt "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Two(bool)", "documentation": { "kind": "markdown", @@ -278,8 +248,6 @@ Path resOpt "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Three(someRecord, bool)", "documentation": { "kind": "markdown", @@ -307,8 +275,6 @@ ContextPath Value[resOpt] Path resOpt [ { - "data": null, - "deprecated": false, "detail": "One", "documentation": { "kind": "markdown", @@ -321,8 +287,6 @@ Path resOpt "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Two(bool)", "documentation": { "kind": "markdown", @@ -335,8 +299,6 @@ Path resOpt "tags": [] }, { - "data": null, - "deprecated": false, "detail": "Three(someRecord, bool)", "documentation": { "kind": "markdown", diff --git a/tests/analysis_tests/tests/src/expected/RxjsCompletion.res.txt b/tests/analysis_tests/tests/src/expected/RxjsCompletion.res.txt index f9c886cd2bc..2b0365f8465 100644 --- a/tests/analysis_tests/tests/src/expected/RxjsCompletion.res.txt +++ b/tests/analysis_tests/tests/src/expected/RxjsCompletion.res.txt @@ -33,10 +33,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'t>, 't => unit) => subscription", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->Observable.subscribe", "kind": 12, "label": "->Observable.subscribe", @@ -53,10 +50,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(Observable.t<'t>, operation<'t, 'u>) => Observable.t<'u>", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->pipe", "kind": 12, "label": "->pipe", @@ -73,10 +67,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(\n Observable.t<'a>,\n Observable.t<'b>,\n) => Observable.t<('a, 'b)>", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->combineLatest", "kind": 12, "label": "->combineLatest", @@ -93,10 +84,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(Observable.t<'t>, Observable.t<'t>) => Observable.t<'t>", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->merge", "kind": 12, "label": "->merge", @@ -113,10 +101,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(\n Observable.t<'t>,\n operation<'t, 'u>,\n operation<'u, 'i>,\n) => Observable.t<'i>", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->pipe2", "kind": 12, "label": "->pipe2", @@ -157,10 +142,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(t<'t>, 't => unit) => subscription", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->Rxjs.Observable.subscribe", "kind": 12, "label": "->Rxjs.Observable.subscribe", @@ -177,10 +159,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(Observable.t<'t>, operation<'t, 'u>) => Observable.t<'u>", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->Rxjs.pipe", "kind": 12, "label": "->Rxjs.pipe", @@ -197,10 +176,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(\n Observable.t<'a>,\n Observable.t<'b>,\n) => Observable.t<('a, 'b)>", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->Rxjs.combineLatest", "kind": 12, "label": "->Rxjs.combineLatest", @@ -217,10 +193,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(Observable.t<'t>, Observable.t<'t>) => Observable.t<'t>", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->Rxjs.merge", "kind": 12, "label": "->Rxjs.merge", @@ -237,10 +210,7 @@ Path } } ], - "data": null, - "deprecated": false, "detail": "(\n Observable.t<'t>,\n operation<'t, 'u>,\n operation<'u, 'i>,\n) => Observable.t<'i>", - "documentation": { "kind": "markdown", "value": "" }, "insertText": "->Rxjs.pipe2", "kind": 12, "label": "->Rxjs.pipe2", diff --git a/tests/analysis_tests/tests/src/expected/TypeArgCtx.res.txt b/tests/analysis_tests/tests/src/expected/TypeArgCtx.res.txt index 200eeba6a49..5b3659ae7ca 100644 --- a/tests/analysis_tests/tests/src/expected/TypeArgCtx.res.txt +++ b/tests/analysis_tests/tests/src/expected/TypeArgCtx.res.txt @@ -9,8 +9,6 @@ ContextPath Value[catchResult] Path catchResult [ { - "data": null, - "deprecated": false, "detail": "someTyp", "documentation": { "kind": "markdown", diff --git a/tests/analysis_tests/tests/src/expected/TypeAtPosCompletion.res.txt b/tests/analysis_tests/tests/src/expected/TypeAtPosCompletion.res.txt index 7c94f2b0234..d79b5b50ed7 100644 --- a/tests/analysis_tests/tests/src/expected/TypeAtPosCompletion.res.txt +++ b/tests/analysis_tests/tests/src/expected/TypeAtPosCompletion.res.txt @@ -6,8 +6,6 @@ Resolved opens 1 Stdlib ContextPath CTypeAtPos() [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -18,8 +16,6 @@ ContextPath CTypeAtPos() "tags": [] }, { - "data": null, - "deprecated": false, "detail": "bool", "documentation": { "kind": "markdown", @@ -41,8 +37,6 @@ Resolved opens 1 Stdlib ContextPath CTypeAtPos() [ { - "data": null, - "deprecated": false, "detail": "int", "documentation": { "kind": "markdown", @@ -53,8 +47,6 @@ ContextPath CTypeAtPos() "tags": [] }, { - "data": null, - "deprecated": false, "detail": "bool", "documentation": { "kind": "markdown", @@ -74,8 +66,6 @@ Resolved opens 1 Stdlib ContextPath CTypeAtPos() [ { - "data": null, - "deprecated": false, "detail": "optRecord", "documentation": { "kind": "markdown", From 8b16a40467376f0c51239c4fcc58a8dc1d8f9a4e Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sat, 23 May 2026 14:12:25 -0300 Subject: [PATCH 12/24] Update tests/analysis_tests/tests-generic-jsx-transform/src/expected/GenericJsxCompletion.res.txt --- .../src/expected/GenericJsxCompletion.res.txt | 62 ++----------------- 1 file changed, 5 insertions(+), 57 deletions(-) diff --git a/tests/analysis_tests/tests-generic-jsx-transform/src/expected/GenericJsxCompletion.res.txt b/tests/analysis_tests/tests-generic-jsx-transform/src/expected/GenericJsxCompletion.res.txt index 8d98c73f76b..28f713fb42b 100644 --- a/tests/analysis_tests/tests-generic-jsx-transform/src/expected/GenericJsxCompletion.res.txt +++ b/tests/analysis_tests/tests-generic-jsx-transform/src/expected/GenericJsxCompletion.res.txt @@ -6,33 +6,9 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Path GenericJsx.Elements.props [ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "testing", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "string", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "test2", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "element", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "children", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "testing", "tags": [] }, + { "detail": "string", "kind": 4, "label": "test2", "tags": [] }, + { "detail": "element", "kind": 4, "label": "children", "tags": [] } ] Complete src/GenericJsxCompletion.res 3:17 @@ -44,24 +20,8 @@ Resolved opens 1 Stdlib ContextPath CJsxPropValue [div] testing Path GenericJsx.Elements.props [ - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "true", - "tags": [] - }, - { - "data": null, - "deprecated": false, - "detail": "bool", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 4, - "label": "false", - "tags": [] - } + { "detail": "bool", "kind": 4, "label": "true", "tags": [] }, + { "detail": "bool", "kind": 4, "label": "false", "tags": [] } ] Complete src/GenericJsxCompletion.res 14:21 @@ -83,8 +43,6 @@ Path Stdlib.String.st Path st [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -97,8 +55,6 @@ Path st "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(string, string) => bool", "documentation": { "kind": "markdown", @@ -109,8 +65,6 @@ Path st "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(string, string, int) => bool", "documentation": { "kind": "markdown", @@ -144,8 +98,6 @@ Path Stdlib.String.st Path st [ { - "data": null, - "deprecated": false, "detail": "string", "documentation": { "kind": "markdown", @@ -158,8 +110,6 @@ Path st "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(string, string) => bool", "documentation": { "kind": "markdown", @@ -170,8 +120,6 @@ Path st "tags": [] }, { - "data": null, - "deprecated": false, "detail": "(string, string, int) => bool", "documentation": { "kind": "markdown", From 954c9a5a5bf636cd9eed24dc2b6f4022f8814179 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sat, 23 May 2026 14:16:58 -0300 Subject: [PATCH 13/24] Update analysis_tests --- .../src/expected/ConstructorCompletion__Json.res.txt | 2 -- .../src/expected/ConstructorCompletion__Own.res.txt | 2 -- 2 files changed, 4 deletions(-) diff --git a/tests/analysis_tests/tests-incremental-typechecking/src/expected/ConstructorCompletion__Json.res.txt b/tests/analysis_tests/tests-incremental-typechecking/src/expected/ConstructorCompletion__Json.res.txt index 1d175b3d822..a5c176baecd 100644 --- a/tests/analysis_tests/tests-incremental-typechecking/src/expected/ConstructorCompletion__Json.res.txt +++ b/tests/analysis_tests/tests-incremental-typechecking/src/expected/ConstructorCompletion__Json.res.txt @@ -9,8 +9,6 @@ Resolved opens 1 Stdlib ContextPath CTypeAtPos() [ { - "data": null, - "deprecated": false, "detail": "t", "documentation": { "kind": "markdown", diff --git a/tests/analysis_tests/tests-incremental-typechecking/src/expected/ConstructorCompletion__Own.res.txt b/tests/analysis_tests/tests-incremental-typechecking/src/expected/ConstructorCompletion__Own.res.txt index f910f33a392..318cc3d18bd 100644 --- a/tests/analysis_tests/tests-incremental-typechecking/src/expected/ConstructorCompletion__Own.res.txt +++ b/tests/analysis_tests/tests-incremental-typechecking/src/expected/ConstructorCompletion__Own.res.txt @@ -8,8 +8,6 @@ Resolved opens 1 Stdlib ContextPath CTypeAtPos() [ { - "data": null, - "deprecated": false, "detail": "{miss: bool}", "documentation": { "kind": "markdown", From 5185cf4dec9475f8312ad0c504dac46c6b4003d6 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sat, 23 May 2026 14:22:27 -0300 Subject: [PATCH 14/24] Update analysis_tests --- .../src/expected/Main.res.txt | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tests/analysis_tests/tests-sourcedirs-dependency/src/expected/Main.res.txt b/tests/analysis_tests/tests-sourcedirs-dependency/src/expected/Main.res.txt index b4966434cde..f63801d1bf7 100644 --- a/tests/analysis_tests/tests-sourcedirs-dependency/src/expected/Main.res.txt +++ b/tests/analysis_tests/tests-sourcedirs-dependency/src/expected/Main.res.txt @@ -7,14 +7,6 @@ Resolved opens 1 Stdlib ContextPath Value[WorkspaceDep, value] Path WorkspaceDep.value [ - { - "data": null, - "deprecated": false, - "detail": "int", - "documentation": { "kind": "markdown", "value": "" }, - "kind": 12, - "label": "valueFromDependency", - "tags": [] - } + { "detail": "int", "kind": 12, "label": "valueFromDependency", "tags": [] } ] From 67a236cb85082db89acd7881751d318ef61018db Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sat, 23 May 2026 14:45:06 -0300 Subject: [PATCH 15/24] Remove unused pathToUri --- analysis/src/Uri.ml | 2 -- 1 file changed, 2 deletions(-) diff --git a/analysis/src/Uri.ml b/analysis/src/Uri.ml index 75be2c439ed..ee415991670 100644 --- a/analysis/src/Uri.ml +++ b/analysis/src/Uri.ml @@ -2,8 +2,6 @@ type t = Lsp.Uri.t let stripPath = ref false (* for use in tests *) -let pathToUri path = Lsp.Uri.of_path path - let fromPath path = Lsp.Uri.of_path path let isInterface uri = uri |> Lsp.Uri.to_string |> Filename.check_suffix "i" let toPath uri = From 8e972beaa8740264f8093ff0c0543b0d2e3c6b63 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sat, 23 May 2026 14:45:51 -0300 Subject: [PATCH 16/24] docstrings: remove decodeFromJson implementation --- .../RescriptTools_ExtractCodeBlocks.res | 15 +----- .../es6/RescriptTools_ExtractCodeBlocks.mjs | 51 +------------------ .../js/RescriptTools_ExtractCodeBlocks.cjs | 49 +----------------- tests/docstring_tests/DocTest.res | 10 +--- tests/docstring_tests/DocTest.res.js | 10 +--- 5 files changed, 7 insertions(+), 128 deletions(-) diff --git a/packages/@rescript/runtime/RescriptTools_ExtractCodeBlocks.res b/packages/@rescript/runtime/RescriptTools_ExtractCodeBlocks.res index d41cfe9ddd7..8174dc2c14e 100644 --- a/packages/@rescript/runtime/RescriptTools_ExtractCodeBlocks.res +++ b/packages/@rescript/runtime/RescriptTools_ExtractCodeBlocks.res @@ -7,17 +7,4 @@ type codeBlock = { /** `decodeFromJson(json)` parse JSON generated from `rescript-tools extract-codeblocks` command */ -let decodeFromJson = (json: Stdlib_JSON.t) => - switch json { - | Array(codeblocks) => - let codeblocks = codeblocks->Stdlib_Array.filterMap(c => { - switch c { - | Object(dict{"id": Stdlib_JSON.String(id), "name": String(name), "code": String(code)}) => - Some({id, name, code}) - | _ => None - } - }) - Ok(codeblocks) - | String(error) => Error(error) - | _ => Error("Failed to decode codeblocks") - } +external decodeFromJson: Stdlib_JSON.t => array = "%identity" diff --git a/packages/@rescript/runtime/lib/es6/RescriptTools_ExtractCodeBlocks.mjs b/packages/@rescript/runtime/lib/es6/RescriptTools_ExtractCodeBlocks.mjs index c30a7496b5e..ae1b9f17e65 100644 --- a/packages/@rescript/runtime/lib/es6/RescriptTools_ExtractCodeBlocks.mjs +++ b/packages/@rescript/runtime/lib/es6/RescriptTools_ExtractCodeBlocks.mjs @@ -1,50 +1 @@ - - -import * as Stdlib_Array from "./Stdlib_Array.mjs"; - -function decodeFromJson(json) { - if (Array.isArray(json)) { - let codeblocks = Stdlib_Array.filterMap(json, c => { - if (typeof c !== "object" || c === null || Array.isArray(c)) { - return; - } - let id = c.id; - if (typeof id !== "string") { - return; - } - let name = c.name; - if (typeof name !== "string") { - return; - } - let code = c.code; - if (typeof code === "string") { - return { - id: id, - name: name, - code: code - }; - } - }); - return { - TAG: "Ok", - _0: codeblocks - }; - } - switch (typeof json) { - case "string" : - return { - TAG: "Error", - _0: json - }; - default: - return { - TAG: "Error", - _0: "Failed to decode codeblocks" - }; - } -} - -export { - decodeFromJson, -} -/* No side effect */ +/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ diff --git a/packages/@rescript/runtime/lib/js/RescriptTools_ExtractCodeBlocks.cjs b/packages/@rescript/runtime/lib/js/RescriptTools_ExtractCodeBlocks.cjs index 8598e56ed39..ae1b9f17e65 100644 --- a/packages/@rescript/runtime/lib/js/RescriptTools_ExtractCodeBlocks.cjs +++ b/packages/@rescript/runtime/lib/js/RescriptTools_ExtractCodeBlocks.cjs @@ -1,48 +1 @@ -'use strict'; - -let Stdlib_Array = require("./Stdlib_Array.cjs"); - -function decodeFromJson(json) { - if (Array.isArray(json)) { - let codeblocks = Stdlib_Array.filterMap(json, c => { - if (typeof c !== "object" || c === null || Array.isArray(c)) { - return; - } - let id = c.id; - if (typeof id !== "string") { - return; - } - let name = c.name; - if (typeof name !== "string") { - return; - } - let code = c.code; - if (typeof code === "string") { - return { - id: id, - name: name, - code: code - }; - } - }); - return { - TAG: "Ok", - _0: codeblocks - }; - } - switch (typeof json) { - case "string" : - return { - TAG: "Error", - _0: json - }; - default: - return { - TAG: "Error", - _0: "Failed to decode codeblocks" - }; - } -} - -exports.decodeFromJson = decodeFromJson; -/* No side effect */ +/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ diff --git a/tests/docstring_tests/DocTest.res b/tests/docstring_tests/DocTest.res index 779fa0cf8fc..f806d9d0176 100644 --- a/tests/docstring_tests/DocTest.res +++ b/tests/docstring_tests/DocTest.res @@ -71,14 +71,8 @@ let extractExamples = async () => { let examples = [] await docFiles->ArrayUtils.forEachAsyncInBatches(~batchSize, async f => { let doc = await extractDocFromFile(Path.join([runtimePath, f])) - switch doc { - | Ok(doc) => - // TODO: Should this be a flag in the actual command instead, to only include code blocks with tests? - examples->Array.pushMany(doc->Array.filter(d => d.code->String.includes("assertEqual("))) - | Error(e) => - Console.error(e) - JsError.panic(`Error extracting code blocks for ${f}`) - } + // TODO: Should this be a flag in the actual command instead, to only include code blocks with tests? + examples->Array.pushMany(doc->Array.filter(d => d.code->String.includes("assertEqual("))) }) examples->Array.sort((a, b) => String.compare(a.id, b.id)) diff --git a/tests/docstring_tests/DocTest.res.js b/tests/docstring_tests/DocTest.res.js index d9ef83c5ae2..c372acd3dc5 100644 --- a/tests/docstring_tests/DocTest.res.js +++ b/tests/docstring_tests/DocTest.res.js @@ -15,7 +15,6 @@ import * as Primitive_string from "@rescript/runtime/lib/es6/Primitive_string.mj import * as Promises from "node:fs/promises"; import * as Primitive_exceptions from "@rescript/runtime/lib/es6/Primitive_exceptions.mjs"; import * as BinsJs from "../../cli/common/bins.js"; -import * as RescriptTools_ExtractCodeBlocks from "@rescript/runtime/lib/es6/RescriptTools_ExtractCodeBlocks.mjs"; let rescript_tools_exe = BinsJs.rescript_tools_exe; @@ -46,7 +45,7 @@ async function extractDocFromFile(file) { "--transform-assert-equal" ], undefined); try { - return RescriptTools_ExtractCodeBlocks.decodeFromJson(JSON.parse(getOutput(match.stdout))); + return JSON.parse(getOutput(match.stdout)); } catch (raw_e) { let e = Primitive_exceptions.internalToException(raw_e); if (e.RE_EXN_ID === "JsExn") { @@ -78,12 +77,7 @@ async function extractExamples() { let examples = []; await ArrayUtils.forEachAsyncInBatches(docFiles, batchSize, async f => { let doc = await extractDocFromFile(Nodepath.join(runtimePath, f)); - if (doc.TAG === "Ok") { - examples.push(...doc._0.filter(d => d.code.includes("assertEqual("))); - return; - } - console.error(doc._0); - return Stdlib_JsError.panic(`Error extracting code blocks for ` + f); + examples.push(...doc.filter(d => d.code.includes("assertEqual("))); }); examples.sort((a, b) => Primitive_string.compare(a.id, b.id)); return examples; From 7c55a20cda7ac8873d0eeb5877d5e2843f42fce6 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sat, 23 May 2026 22:51:16 -0300 Subject: [PATCH 17/24] Use basename instead of full URI in Xform test output --- analysis/src/Cli.ml | 16 ++++-- .../not_compiled/expected/DocTemplate.res.txt | 26 +++++----- .../expected/DocTemplate.resi.txt | 14 ++--- .../src/expected/ExhaustiveSwitch.res.txt | 4 +- .../tests/src/expected/Xform.res.txt | 52 +++++++++---------- 5 files changed, 59 insertions(+), 53 deletions(-) diff --git a/analysis/src/Cli.ml b/analysis/src/Cli.ml index bf7fa97a7d5..f8d7a1dd763 100644 --- a/analysis/src/Cli.ml +++ b/analysis/src/Cli.ml @@ -331,8 +331,11 @@ let test ~path = -> match dc with | `TextDocumentEdit tde -> - Printf.printf "\nTextDocumentEdit: %s\n" - (tde.textDocument.uri |> Lsp.Uri.to_string); + let filename = + tde.textDocument.uri |> Lsp.Uri.to_path + |> Filename.basename + in + Printf.printf "\nTextDocumentEdit: %s\n" filename; tde.edits |> List.iter @@ -360,9 +363,12 @@ let test ~path = |> Yojson.Safe.pretty_to_string) indent indent newText) | `CreateFile cf -> - Printf.printf "\nCreateFile: %s\n" - (cf.uri |> Lsp.Uri.to_string) - | _ -> assert false) + let filename = + cf.uri |> Lsp.Uri.to_path |> Filename.basename + in + Printf.printf "\nCreateFile: %s\n" filename + | _ -> + failwith "not implemented text document edit test") | None -> ()) | "c-a" -> let hint = String.sub rest 3 (String.length rest - 3) in diff --git a/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.res.txt b/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.res.txt index 189f9be07e1..2e222e81d67 100644 --- a/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.res.txt +++ b/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.res.txt @@ -2,7 +2,7 @@ Xform not_compiled/DocTemplate.res 3:3 can't find module DocTemplate Hit: Add Documentation template -TextDocumentEdit: file:///not_compiled/DocTemplate.res +TextDocumentEdit: DocTemplate.res { "end": { "character": 9, "line": 5 }, "start": { "character": 0, "line": 3 } @@ -20,7 +20,7 @@ Xform not_compiled/DocTemplate.res 6:15 can't find module DocTemplate Hit: Add Documentation template -TextDocumentEdit: file:///not_compiled/DocTemplate.res +TextDocumentEdit: DocTemplate.res { "end": { "character": 33, "line": 6 }, "start": { "character": 0, "line": 6 } @@ -36,7 +36,7 @@ Xform not_compiled/DocTemplate.res 8:4 can't find module DocTemplate Hit: Add Documentation template -TextDocumentEdit: file:///not_compiled/DocTemplate.res +TextDocumentEdit: DocTemplate.res { "end": { "character": 9, "line": 8 }, "start": { "character": 0, "line": 8 } @@ -52,7 +52,7 @@ Xform not_compiled/DocTemplate.res 10:4 can't find module DocTemplate Hit: Add Documentation template -TextDocumentEdit: file:///not_compiled/DocTemplate.res +TextDocumentEdit: DocTemplate.res { "end": { "character": 20, "line": 10 }, "start": { "character": 0, "line": 10 } @@ -68,7 +68,7 @@ Xform not_compiled/DocTemplate.res 12:7 can't find module DocTemplate Hit: Add Documentation template -TextDocumentEdit: file:///not_compiled/DocTemplate.res +TextDocumentEdit: DocTemplate.res { "end": { "character": 1, "line": 16 }, "start": { "character": 0, "line": 12 } @@ -85,9 +85,9 @@ module T = { } Hit: Extract local module "T" to file "T.res" -CreateFile: file:///not_compiled/T.res +CreateFile: T.res -TextDocumentEdit: file:///not_compiled/T.res +TextDocumentEdit: T.res { "end": { "character": 1, "line": 16 }, "start": { "character": 0, "line": 12 } @@ -99,7 +99,7 @@ let b = 1 // ^xfm -TextDocumentEdit: file:///not_compiled/DocTemplate.res +TextDocumentEdit: DocTemplate.res { "end": { "character": 1, "line": 16 }, "start": { "character": 0, "line": 12 } @@ -112,7 +112,7 @@ Xform not_compiled/DocTemplate.res 14:6 can't find module DocTemplate Hit: Add Documentation template -TextDocumentEdit: file:///not_compiled/DocTemplate.res +TextDocumentEdit: DocTemplate.res { "end": { "character": 11, "line": 14 }, "start": { "character": 2, "line": 14 } @@ -125,9 +125,9 @@ newText: let b = 1 Hit: Extract local module "T" to file "T.res" -CreateFile: file:///not_compiled/T.res +CreateFile: T.res -TextDocumentEdit: file:///not_compiled/T.res +TextDocumentEdit: T.res { "end": { "character": 1, "line": 16 }, "start": { "character": 0, "line": 12 } @@ -139,7 +139,7 @@ let b = 1 // ^xfm -TextDocumentEdit: file:///not_compiled/DocTemplate.res +TextDocumentEdit: DocTemplate.res { "end": { "character": 1, "line": 16 }, "start": { "character": 0, "line": 12 } @@ -152,7 +152,7 @@ Xform not_compiled/DocTemplate.res 18:2 can't find module DocTemplate Hit: Add Documentation template -TextDocumentEdit: file:///not_compiled/DocTemplate.res +TextDocumentEdit: DocTemplate.res { "end": { "character": 46, "line": 18 }, "start": { "character": 0, "line": 17 } diff --git a/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.resi.txt b/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.resi.txt index 5552ac7cc70..3937e7937d5 100644 --- a/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.resi.txt +++ b/tests/analysis_tests/tests/not_compiled/expected/DocTemplate.resi.txt @@ -1,7 +1,7 @@ Xform not_compiled/DocTemplate.resi 3:3 Hit: Add Documentation template -TextDocumentEdit: file:///not_compiled/DocTemplate.resi +TextDocumentEdit: DocTemplate.resi { "end": { "character": 9, "line": 5 }, "start": { "character": 0, "line": 3 } @@ -18,7 +18,7 @@ and e = C Xform not_compiled/DocTemplate.resi 6:15 Hit: Add Documentation template -TextDocumentEdit: file:///not_compiled/DocTemplate.resi +TextDocumentEdit: DocTemplate.resi { "end": { "character": 33, "line": 6 }, "start": { "character": 0, "line": 6 } @@ -33,7 +33,7 @@ newText: Xform not_compiled/DocTemplate.resi 8:4 Hit: Add Documentation template -TextDocumentEdit: file:///not_compiled/DocTemplate.resi +TextDocumentEdit: DocTemplate.resi { "end": { "character": 10, "line": 8 }, "start": { "character": 0, "line": 8 } @@ -48,7 +48,7 @@ let a: int Xform not_compiled/DocTemplate.resi 10:4 Hit: Add Documentation template -TextDocumentEdit: file:///not_compiled/DocTemplate.resi +TextDocumentEdit: DocTemplate.resi { "end": { "character": 19, "line": 10 }, "start": { "character": 0, "line": 10 } @@ -63,7 +63,7 @@ let inc: int => int Xform not_compiled/DocTemplate.resi 12:7 Hit: Add Documentation template -TextDocumentEdit: file:///not_compiled/DocTemplate.resi +TextDocumentEdit: DocTemplate.resi { "end": { "character": 1, "line": 16 }, "start": { "character": 0, "line": 12 } @@ -82,7 +82,7 @@ module T: { Xform not_compiled/DocTemplate.resi 14:6 Hit: Add Documentation template -TextDocumentEdit: file:///not_compiled/DocTemplate.resi +TextDocumentEdit: DocTemplate.resi { "end": { "character": 12, "line": 14 }, "start": { "character": 2, "line": 14 } @@ -97,7 +97,7 @@ newText: Xform not_compiled/DocTemplate.resi 18:2 Hit: Add Documentation template -TextDocumentEdit: file:///not_compiled/DocTemplate.resi +TextDocumentEdit: DocTemplate.resi { "end": { "character": 46, "line": 18 }, "start": { "character": 0, "line": 17 } diff --git a/tests/analysis_tests/tests/src/expected/ExhaustiveSwitch.res.txt b/tests/analysis_tests/tests/src/expected/ExhaustiveSwitch.res.txt index 06be72e9529..ca5e05c5859 100644 --- a/tests/analysis_tests/tests/src/expected/ExhaustiveSwitch.res.txt +++ b/tests/analysis_tests/tests/src/expected/ExhaustiveSwitch.res.txt @@ -120,7 +120,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Hit: Exhaustive switch -TextDocumentEdit: file:///src/ExhaustiveSwitch.res +TextDocumentEdit: ExhaustiveSwitch.res { "end": { "character": 10, "line": 33 }, "start": { "character": 3, "line": 33 } @@ -144,7 +144,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Hit: Exhaustive switch -TextDocumentEdit: file:///src/ExhaustiveSwitch.res +TextDocumentEdit: ExhaustiveSwitch.res { "end": { "character": 6, "line": 36 }, "start": { "character": 3, "line": 36 } diff --git a/tests/analysis_tests/tests/src/expected/Xform.res.txt b/tests/analysis_tests/tests/src/expected/Xform.res.txt index 90b5d535ddb..2d54099ce26 100644 --- a/tests/analysis_tests/tests/src/expected/Xform.res.txt +++ b/tests/analysis_tests/tests/src/expected/Xform.res.txt @@ -9,7 +9,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Hit: Replace with switch -TextDocumentEdit: file:///src/Xform.res +TextDocumentEdit: Xform.res { "end": { "character": 1, "line": 11 }, "start": { "character": 0, "line": 6 } @@ -26,7 +26,7 @@ switch kind { Xform src/Xform.res 13:15 Hit: Replace with switch -TextDocumentEdit: file:///src/Xform.res +TextDocumentEdit: Xform.res { "end": { "character": 79, "line": 13 }, "start": { "character": 0, "line": 13 } @@ -41,7 +41,7 @@ switch kind { Xform src/Xform.res 16:5 Hit: Add type annotation -TextDocumentEdit: file:///src/Xform.res +TextDocumentEdit: Xform.res { "end": { "character": 8, "line": 16 }, "start": { "character": 8, "line": 16 } @@ -51,7 +51,7 @@ newText: : string Hit: Add Documentation template -TextDocumentEdit: file:///src/Xform.res +TextDocumentEdit: Xform.res { "end": { "character": 18, "line": 16 }, "start": { "character": 0, "line": 16 } @@ -66,7 +66,7 @@ let name = "hello" Xform src/Xform.res 19:5 Hit: Add Documentation template -TextDocumentEdit: file:///src/Xform.res +TextDocumentEdit: Xform.res { "end": { "character": 23, "line": 19 }, "start": { "character": 0, "line": 19 } @@ -81,7 +81,7 @@ let annotated: int = 34 Xform src/Xform.res 26:10 Hit: Add type annotation -TextDocumentEdit: file:///src/Xform.res +TextDocumentEdit: Xform.res { "end": { "character": 11, "line": 26 }, "start": { "character": 10, "line": 26 } @@ -93,7 +93,7 @@ newText: Xform src/Xform.res 30:9 Hit: Add braces to function -TextDocumentEdit: file:///src/Xform.res +TextDocumentEdit: Xform.res { "end": { "character": 3, "line": 32 }, "start": { "character": 0, "line": 26 } @@ -112,7 +112,7 @@ let foo = x => { Xform src/Xform.res 34:21 Hit: Add type annotation -TextDocumentEdit: file:///src/Xform.res +TextDocumentEdit: Xform.res { "end": { "character": 24, "line": 34 }, "start": { "character": 24, "line": 34 } @@ -124,7 +124,7 @@ newText: Xform src/Xform.res 38:5 Hit: Add Documentation template -TextDocumentEdit: file:///src/Xform.res +TextDocumentEdit: Xform.res { "end": { "character": 40, "line": 38 }, "start": { "character": 0, "line": 37 } @@ -140,7 +140,7 @@ let make = (~name) => React.string(name) Xform src/Xform.res 41:9 Hit: Add type annotation -TextDocumentEdit: file:///src/Xform.res +TextDocumentEdit: Xform.res { "end": { "character": 11, "line": 41 }, "start": { "character": 11, "line": 41 } @@ -160,7 +160,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Hit: Add braces to function -TextDocumentEdit: file:///src/Xform.res +TextDocumentEdit: Xform.res { "end": { "character": 25, "line": 48 }, "start": { "character": 0, "line": 48 } @@ -174,7 +174,7 @@ let noBraces = () => { Xform src/Xform.res 52:34 Hit: Add braces to function -TextDocumentEdit: file:///src/Xform.res +TextDocumentEdit: Xform.res { "end": { "character": 1, "line": 54 }, "start": { "character": 0, "line": 51 } @@ -191,7 +191,7 @@ let nested = () => { Xform src/Xform.res 62:6 Hit: Add braces to function -TextDocumentEdit: file:///src/Xform.res +TextDocumentEdit: Xform.res { "end": { "character": 7, "line": 62 }, "start": { "character": 4, "line": 58 } @@ -208,9 +208,9 @@ newText: Xform src/Xform.res 72:5 Hit: Extract local module "ExtractableModule" to file "ExtractableModule.res" -CreateFile: file:///src/ExtractableModule.res +CreateFile: ExtractableModule.res -TextDocumentEdit: file:///src/ExtractableModule.res +TextDocumentEdit: ExtractableModule.res { "end": { "character": 1, "line": 74 }, "start": { "character": 0, "line": 68 } @@ -224,7 +224,7 @@ let doStuff = a => a + 1 // ^xfm -TextDocumentEdit: file:///src/Xform.res +TextDocumentEdit: Xform.res { "end": { "character": 1, "line": 74 }, "start": { "character": 0, "line": 68 } @@ -244,7 +244,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Hit: Expand catch-all -TextDocumentEdit: file:///src/Xform.res +TextDocumentEdit: Xform.res { "end": { "character": 3, "line": 80 }, "start": { "character": 2, "line": 80 } @@ -264,7 +264,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Hit: Expand catch-all -TextDocumentEdit: file:///src/Xform.res +TextDocumentEdit: Xform.res { "end": { "character": 3, "line": 86 }, "start": { "character": 2, "line": 86 } @@ -284,7 +284,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Hit: Expand catch-all -TextDocumentEdit: file:///src/Xform.res +TextDocumentEdit: Xform.res { "end": { "character": 3, "line": 93 }, "start": { "character": 2, "line": 93 } @@ -304,7 +304,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Hit: Expand catch-all -TextDocumentEdit: file:///src/Xform.res +TextDocumentEdit: Xform.res { "end": { "character": 3, "line": 101 }, "start": { "character": 2, "line": 101 } @@ -324,7 +324,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Hit: Expand catch-all -TextDocumentEdit: file:///src/Xform.res +TextDocumentEdit: Xform.res { "end": { "character": 3, "line": 107 }, "start": { "character": 2, "line": 107 } @@ -344,7 +344,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Hit: Expand catch-all -TextDocumentEdit: file:///src/Xform.res +TextDocumentEdit: Xform.res { "end": { "character": 3, "line": 115 }, "start": { "character": 2, "line": 115 } @@ -364,7 +364,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Hit: Expand catch-all -TextDocumentEdit: file:///src/Xform.res +TextDocumentEdit: Xform.res { "end": { "character": 3, "line": 121 }, "start": { "character": 2, "line": 121 } @@ -384,7 +384,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Hit: Expand catch-all -TextDocumentEdit: file:///src/Xform.res +TextDocumentEdit: Xform.res { "end": { "character": 3, "line": 127 }, "start": { "character": 2, "line": 127 } @@ -404,7 +404,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Hit: Expand catch-all -TextDocumentEdit: file:///src/Xform.res +TextDocumentEdit: Xform.res { "end": { "character": 3, "line": 136 }, "start": { "character": 2, "line": 136 } @@ -424,7 +424,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder Resolved opens 1 Stdlib Hit: Expand catch-all -TextDocumentEdit: file:///src/Xform.res +TextDocumentEdit: Xform.res { "end": { "character": 3, "line": 142 }, "start": { "character": 2, "line": 142 } From 3a7b50ba19a4b52ecdb780567e6ef9b7341697b1 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sun, 24 May 2026 01:29:05 -0300 Subject: [PATCH 18/24] Fix rename `newUri` --- analysis/src/Commands.ml | 13 ++++++++----- analysis/src/Uri.ml | 1 + analysis/src/Uri.mli | 1 + .../analysis_tests/tests/src/expected/Cross.res.txt | 4 ++-- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/analysis/src/Commands.ml b/analysis/src/Commands.ml index c8a39ffbe2d..dce0ab56b60 100644 --- a/analysis/src/Commands.ml +++ b/analysis/src/Commands.ml @@ -193,15 +193,18 @@ let rename ~full ~pos ~newName ~debug = let fileRenames = referencesToToplevelModules |> List.map (fun uri -> - let path = Uri.toPath uri in - let dir = Filename.dirname path in + let path = Uri.toString uri in + let dir = + match Filename.dirname path with + | "." -> "" + | other -> other + in let newPath = Filename.concat dir (newName ^ Filename.extension path) in `RenameFile - (Lsp.Types.RenameFile.create - ~newUri:(newPath |> Lsp.Uri.of_string) - ~oldUri:(uri |> Uri.toString |> Lsp.Uri.of_string) + (Lsp.Types.RenameFile.create ~newUri:(newPath |> Uri.fromPath) + ~oldUri:(uri |> Uri.toString |> Uri.fromString) ())) in let textDocumentEdits = diff --git a/analysis/src/Uri.ml b/analysis/src/Uri.ml index ee415991670..912acbecbf2 100644 --- a/analysis/src/Uri.ml +++ b/analysis/src/Uri.ml @@ -3,6 +3,7 @@ type t = Lsp.Uri.t let stripPath = ref false (* for use in tests *) let fromPath path = Lsp.Uri.of_path path +let fromString str = Lsp.Uri.of_string str let isInterface uri = uri |> Lsp.Uri.to_string |> Filename.check_suffix "i" let toPath uri = (* Lsp.Uri.to_path remove the schema file:// but keep the `/` on start of path. *) diff --git a/analysis/src/Uri.mli b/analysis/src/Uri.mli index b2ff0611149..9079b6323c8 100644 --- a/analysis/src/Uri.mli +++ b/analysis/src/Uri.mli @@ -1,6 +1,7 @@ type t = Lsp.Uri.t val fromPath : string -> t +val fromString : string -> t val isInterface : t -> bool val stripPath : bool ref val toPath : t -> string diff --git a/tests/analysis_tests/tests/src/expected/Cross.res.txt b/tests/analysis_tests/tests/src/expected/Cross.res.txt index 72f0d1a536b..7a29f8cbb91 100644 --- a/tests/analysis_tests/tests/src/expected/Cross.res.txt +++ b/tests/analysis_tests/tests/src/expected/Cross.res.txt @@ -87,12 +87,12 @@ Rename src/Cross.res 18:13 RenameWithInterfacePrime [ { "kind": "rename", - "newUri": "file:///./src/RenameWithInterfacePrime.resi", + "newUri": "file:///RenameWithInterfacePrime.resi", "oldUri": "file:///RenameWithInterface.resi" }, { "kind": "rename", - "newUri": "file:///./src/RenameWithInterfacePrime.res", + "newUri": "file:///RenameWithInterfacePrime.res", "oldUri": "file:///RenameWithInterface.res" }, { From 2b1bc06327ad33cc12b3deeb81e5fa96e80bd324 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sun, 24 May 2026 01:35:18 -0300 Subject: [PATCH 19/24] Use only `Uri` instead of `Lsp.Uri` --- analysis/src/Cli.ml | 4 ++-- analysis/src/CodeActions.ml | 2 +- analysis/src/Commands.ml | 8 ++++---- analysis/src/Xform.ml | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/analysis/src/Cli.ml b/analysis/src/Cli.ml index f8d7a1dd763..4a753191116 100644 --- a/analysis/src/Cli.ml +++ b/analysis/src/Cli.ml @@ -332,7 +332,7 @@ let test ~path = match dc with | `TextDocumentEdit tde -> let filename = - tde.textDocument.uri |> Lsp.Uri.to_path + tde.textDocument.uri |> Uri.toPath |> Filename.basename in Printf.printf "\nTextDocumentEdit: %s\n" filename; @@ -364,7 +364,7 @@ let test ~path = indent indent newText) | `CreateFile cf -> let filename = - cf.uri |> Lsp.Uri.to_path |> Filename.basename + cf.uri |> Uri.toPath |> Filename.basename in Printf.printf "\nCreateFile: %s\n" filename | _ -> diff --git a/analysis/src/CodeActions.ml b/analysis/src/CodeActions.ml index 62b8126752a..8f64eaba9a7 100644 --- a/analysis/src/CodeActions.ml +++ b/analysis/src/CodeActions.ml @@ -3,7 +3,7 @@ let make ~title ~kind ~uri ~newText ~range = let textDocument = Lsp.Types.OptionalVersionedTextDocumentIdentifier.create - ~uri:(Lsp.Uri.of_string uri) () + ~uri:(Uri.fromString uri) () in let edit = Lsp.Types.WorkspaceEdit.create diff --git a/analysis/src/Commands.ml b/analysis/src/Commands.ml index dce0ab56b60..f921f82a34c 100644 --- a/analysis/src/Commands.ml +++ b/analysis/src/Commands.ml @@ -123,7 +123,7 @@ let definition ~full ~pos ~debug = else Some (Lsp.Types.Location.create ~range:(Utils.cmtLocToRange loc) - ~uri:(Files.canonicalizeUri uri |> Lsp.Uri.of_string)) + ~uri:(Files.canonicalizeUri uri |> Uri.fromString)) | Some _ -> None)) in locationOpt @@ -141,7 +141,7 @@ let typeDefinition ~full ~pos ~debug = | Some (uri, loc) -> Some (Lsp.Types.Location.create ~range:(Utils.cmtLocToRange loc) - ~uri:(Files.canonicalizeUri uri |> Lsp.Uri.of_string)))) + ~uri:(Files.canonicalizeUri uri |> Uri.fromString)))) in maybeLocation @@ -164,7 +164,7 @@ let references ~full ~pos ~debug = in Lsp.Types.Location.create ~range:(Utils.cmtLocToRange loc) - ~uri:(Uri.toString uri2 |> Lsp.Uri.of_string) + ~uri:(Uri.toString uri2 |> Uri.fromString) :: acc) []) in @@ -229,7 +229,7 @@ let rename ~full ~pos ~newName ~debug = (fun uri edits acc -> let textDocument = Lsp.Types.OptionalVersionedTextDocumentIdentifier.create - ~uri:(Lsp.Uri.of_string uri) () + ~uri:(Uri.fromString uri) () in let textDocumentEdit = `TextDocumentEdit diff --git a/analysis/src/Xform.ml b/analysis/src/Xform.ml index cc520ef2eee..a9ca37d8bc4 100644 --- a/analysis/src/Xform.ml +++ b/analysis/src/Xform.ml @@ -165,7 +165,7 @@ module ModuleToFile = struct let newFilePath = Filename.concat (Filename.dirname path) moduleName ^ ".res" in - let uri = Lsp.Uri.of_string newFilePath in + let uri = Uri.fromString newFilePath in let documentChanges = [ `CreateFile @@ -195,7 +195,7 @@ module ModuleToFile = struct ] ~textDocument: (Lsp.Types.OptionalVersionedTextDocumentIdentifier.create - ~uri:(Lsp.Uri.of_string path) ())); + ~uri:(Uri.fromString path) ())); ] in changed := From 721395e0a7b6dd25534ad748f1e032c1f77e7e38 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sun, 24 May 2026 01:38:14 -0300 Subject: [PATCH 20/24] update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7cf6c436c6..da0459b8f6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ - Use a single vendored @rescript/react package across the repo. https://github.com/rescript-lang/rescript/pull/7525 - Improve deprecated attribute extraction and support record form. https://github.com/rescript-lang/rescript/pull/8396 - Refactor analysis to decouple I/O from core logic. https://github.com/rescript-lang/rescript/pull/8426 +- Remove vendored `Json` library and use `yojson` and `lsp` library for analysis. https://github.com/rescript-lang/rescript/pull/8436 #### :house: Internal From ae6e864ecbd4ba24a92abcb1b24b830c4a7c4fb3 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sun, 24 May 2026 02:13:49 -0300 Subject: [PATCH 21/24] Omit null fields from doc extraction JSON Only include optional doc extraction fields like deprecated, detail, payload, and moduletypeid when they have values. Update tool test snapshots to match the leaner JSON output. --- .../src/expected/DocExtraction2.res.json | 15 +- .../src/expected/DocExtraction2.resi.json | 15 +- .../src/expected/DocExtractionRes.res.json | 84 ++----- tests/tools_tests/src/expected/ModC.res.json | 4 - tests/tools_tests/src/expected/ModC.resi.json | 4 - tools/src/tools.ml | 205 +++++++++--------- 6 files changed, 124 insertions(+), 203 deletions(-) diff --git a/tests/tools_tests/src/expected/DocExtraction2.res.json b/tests/tools_tests/src/expected/DocExtraction2.res.json index ffc0e077a87..79eac3729cf 100644 --- a/tests/tools_tests/src/expected/DocExtraction2.res.json +++ b/tests/tools_tests/src/expected/DocExtraction2.res.json @@ -1,6 +1,5 @@ { "name": "DocExtraction2", - "deprecated": null, "docstrings": [ "Module level doc here." ], "source": { "filepath": "src/DocExtraction2.resi", "line": 1, "col": 1 }, "items": [ @@ -8,21 +7,18 @@ "id": "DocExtraction2.t", "kind": "type", "name": "t", - "deprecated": null, "signature": "type t", "docstrings": [ "Type t is pretty cool." ], "source": { "filepath": "src/DocExtraction2.resi", "line": 4, "col": 1 - }, - "detail": null + } }, { "id": "DocExtraction2.make", "kind": "value", "name": "make", - "deprecated": null, "signature": "let make: unit => t", "docstrings": [ "Makerz of stuffz." ], "source": { @@ -42,8 +38,6 @@ "id": "DocExtraction2.InnerModule", "name": "InnerModule", "kind": "module", - "deprecated": null, - "moduletypeid": null, "docstrings": [], "source": { "filepath": "src/DocExtraction2.resi", @@ -55,21 +49,18 @@ "id": "DocExtraction2.InnerModule.t", "kind": "type", "name": "t", - "deprecated": null, "signature": "type t", "docstrings": [ "This type is also t." ], "source": { "filepath": "src/DocExtraction2.resi", "line": 13, "col": 3 - }, - "detail": null + } }, { "id": "DocExtraction2.InnerModule.make", "kind": "value", "name": "make", - "deprecated": null, "signature": "let make: unit => t", "docstrings": [ "Maker of tea." ], "source": { @@ -93,7 +84,6 @@ "id": "DocExtraction2.log", "kind": "value", "name": "log", - "deprecated": "Use log instead", "signature": "let log: 'a => unit", "docstrings": [], "source": { @@ -101,6 +91,7 @@ "line": 25, "col": 1 }, + "deprecated": "Use log instead", "detail": { "kind": "signature", "details": { diff --git a/tests/tools_tests/src/expected/DocExtraction2.resi.json b/tests/tools_tests/src/expected/DocExtraction2.resi.json index ffc0e077a87..79eac3729cf 100644 --- a/tests/tools_tests/src/expected/DocExtraction2.resi.json +++ b/tests/tools_tests/src/expected/DocExtraction2.resi.json @@ -1,6 +1,5 @@ { "name": "DocExtraction2", - "deprecated": null, "docstrings": [ "Module level doc here." ], "source": { "filepath": "src/DocExtraction2.resi", "line": 1, "col": 1 }, "items": [ @@ -8,21 +7,18 @@ "id": "DocExtraction2.t", "kind": "type", "name": "t", - "deprecated": null, "signature": "type t", "docstrings": [ "Type t is pretty cool." ], "source": { "filepath": "src/DocExtraction2.resi", "line": 4, "col": 1 - }, - "detail": null + } }, { "id": "DocExtraction2.make", "kind": "value", "name": "make", - "deprecated": null, "signature": "let make: unit => t", "docstrings": [ "Makerz of stuffz." ], "source": { @@ -42,8 +38,6 @@ "id": "DocExtraction2.InnerModule", "name": "InnerModule", "kind": "module", - "deprecated": null, - "moduletypeid": null, "docstrings": [], "source": { "filepath": "src/DocExtraction2.resi", @@ -55,21 +49,18 @@ "id": "DocExtraction2.InnerModule.t", "kind": "type", "name": "t", - "deprecated": null, "signature": "type t", "docstrings": [ "This type is also t." ], "source": { "filepath": "src/DocExtraction2.resi", "line": 13, "col": 3 - }, - "detail": null + } }, { "id": "DocExtraction2.InnerModule.make", "kind": "value", "name": "make", - "deprecated": null, "signature": "let make: unit => t", "docstrings": [ "Maker of tea." ], "source": { @@ -93,7 +84,6 @@ "id": "DocExtraction2.log", "kind": "value", "name": "log", - "deprecated": "Use log instead", "signature": "let log: 'a => unit", "docstrings": [], "source": { @@ -101,6 +91,7 @@ "line": 25, "col": 1 }, + "deprecated": "Use log instead", "detail": { "kind": "signature", "details": { diff --git a/tests/tools_tests/src/expected/DocExtractionRes.res.json b/tests/tools_tests/src/expected/DocExtractionRes.res.json index 6197326c954..2e0e89ae141 100644 --- a/tests/tools_tests/src/expected/DocExtractionRes.res.json +++ b/tests/tools_tests/src/expected/DocExtractionRes.res.json @@ -1,6 +1,5 @@ { "name": "DocExtractionRes", - "deprecated": null, "docstrings": [ "Module level documentation goes here." ], "source": { "filepath": "src/DocExtractionRes.res", "line": 1, "col": 1 }, "items": [ @@ -8,7 +7,6 @@ "id": "DocExtractionRes.t", "kind": "type", "name": "t", - "deprecated": null, "signature": "type t = {name: string, online: bool}", "docstrings": [ "This type represents stuff." ], "source": { @@ -21,14 +19,12 @@ "items": [ { "name": "name", - "deprecated": null, "optional": "false", "docstrings": [ "The name of the stuff." ], "signature": "string" }, { "name": "online", - "deprecated": null, "optional": "false", "docstrings": [ "Whether stuff is online." ], "signature": "bool" @@ -40,7 +36,6 @@ "id": "DocExtractionRes.make", "kind": "value", "name": "make", - "deprecated": null, "signature": "let make: string => t", "docstrings": [ "Create stuff.\n\n```rescript example\nlet stuff = make(\"My name\")\n```" @@ -62,7 +57,6 @@ "id": "DocExtractionRes.asOffline", "kind": "value", "name": "asOffline", - "deprecated": null, "signature": "let asOffline: t => t", "docstrings": [ "Stuff goes offline." ], "source": { @@ -82,7 +76,6 @@ "id": "DocExtractionRes.SomeConstant", "kind": "value", "name": "SomeConstant", - "deprecated": null, "signature": "let SomeConstant: int", "docstrings": [ "exotic identifier" ], "source": { @@ -102,8 +95,6 @@ "id": "DocExtractionRes.SomeInnerModule", "name": "SomeInnerModule", "kind": "module", - "deprecated": null, - "moduletypeid": null, "docstrings": [ "Another module level docstring here." ], "source": { "filepath": "src/DocExtractionRes.res", @@ -115,7 +106,6 @@ "id": "DocExtractionRes.SomeInnerModule.status", "kind": "type", "name": "status", - "deprecated": null, "signature": "type status = Started(t) | Stopped | Idle", "docstrings": [], "source": { @@ -128,24 +118,18 @@ "items": [ { "name": "Started", - "deprecated": null, "docstrings": [ "If this is started or not" ], - "signature": "Started(t)", - "payload": null + "signature": "Started(t)" }, { "name": "Stopped", - "deprecated": null, "docstrings": [ "Stopped?" ], - "signature": "Stopped", - "payload": null + "signature": "Stopped" }, { "name": "Idle", - "deprecated": null, "docstrings": [ "Now idle." ], - "signature": "Idle", - "payload": null + "signature": "Idle" } ] } @@ -154,29 +138,25 @@ "id": "DocExtractionRes.SomeInnerModule.validInputs", "kind": "type", "name": "validInputs", - "deprecated": null, "signature": "type validInputs = [\n | #\"needs-escaping\"\n | #something\n | #status(status)\n | #withPayload(int)\n]", "docstrings": [ "These are all the valid inputs." ], "source": { "filepath": "src/DocExtractionRes.res", "line": 39, "col": 3 - }, - "detail": null + } }, { "id": "DocExtractionRes.SomeInnerModule.callback", "kind": "type", "name": "callback", - "deprecated": null, "signature": "type callback = (t, ~status: status) => unit", "docstrings": [], "source": { "filepath": "src/DocExtractionRes.res", "line": 41, "col": 3 - }, - "detail": null + } } ] }, @@ -184,8 +164,6 @@ "id": "DocExtractionRes.AnotherModule", "name": "AnotherModule", "kind": "module", - "deprecated": null, - "moduletypeid": null, "docstrings": [ "Mighty fine module here too!" ], "source": { "filepath": "src/DocExtractionRes.res", @@ -209,21 +187,18 @@ "id": "DocExtractionRes.AnotherModule.callback", "kind": "type", "name": "callback", - "deprecated": null, "signature": "type callback = SomeInnerModule.status => unit", "docstrings": [ "Testing what this looks like." ], "source": { "filepath": "src/DocExtractionRes.res", "line": 52, "col": 3 - }, - "detail": null + } }, { "id": "DocExtractionRes.AnotherModule.isGoodStatus", "kind": "value", "name": "isGoodStatus", - "deprecated": null, "signature": "let isGoodStatus: SomeInnerModule.status => bool", "docstrings": [], "source": { @@ -248,7 +223,6 @@ "id": "DocExtractionRes.AnotherModule.someVariantWithInlineRecords", "kind": "type", "name": "someVariantWithInlineRecords", - "deprecated": null, "signature": "type someVariantWithInlineRecords =\n | SomeStuff({offline: bool, online?: bool})", "docstrings": [ "Trying how it looks with an inline record in a variant." @@ -263,7 +237,6 @@ "items": [ { "name": "SomeStuff", - "deprecated": null, "docstrings": [ "This has inline records..." ], "signature": "SomeStuff({offline: bool, online?: bool})", "payload": { @@ -271,14 +244,12 @@ "fields": [ { "name": "offline", - "deprecated": null, "optional": "false", "docstrings": [], "signature": "bool" }, { "name": "online", - "deprecated": null, "optional": "true", "docstrings": [ "Is the user online?" ], "signature": "option" @@ -293,15 +264,13 @@ "id": "DocExtractionRes.AnotherModule.domRoot", "kind": "type", "name": "domRoot", - "deprecated": null, "signature": "type domRoot = unit => ReactDOM.Client.Root.t", "docstrings": [ "Callback to get the DOM root..." ], "source": { "filepath": "src/DocExtractionRes.res", "line": 68, "col": 3 - }, - "detail": null + } } ] }, @@ -309,8 +278,6 @@ "id": "DocExtractionRes.ModuleWithThingsThatShouldNotBeExported", "name": "ModuleWithThingsThatShouldNotBeExported", "kind": "module", - "deprecated": null, - "moduletypeid": null, "docstrings": [], "source": { "filepath": "src/DocExtractionRes.res", @@ -322,21 +289,18 @@ "id": "DocExtractionRes.ModuleWithThingsThatShouldNotBeExported.t", "kind": "type", "name": "t", - "deprecated": null, "signature": "type t", "docstrings": [ "The type t is stuff." ], "source": { "filepath": "src/DocExtractionRes.res", "line": 75, "col": 3 - }, - "detail": null + } }, { "id": "DocExtractionRes.ModuleWithThingsThatShouldNotBeExported.make", "kind": "value", "name": "make", - "deprecated": null, "signature": "let make: unit => t", "docstrings": [ "The maker of stuff!" ], "source": { @@ -360,7 +324,6 @@ "id": "DocExtractionRes.Example", "name": "Example", "kind": "moduleType", - "deprecated": null, "docstrings": [], "source": { "filepath": "src/DocExtractionRes.res", @@ -372,21 +335,18 @@ "id": "DocExtractionRes.Example.t", "kind": "type", "name": "t", - "deprecated": null, "signature": "type t", "docstrings": [ "main type of this module" ], "source": { "filepath": "src/DocExtractionRes.res", "line": 113, "col": 3 - }, - "detail": null + } }, { "id": "DocExtractionRes.Example.f", "kind": "value", "name": "f", - "deprecated": null, "signature": "let f: t => t", "docstrings": [ "function from t to t" ], "source": { @@ -408,8 +368,6 @@ "id": "DocExtractionRes.M", "name": "M", "kind": "module", - "deprecated": null, - "moduletypeid": "DocExtractionRes.Example", "docstrings": [ "implementation of Example module type" ], "source": { "filepath": "src/DocExtractionRes.res", @@ -421,21 +379,18 @@ "id": "DocExtractionRes.M.t", "kind": "type", "name": "t", - "deprecated": null, "signature": "type t = int", "docstrings": [ "main type" ], "source": { "filepath": "src/DocExtractionRes.res", "line": 129, "col": 3 - }, - "detail": null + } }, { "id": "DocExtractionRes.M.f", "kind": "value", "name": "f", - "deprecated": null, "signature": "let f: int => int", "docstrings": [ "identity function" ], "source": { @@ -453,13 +408,13 @@ } } } - ] + ], + "moduletypeid": "DocExtractionRes.Example" }, { "id": "DocExtractionRes.MT", "name": "MT", "kind": "moduleType", - "deprecated": null, "docstrings": [], "source": { "filepath": "src/DocExtractionRes.res", @@ -471,7 +426,6 @@ "id": "DocExtractionRes.MT.x", "kind": "value", "name": "x", - "deprecated": null, "signature": "let x: int", "docstrings": [], "source": { @@ -493,8 +447,6 @@ "id": "DocExtractionRes.A", "name": "A", "kind": "module", - "deprecated": null, - "moduletypeid": "DocExtractionRes.MT", "docstrings": [], "source": { "filepath": "src/DocExtractionRes.res", @@ -506,7 +458,6 @@ "id": "DocExtractionRes.A.x", "kind": "value", "name": "x", - "deprecated": null, "signature": "let x: int", "docstrings": [], "source": { @@ -522,14 +473,13 @@ } } } - ] + ], + "moduletypeid": "DocExtractionRes.MT" }, { "id": "DocExtractionRes.C", "name": "C", "kind": "module", - "deprecated": null, - "moduletypeid": null, "docstrings": [], "source": { "filepath": "src/DocExtractionRes.res", @@ -541,8 +491,6 @@ "id": "DocExtractionRes.C.D", "name": "D", "kind": "module", - "deprecated": null, - "moduletypeid": "DocExtractionRes.MT", "docstrings": [], "source": { "filepath": "src/DocExtractionRes.res", @@ -554,7 +502,6 @@ "id": "DocExtractionRes.C.D.x", "kind": "value", "name": "x", - "deprecated": null, "signature": "let x: int", "docstrings": [], "source": { @@ -573,7 +520,8 @@ } } } - ] + ], + "moduletypeid": "DocExtractionRes.MT" } ] } diff --git a/tests/tools_tests/src/expected/ModC.res.json b/tests/tools_tests/src/expected/ModC.res.json index 7291b682e99..cc4cce09bba 100644 --- a/tests/tools_tests/src/expected/ModC.res.json +++ b/tests/tools_tests/src/expected/ModC.res.json @@ -1,6 +1,5 @@ { "name": "ModC", - "deprecated": null, "docstrings": [], "source": { "filepath": "src/ModC.resi", "line": 1, "col": 1 }, "items": [ @@ -8,8 +7,6 @@ "id": "ModC.User", "name": "User", "kind": "module", - "deprecated": null, - "moduletypeid": null, "docstrings": [ "User Module from interface file" ], "source": { "filepath": "src/ModC.resi", "line": 4, "col": 8 }, "items": [ @@ -17,7 +14,6 @@ "id": "ModC.User.name", "kind": "value", "name": "name", - "deprecated": null, "signature": "let name: string", "docstrings": [], "source": { "filepath": "src/ModC.resi", "line": 5, "col": 3 }, diff --git a/tests/tools_tests/src/expected/ModC.resi.json b/tests/tools_tests/src/expected/ModC.resi.json index 7291b682e99..cc4cce09bba 100644 --- a/tests/tools_tests/src/expected/ModC.resi.json +++ b/tests/tools_tests/src/expected/ModC.resi.json @@ -1,6 +1,5 @@ { "name": "ModC", - "deprecated": null, "docstrings": [], "source": { "filepath": "src/ModC.resi", "line": 1, "col": 1 }, "items": [ @@ -8,8 +7,6 @@ "id": "ModC.User", "name": "User", "kind": "module", - "deprecated": null, - "moduletypeid": null, "docstrings": [ "User Module from interface file" ], "source": { "filepath": "src/ModC.resi", "line": 4, "col": 8 }, "items": [ @@ -17,7 +14,6 @@ "id": "ModC.User.name", "kind": "value", "name": "name", - "deprecated": null, "signature": "let name: string", "docstrings": [], "source": { "filepath": "src/ModC.resi", "line": 5, "col": 3 }, diff --git a/tools/src/tools.ml b/tools/src/tools.ml index 7d611c21da6..b6d664939d3 100644 --- a/tools/src/tools.ml +++ b/tools/src/tools.ml @@ -83,16 +83,16 @@ let stringifyDocstrings docstrings = let stringifyFieldDoc (fieldDoc : fieldDoc) = `Assoc - [ - ("name", `String fieldDoc.fieldName); - ( "deprecated", - match fieldDoc.deprecated with - | Some d -> `String d - | None -> `Null ); - ("optional", `String (string_of_bool fieldDoc.optional)); - ("docstrings", stringifyDocstrings fieldDoc.docstrings); - ("signature", `String fieldDoc.signature); - ] + ([ + ("name", `String fieldDoc.fieldName); + ("optional", `String (string_of_bool fieldDoc.optional)); + ("docstrings", stringifyDocstrings fieldDoc.docstrings); + ("signature", `String fieldDoc.signature); + ] + @ + match fieldDoc.deprecated with + | Some d -> [("deprecated", `String d)] + | None -> []) let stringifyConstructorPayload (constructorPayload : constructorPayload) = match constructorPayload with @@ -128,21 +128,23 @@ let stringifyDetail (detail : docItemDetail) = (constructorDocs |> List.map (fun constructorDoc -> `Assoc - [ - ("name", `String constructorDoc.constructorName); - ( "deprecated", - match constructorDoc.deprecated with - | Some d -> `String d - | None -> `Null ); - ( "docstrings", - stringifyDocstrings constructorDoc.docstrings ); - ("signature", `String constructorDoc.signature); - ( "payload", - match constructorDoc.items with - | None -> `Null - | Some constructorPayload -> + ([ + ("name", `String constructorDoc.constructorName); + ( "docstrings", + stringifyDocstrings constructorDoc.docstrings ); + ("signature", `String constructorDoc.signature); + ] + @ (match constructorDoc.deprecated with + | Some d -> [("deprecated", `String d)] + | None -> []) + @ + match constructorDoc.items with + | Some constructorPayload -> + [ + ( "payload", stringifyConstructorPayload constructorPayload ); - ])) ); + ] + | None -> []))) ); ] | Signature {parameters; returnType} -> let ps = @@ -170,78 +172,75 @@ let rec stringifyDocItem ~originalEnv (item : docItem) = match item with | Value {id; docstring; signature; name; deprecated; source; detail} -> `Assoc - [ - ("id", `String id); - ("kind", `String "value"); - ("name", `String name); - ( "deprecated", - match deprecated with - | Some d -> `String d - | None -> `Null ); - ("signature", `String (signature |> String.trim)); - ("docstrings", stringifyDocstrings docstring); - ("source", stringifySource source); - ( "detail", - match detail with - | None -> `Null - | Some detail -> stringifyDetail detail ); - ] + ([ + ("id", `String id); + ("kind", `String "value"); + ("name", `String name); + ("signature", `String (signature |> String.trim)); + ("docstrings", stringifyDocstrings docstring); + ("source", stringifySource source); + ] + @ (match deprecated with + | Some d -> [("deprecated", `String d)] + | None -> []) + @ + match detail with + | Some detail -> [("detail", stringifyDetail detail)] + | None -> []) | Type {id; docstring; signature; name; deprecated; detail; source} -> `Assoc - [ - ("id", `String id); - ("kind", `String "type"); - ("name", `String name); - ( "deprecated", - match deprecated with - | Some d -> `String d - | None -> `Null ); - ("signature", `String signature); - ("docstrings", stringifyDocstrings docstring); - ("source", stringifySource source); - ( "detail", - match detail with - | None -> `Null - | Some detail -> stringifyDetail detail ); - ] + ([ + ("id", `String id); + ("kind", `String "type"); + ("name", `String name); + ("signature", `String signature); + ("docstrings", stringifyDocstrings docstring); + ("source", stringifySource source); + ] + @ (match deprecated with + | Some d -> [("deprecated", `String d)] + | None -> []) + @ + match detail with + | Some detail -> [("detail", stringifyDetail detail)] + | None -> []) | Module m -> `Assoc - [ - ("id", `String m.id); - ("name", `String m.name); - ("kind", `String "module"); - ( "deprecated", - match m.deprecated with - | Some d -> `String d - | None -> `Null ); - ( "moduletypeid", - match m.moduletypeid with - | Some path -> `String path - | None -> `Null ); - ("docstrings", stringifyDocstrings m.docstring); - ("source", stringifySource m.source); - ( "items", - `List - (m.items - |> List.map (fun item -> stringifyDocItem ~originalEnv item)) ); - ] + ([ + ("id", `String m.id); + ("name", `String m.name); + ("kind", `String "module"); + ("docstrings", stringifyDocstrings m.docstring); + ("source", stringifySource m.source); + ( "items", + `List + (m.items + |> List.map (fun item -> stringifyDocItem ~originalEnv item)) ); + ] + @ (match m.deprecated with + | Some d -> [("deprecated", `String d)] + | None -> []) + @ + match m.moduletypeid with + | Some path -> [("moduletypeid", `String path)] + | None -> []) | ModuleType m -> `Assoc - [ - ("id", `String m.id); - ("name", `String m.name); - ("kind", `String "moduleType"); - ( "deprecated", - match m.deprecated with - | Some d -> `String d - | None -> `Null ); - ("docstrings", stringifyDocstrings m.docstring); - ("source", stringifySource m.source); - ( "items", - `List - (m.items - |> List.map (fun item -> stringifyDocItem ~originalEnv item)) ); - ] + ([ + ("id", `String m.id); + ("name", `String m.name); + ("kind", `String "moduleType"); + ("docstrings", stringifyDocstrings m.docstring); + ("source", stringifySource m.source); + ( "items", + `List + (m.items + |> List.map (fun item -> stringifyDocItem ~originalEnv item)) ); + ] + @ + match m.deprecated with + | Some d -> [("deprecated", `String d)] + | None -> []) | ModuleAlias m -> `Assoc [ @@ -255,19 +254,19 @@ let rec stringifyDocItem ~originalEnv (item : docItem) = and stringifyDocsForModule ~originalEnv (d : docsForModule) = `Assoc - [ - ("name", `String d.name); - ( "deprecated", - match d.deprecated with - | Some d -> `String d - | None -> `Null ); - ("docstrings", stringifyDocstrings d.docstring); - ("source", stringifySource d.source); - ( "items", - `List - (d.items |> List.map (fun item -> stringifyDocItem ~originalEnv item)) - ); - ] + ([ + ("name", `String d.name); + ("docstrings", stringifyDocstrings d.docstring); + ("source", stringifySource d.source); + ( "items", + `List + (d.items |> List.map (fun item -> stringifyDocItem ~originalEnv item)) + ); + ] + @ + match d.deprecated with + | Some d -> [("deprecated", `String d)] + | None -> []) let fieldToFieldDoc (field : SharedTypes.field) : fieldDoc = { From 1872bb0ae6a337cc03543f4866289fb63f33e69b Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sun, 24 May 2026 02:23:02 -0300 Subject: [PATCH 22/24] Update dune-project and dune files with yojson --- analysis.opam | 1 + dune-project | 6 +++++- tools.opam | 1 + tools/src/dune | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/analysis.opam b/analysis.opam index fe31c79fa42..209189df6e4 100644 --- a/analysis.opam +++ b/analysis.opam @@ -12,6 +12,7 @@ depends: [ "cppo" {= "1.8.0"} "odoc" {with-doc} "lsp" {= "1.22.0"} + "yojson" {= "2.2.2"} ] build: [ ["dune" "subst"] {dev} diff --git a/dune-project b/dune-project index f3cacc6bbcc..7ea218fc1bd 100644 --- a/dune-project +++ b/dune-project @@ -57,7 +57,9 @@ (= 1.8.0)) (odoc :with-doc) (lsp - (= 1.22.0)))) + (= 1.22.0)) + (yojson + (= 2.2.2)))) (package (name tools) @@ -70,4 +72,6 @@ (cppo (= 1.8.0)) analysis + (yojson + (= 2.2.2)) (odoc :with-doc))) diff --git a/tools.opam b/tools.opam index bfcabac6a9f..e70c57f28f6 100644 --- a/tools.opam +++ b/tools.opam @@ -12,6 +12,7 @@ depends: [ "cmarkit" {>= "0.3.0"} "cppo" {= "1.8.0"} "analysis" + "yojson" {= "2.2.2"} "odoc" {with-doc} ] build: [ diff --git a/tools/src/dune b/tools/src/dune index 765cece335f..33a51af1da5 100644 --- a/tools/src/dune +++ b/tools/src/dune @@ -4,4 +4,4 @@ (backend bisect_ppx)) (flags (-w "+6+26+27+32+33+39")) - (libraries analysis cmarkit)) + (libraries analysis cmarkit yojson)) From b70e1abf5b9743076b77a767a5420faa81383a91 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sun, 24 May 2026 09:26:52 -0300 Subject: [PATCH 23/24] Add `version` for textDocument in rename --- analysis/src/Commands.ml | 2 +- .../analysis_tests/tests/src/expected/Cross.res.txt | 9 ++++++--- .../analysis_tests/tests/src/expected/Rename.res.txt | 4 ++-- .../tests/src/expected/RenameWithInterface.res.txt | 12 +++++++++--- .../tests/src/expected/RenameWithInterface.resi.txt | 7 +++++-- 5 files changed, 23 insertions(+), 11 deletions(-) diff --git a/analysis/src/Commands.ml b/analysis/src/Commands.ml index f921f82a34c..45baabba01d 100644 --- a/analysis/src/Commands.ml +++ b/analysis/src/Commands.ml @@ -229,7 +229,7 @@ let rename ~full ~pos ~newName ~debug = (fun uri edits acc -> let textDocument = Lsp.Types.OptionalVersionedTextDocumentIdentifier.create - ~uri:(Uri.fromString uri) () + ~version:0 ~uri:(Uri.fromString uri) () in let textDocumentEdit = `TextDocumentEdit diff --git a/tests/analysis_tests/tests/src/expected/Cross.res.txt b/tests/analysis_tests/tests/src/expected/Cross.res.txt index 7a29f8cbb91..24a89762cfd 100644 --- a/tests/analysis_tests/tests/src/expected/Cross.res.txt +++ b/tests/analysis_tests/tests/src/expected/Cross.res.txt @@ -112,7 +112,7 @@ Rename src/Cross.res 18:13 RenameWithInterfacePrime } } ], - "textDocument": { "uri": "file:///Cross.res" } + "textDocument": { "uri": "file:///Cross.res", "version": 0 } } ] @@ -135,7 +135,10 @@ Rename src/Cross.res 21:28 xPrime } } ], - "textDocument": { "uri": "file:///RenameWithInterface.resi" } + "textDocument": { + "uri": "file:///RenameWithInterface.resi", + "version": 0 + } }, { "edits": [ @@ -154,7 +157,7 @@ Rename src/Cross.res 21:28 xPrime } } ], - "textDocument": { "uri": "file:///Cross.res" } + "textDocument": { "uri": "file:///Cross.res", "version": 0 } } ] diff --git a/tests/analysis_tests/tests/src/expected/Rename.res.txt b/tests/analysis_tests/tests/src/expected/Rename.res.txt index 2ca2e865ccc..b6b193f8d18 100644 --- a/tests/analysis_tests/tests/src/expected/Rename.res.txt +++ b/tests/analysis_tests/tests/src/expected/Rename.res.txt @@ -24,7 +24,7 @@ Rename src/Rename.res 0:4 y } } ], - "textDocument": { "uri": "file:///Rename.res" } + "textDocument": { "uri": "file:///Rename.res", "version": 0 } } ] @@ -47,7 +47,7 @@ Rename src/Rename.res 9:19 yy } } ], - "textDocument": { "uri": "file:///Rename.res" } + "textDocument": { "uri": "file:///Rename.res", "version": 0 } } ] diff --git a/tests/analysis_tests/tests/src/expected/RenameWithInterface.res.txt b/tests/analysis_tests/tests/src/expected/RenameWithInterface.res.txt index 0f699b73991..d824b0501dd 100644 --- a/tests/analysis_tests/tests/src/expected/RenameWithInterface.res.txt +++ b/tests/analysis_tests/tests/src/expected/RenameWithInterface.res.txt @@ -10,7 +10,10 @@ Rename src/RenameWithInterface.res 0:4 y } } ], - "textDocument": { "uri": "file:///RenameWithInterface.resi" } + "textDocument": { + "uri": "file:///RenameWithInterface.resi", + "version": 0 + } }, { "edits": [ @@ -22,7 +25,10 @@ Rename src/RenameWithInterface.res 0:4 y } } ], - "textDocument": { "uri": "file:///RenameWithInterface.res" } + "textDocument": { + "uri": "file:///RenameWithInterface.res", + "version": 0 + } }, { "edits": [ @@ -41,7 +47,7 @@ Rename src/RenameWithInterface.res 0:4 y } } ], - "textDocument": { "uri": "file:///Cross.res" } + "textDocument": { "uri": "file:///Cross.res", "version": 0 } } ] diff --git a/tests/analysis_tests/tests/src/expected/RenameWithInterface.resi.txt b/tests/analysis_tests/tests/src/expected/RenameWithInterface.resi.txt index 2e8ea2d1af7..dc259e411ae 100644 --- a/tests/analysis_tests/tests/src/expected/RenameWithInterface.resi.txt +++ b/tests/analysis_tests/tests/src/expected/RenameWithInterface.resi.txt @@ -17,7 +17,10 @@ Rename src/RenameWithInterface.resi 0:4 y } } ], - "textDocument": { "uri": "file:///RenameWithInterface.resi" } + "textDocument": { + "uri": "file:///RenameWithInterface.resi", + "version": 0 + } }, { "edits": [ @@ -36,7 +39,7 @@ Rename src/RenameWithInterface.resi 0:4 y } } ], - "textDocument": { "uri": "file:///Cross.res" } + "textDocument": { "uri": "file:///Cross.res", "version": 0 } } ] From 1d9d660927fb1bed63851cdd2bcc34ca0047a2fa Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sun, 24 May 2026 13:07:07 -0300 Subject: [PATCH 24/24] Apply codex suggestions --- analysis/reanalyze/src/EmitJson.ml | 15 ++++++++------- analysis/src/Cli.ml | 10 +++++++++- analysis/src/Commands.ml | 12 ++++++------ .../tests/src/expected/PrepareRename.res.txt | 14 ++++++++++---- .../src/expected/DocExtractionRes.res.json | 8 ++++---- tools/src/tools.ml | 2 +- 6 files changed, 38 insertions(+), 23 deletions(-) diff --git a/analysis/reanalyze/src/EmitJson.ml b/analysis/reanalyze/src/EmitJson.ml index 26cf1f199fb..6a636bc8c07 100644 --- a/analysis/reanalyze/src/EmitJson.ml +++ b/analysis/reanalyze/src/EmitJson.ml @@ -4,18 +4,19 @@ let start () = Printf.printf "[" let finish () = Printf.printf "\n]\n" let emitClose () = "\n}" +let jsonString text = Yojson.Safe.to_string (`String text) let emitItem ~ppf ~name ~kind ~file ~range ~message = let open Format in items := !items + 1; let startLine, startCharacter, endLine, endCharacter = range in fprintf ppf "%s{\n" (if !items = 1 then "\n" else ",\n"); - fprintf ppf " \"name\": \"%s\",\n" name; - fprintf ppf " \"kind\": \"%s\",\n" kind; - fprintf ppf " \"file\": \"%s\",\n" file; + fprintf ppf " \"name\": %s,\n" (jsonString name); + fprintf ppf " \"kind\": %s,\n" (jsonString kind); + fprintf ppf " \"file\": %s,\n" (jsonString file); fprintf ppf " \"range\": [%d,%d,%d,%d],\n" startLine startCharacter endLine endCharacter; - fprintf ppf " \"message\": \"%s\"" message + fprintf ppf " \"message\": %s" (jsonString message) let locToPos (loc : Location.t) = (loc.loc_start.pos_lnum - 1, loc.loc_start.pos_cnum - loc.loc_start.pos_bol) @@ -24,6 +25,6 @@ let emitAnnotate ~pos ~text ~action = let line, character = pos in Format.asprintf ",\n\ - \ \"annotate\": { \"line\": %d, \"character\": %d, \"text\": \"%s\", \ - \"action\": \"%s\"}" - line character text action + \ \"annotate\": { \"line\": %d, \"character\": %d, \"text\": %s, \ + \"action\": %s}" + line character (jsonString text) (jsonString action) diff --git a/analysis/src/Cli.ml b/analysis/src/Cli.ml index 4a753191116..727313cb800 100644 --- a/analysis/src/Cli.ml +++ b/analysis/src/Cli.ml @@ -117,7 +117,15 @@ let prepareRename ~path ~pos ~debug = let full = Cmt.loadFullCmtFromPath ~path in match Commands.prepareRename ~full ~pos ~debug with | None -> print_null () - | Some range -> Lsp.Types.Range.yojson_of_t range |> print_string + | Some {range; placeholder = None} -> + Lsp.Types.Range.yojson_of_t range |> print_string + | Some {range; placeholder = Some placeholder} -> + `Assoc + [ + ("range", Lsp.Types.Range.yojson_of_t range); + ("placeholder", `String placeholder); + ] + |> print_string let format ~path = match Files.readFile path with diff --git a/analysis/src/Commands.ml b/analysis/src/Commands.ml index 45baabba01d..8d74388bb7b 100644 --- a/analysis/src/Commands.ml +++ b/analysis/src/Commands.ml @@ -243,6 +243,11 @@ let rename ~full ~pos ~newName ~debug = in result +type prepareRenameResult = { + range: Lsp.Types.Range.t; + placeholder: string option; +} + let prepareRename ~full ~pos ~debug = match full with | None -> None @@ -258,12 +263,7 @@ let prepareRename ~full ~pos ~debug = Some name | _ -> None in - Some - (match placeholderOpt with - | None -> range - | Some _placeholder -> - (* NOTE: ocaml lsp library dont have Lsp.Types.PrepareRename.create *) - range)) + Some {range; placeholder = placeholderOpt}) let format ~source ~kindFile = let create_range text = diff --git a/tests/analysis_tests/tests/src/expected/PrepareRename.res.txt b/tests/analysis_tests/tests/src/expected/PrepareRename.res.txt index 8c174c18c7a..bba85be51cc 100644 --- a/tests/analysis_tests/tests/src/expected/PrepareRename.res.txt +++ b/tests/analysis_tests/tests/src/expected/PrepareRename.res.txt @@ -1,12 +1,18 @@ PrepareRename src/PrepareRename.res 0:4 { - "end": { "character": 5, "line": 0 }, - "start": { "character": 4, "line": 0 } + "range": { + "end": { "character": 5, "line": 0 }, + "start": { "character": 4, "line": 0 } + }, + "placeholder": "x" } PrepareRename src/PrepareRename.res 3:19 { - "end": { "character": 21, "line": 3 }, - "start": { "character": 19, "line": 3 } + "range": { + "end": { "character": 21, "line": 3 }, + "start": { "character": 19, "line": 3 } + }, + "placeholder": "xx" } diff --git a/tests/tools_tests/src/expected/DocExtractionRes.res.json b/tests/tools_tests/src/expected/DocExtractionRes.res.json index 2e0e89ae141..5d3d3c2bdc2 100644 --- a/tests/tools_tests/src/expected/DocExtractionRes.res.json +++ b/tests/tools_tests/src/expected/DocExtractionRes.res.json @@ -19,13 +19,13 @@ "items": [ { "name": "name", - "optional": "false", + "optional": false, "docstrings": [ "The name of the stuff." ], "signature": "string" }, { "name": "online", - "optional": "false", + "optional": false, "docstrings": [ "Whether stuff is online." ], "signature": "bool" } @@ -244,13 +244,13 @@ "fields": [ { "name": "offline", - "optional": "false", + "optional": false, "docstrings": [], "signature": "bool" }, { "name": "online", - "optional": "true", + "optional": true, "docstrings": [ "Is the user online?" ], "signature": "option" } diff --git a/tools/src/tools.ml b/tools/src/tools.ml index b6d664939d3..21cf5eea177 100644 --- a/tools/src/tools.ml +++ b/tools/src/tools.ml @@ -85,7 +85,7 @@ let stringifyFieldDoc (fieldDoc : fieldDoc) = `Assoc ([ ("name", `String fieldDoc.fieldName); - ("optional", `String (string_of_bool fieldDoc.optional)); + ("optional", `Bool fieldDoc.optional); ("docstrings", stringifyDocstrings fieldDoc.docstrings); ("signature", `String fieldDoc.signature); ]