From 398f9cfaa393ac4523b5cf986d930cf6d50a9625 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Wed, 24 Apr 2024 12:24:27 -0300 Subject: [PATCH 1/3] print signature above docstrings --- analysis/src/Hover.ml | 10 +++++----- analysis/tests/src/expected/Definition.res.txt | 2 +- analysis/tests/src/expected/DocComments.res.txt | 10 +++++----- analysis/tests/src/expected/Hover.res.txt | 16 ++++++++-------- analysis/tests/src/expected/JsxV4.res.txt | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/analysis/src/Hover.ml b/analysis/src/Hover.ml index 6fb6661fa..7bcab0cd5 100644 --- a/analysis/src/Hover.ml +++ b/analysis/src/Hover.ml @@ -237,12 +237,12 @@ let newHover ~full:{file; package} ~supportsMarkdownLinks locItem = match References.definedForLoc ~file ~package locKind with | None -> let typeString, docstring = t |> fromType ~docstring:[] in - docstring @ [typeString] + typeString :: docstring | Some (docstring, res) -> ( match res with | `Declared -> let typeString, docstring = t |> fromType ~docstring in - docstring @ [typeString] + typeString :: docstring | `Constructor {cname = {txt}; args; docstring} -> let typeString, docstring = t |> fromType ~docstring in let argsString = @@ -253,9 +253,9 @@ let newHover ~full:{file; package} ~supportsMarkdownLinks locItem = |> List.map (fun (t, _) -> Shared.typeToString t) |> String.concat ", " |> Printf.sprintf "(%s)" in - (Markdown.codeBlock (txt ^ argsString) :: docstring) @ [typeString] + typeString :: Markdown.codeBlock (txt ^ argsString) :: docstring | `Field -> let typeString, docstring = t |> fromType ~docstring in - docstring @ [typeString]) + typeString :: docstring) in - Some (String.concat "\n\n" parts) + Some (String.concat Markdown.divider parts) diff --git a/analysis/tests/src/expected/Definition.res.txt b/analysis/tests/src/expected/Definition.res.txt index 83b89b121..c951332ed 100644 --- a/analysis/tests/src/expected/Definition.res.txt +++ b/analysis/tests/src/expected/Definition.res.txt @@ -5,7 +5,7 @@ Definition src/Definition.res 10:23 {"uri": "Definition.res", "range": {"start": {"line": 6, "character": 7}, "end": {"line": 6, "character": 13}}} Hover src/Definition.res 14:14 -{"contents": {"kind": "markdown", "value": " [List.map f [a1; ...; an]] applies function [f] to [a1, ..., an],\n and builds the list [[f a1; ...; f an]]\n with the results returned by [f]. Not tail-recursive. \n\n```rescript\n('a => 'b, list<'a>) => list<'b>\n```"}} +{"contents": {"kind": "markdown", "value": "```rescript\n('a => 'b, list<'a>) => list<'b>\n```\n [List.map f [a1; ...; an]] applies function [f] to [a1, ..., an],\n and builds the list [[f a1; ...; f an]]\n with the results returned by [f]. Not tail-recursive. "}} Hover src/Definition.res 18:14 {"contents": {"kind": "markdown", "value": "```rescript\n(list<'a>, 'a => 'b) => list<'b>\n```"}} diff --git a/analysis/tests/src/expected/DocComments.res.txt b/analysis/tests/src/expected/DocComments.res.txt index 434f340ff..d0d193ef5 100644 --- a/analysis/tests/src/expected/DocComments.res.txt +++ b/analysis/tests/src/expected/DocComments.res.txt @@ -1,15 +1,15 @@ Hover src/DocComments.res 9:9 -{"contents": {"kind": "markdown", "value": " Doc comment with a triple-backquote example\\n \\n ```res example\\n let a = 10\\n /*\\n * stuff\\n */\\n ```\\n\n\n```rescript\nint\n```"}} +{"contents": {"kind": "markdown", "value": "```rescript\nint\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": "\n Doc comment with a triple-backquote example\n \n ```res example\n let a = 10\n /*\n * stuff\n */\n ```\n\n\n```rescript\nint\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 33:9 -{"contents": {"kind": "markdown", "value": " Doc comment with a triple-backquote example\\n \\n ```res example\\n let a = 10\\n let b = 20\\n ```\\n\n\n```rescript\nint\n```"}} +{"contents": {"kind": "markdown", "value": "```rescript\nint\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": "\n Doc comment with a triple-backquote example\n \n ```res example\n let a = 10\n let b = 20\n ```\n\n\n```rescript\nint\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 48:5 -{"contents": {"kind": "markdown", "value": "New doc comment format\n\n```rescript\nint\n```"}} +{"contents": {"kind": "markdown", "value": "```rescript\nint\n```\nNew doc comment format"}} diff --git a/analysis/tests/src/expected/Hover.res.txt b/analysis/tests/src/expected/Hover.res.txt index db72b3799..b50add3de 100644 --- a/analysis/tests/src/expected/Hover.res.txt +++ b/analysis/tests/src/expected/Hover.res.txt @@ -11,7 +11,7 @@ Hover src/Hover.res 19:11 {"contents": {"kind": "markdown", "value": "\nThis module is commented\n```rescript\nmodule Dep: {\n let customDouble: int => int\n}\n```"}} Hover src/Hover.res 22:11 -{"contents": {"kind": "markdown", "value": "Some doc comment\n\n```rescript\nint => int\n```"}} +{"contents": {"kind": "markdown", "value": "```rescript\nint => int\n```\nSome doc comment"}} Hover src/Hover.res 26:6 getLocItem #8: heuristic for JSX with at most one child @@ -19,7 +19,7 @@ heuristic for: [makeProps, make, createElement], give the loc of `make` {"contents": {"kind": "markdown", "value": "```rescript\nint\n```"}} Hover src/Hover.res 33:4 -{"contents": {"kind": "markdown", "value": "Doc comment for functionWithTypeAnnotation\n\n```rescript\nunit => int\n```"}} +{"contents": {"kind": "markdown", "value": "```rescript\nunit => int\n```\nDoc comment for functionWithTypeAnnotation"}} Hover src/Hover.res 37:13 getLocItem #5: heuristic for JSX and compiler combined: @@ -103,10 +103,10 @@ Hover src/Hover.res 137:5 {"contents": {"kind": "markdown", "value": "```rescript\nunit => unit => int\n```"}} Hover src/Hover.res 144:9 -{"contents": {"kind": "markdown", "value": "doc comment 1\n\n```rescript\nint\n```"}} +{"contents": {"kind": "markdown", "value": "```rescript\nint\n```\ndoc comment 1"}} Hover src/Hover.res 148:6 -{"contents": {"kind": "markdown", "value": " doc comment 2 \n\n```rescript\nint\n```"}} +{"contents": {"kind": "markdown", "value": "```rescript\nint\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"}} @@ -206,10 +206,10 @@ Resolved opens 1 pervasives {"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": " More Stuff \n\n```rescript\nint\n```"}} +{"contents": {"kind": "markdown", "value": "```rescript\nint\n```\n More Stuff "}} Hover src/Hover.res 233:17 -{"contents": {"kind": "markdown", "value": " More Stuff \n\n```rescript\nint\n```"}} +{"contents": {"kind": "markdown", "value": "```rescript\nint\n```\n More Stuff "}} Hover src/Hover.res 245:6 Nothing at that position. Now trying to use completion. @@ -226,10 +226,10 @@ Resolved opens 1 pervasives {"contents": {"kind": "markdown", "value": " Mighty fine field here. \n\n```rescript\nbool\n```"}} Hover src/Hover.res 248:19 -{"contents": {"kind": "markdown", "value": " Mighty fine field here. \n\n```rescript\nbool\n```"}} +{"contents": {"kind": "markdown", "value": "```rescript\nbool\n```\n Mighty fine field here. "}} Hover src/Hover.res 253:20 -{"contents": {"kind": "markdown", "value": "```rescript\nCoolVariant\n```\n\n Cool variant! \n\n```rescript\nvariant\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\nvariant\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\n```rescript\nCoolVariant\n```\n Cool variant! "}} Hover src/Hover.res 257:23 Nothing at that position. Now trying to use completion. diff --git a/analysis/tests/src/expected/JsxV4.res.txt b/analysis/tests/src/expected/JsxV4.res.txt index ce2c9ffba..dfb8df623 100644 --- a/analysis/tests/src/expected/JsxV4.res.txt +++ b/analysis/tests/src/expected/JsxV4.res.txt @@ -17,7 +17,7 @@ Path M4.make }] Hover src/JsxV4.res 14:9 -{"contents": {"kind": "markdown", "value": " Doc Comment For M4 \n\n```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%2C12%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---\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%2C12%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\n Doc Comment For M4 "}} Create Interface src/JsxV4.res module M4: { From 43b610094ec2ebaccd86fe3fec8885a0aa0cc303 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Wed, 24 Apr 2024 12:30:25 -0300 Subject: [PATCH 2/3] update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0417098d6..53900fedc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ - Make sure doc strings are always on top in hovers. https://github.com/rescript-lang/rescript-vscode/pull/956 - Make JSX completion work for `make` functions of type `React.component`, like what you get when using `React.lazy_`. https://github.com/rescript-lang/rescript-vscode/pull/966 +- Hover: print signature above docstrings. https://github.com/rescript-lang/rescript-vscode/pull/969 #### :rocket: New Feature From 0391e72c56e1fb8d3ea410269207350e90c2208d Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Wed, 24 Apr 2024 12:30:45 -0300 Subject: [PATCH 3/3] update tests --- analysis/tests/src/expected/Definition.res.txt | 2 +- analysis/tests/src/expected/DocComments.res.txt | 10 +++++----- analysis/tests/src/expected/Hover.res.txt | 16 ++++++++-------- analysis/tests/src/expected/JsxV4.res.txt | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/analysis/tests/src/expected/Definition.res.txt b/analysis/tests/src/expected/Definition.res.txt index c951332ed..69f87b41e 100644 --- a/analysis/tests/src/expected/Definition.res.txt +++ b/analysis/tests/src/expected/Definition.res.txt @@ -5,7 +5,7 @@ Definition src/Definition.res 10:23 {"uri": "Definition.res", "range": {"start": {"line": 6, "character": 7}, "end": {"line": 6, "character": 13}}} Hover src/Definition.res 14:14 -{"contents": {"kind": "markdown", "value": "```rescript\n('a => 'b, list<'a>) => list<'b>\n```\n [List.map f [a1; ...; an]] applies function [f] to [a1, ..., an],\n and builds the list [[f a1; ...; f an]]\n with the results returned by [f]. Not tail-recursive. "}} +{"contents": {"kind": "markdown", "value": "```rescript\n('a => 'b, list<'a>) => list<'b>\n```\n---\n [List.map f [a1; ...; an]] applies function [f] to [a1, ..., an],\n and builds the list [[f a1; ...; f an]]\n with the results returned by [f]. Not tail-recursive. "}} Hover src/Definition.res 18:14 {"contents": {"kind": "markdown", "value": "```rescript\n(list<'a>, 'a => 'b) => list<'b>\n```"}} diff --git a/analysis/tests/src/expected/DocComments.res.txt b/analysis/tests/src/expected/DocComments.res.txt index d0d193ef5..1f8ab304d 100644 --- a/analysis/tests/src/expected/DocComments.res.txt +++ b/analysis/tests/src/expected/DocComments.res.txt @@ -1,15 +1,15 @@ Hover src/DocComments.res 9:9 -{"contents": {"kind": "markdown", "value": "```rescript\nint\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 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 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 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```\nNew doc comment format"}} +{"contents": {"kind": "markdown", "value": "```rescript\nint\n```\n---\nNew doc comment format"}} diff --git a/analysis/tests/src/expected/Hover.res.txt b/analysis/tests/src/expected/Hover.res.txt index b50add3de..725c5a93a 100644 --- a/analysis/tests/src/expected/Hover.res.txt +++ b/analysis/tests/src/expected/Hover.res.txt @@ -11,7 +11,7 @@ Hover src/Hover.res 19:11 {"contents": {"kind": "markdown", "value": "\nThis module is commented\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```\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 @@ -19,7 +19,7 @@ heuristic for: [makeProps, make, createElement], give the loc of `make` {"contents": {"kind": "markdown", "value": "```rescript\nint\n```"}} Hover src/Hover.res 33:4 -{"contents": {"kind": "markdown", "value": "```rescript\nunit => int\n```\nDoc comment for functionWithTypeAnnotation"}} +{"contents": {"kind": "markdown", "value": "```rescript\nunit => int\n```\n---\nDoc comment for functionWithTypeAnnotation"}} Hover src/Hover.res 37:13 getLocItem #5: heuristic for JSX and compiler combined: @@ -103,10 +103,10 @@ Hover src/Hover.res 137:5 {"contents": {"kind": "markdown", "value": "```rescript\nunit => unit => int\n```"}} Hover src/Hover.res 144:9 -{"contents": {"kind": "markdown", "value": "```rescript\nint\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 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"}} @@ -206,10 +206,10 @@ Resolved opens 1 pervasives {"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 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 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. @@ -226,10 +226,10 @@ Resolved opens 1 pervasives {"contents": {"kind": "markdown", "value": " Mighty fine field here. \n\n```rescript\nbool\n```"}} Hover src/Hover.res 248:19 -{"contents": {"kind": "markdown", "value": "```rescript\nbool\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\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\n```rescript\nCoolVariant\n```\n Cool variant! "}} +{"contents": {"kind": "markdown", "value": "```rescript\nvariant\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\n---\n```rescript\nCoolVariant\n```\n---\n Cool variant! "}} Hover src/Hover.res 257:23 Nothing at that position. Now trying to use completion. diff --git a/analysis/tests/src/expected/JsxV4.res.txt b/analysis/tests/src/expected/JsxV4.res.txt index dfb8df623..339562bda 100644 --- a/analysis/tests/src/expected/JsxV4.res.txt +++ b/analysis/tests/src/expected/JsxV4.res.txt @@ -17,7 +17,7 @@ Path M4.make }] Hover src/JsxV4.res 14:9 -{"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%2C12%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\n Doc Comment For M4 "}} +{"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%2C12%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\n---\n Doc Comment For M4 "}} Create Interface src/JsxV4.res module M4: {