Skip to content

Commit fbafb9d

Browse files
committed
Give an explicit example of hover on V4 component.
1 parent 7aeb9e8 commit fbafb9d

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

analysis/tests/src/Hover.res

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,3 +186,14 @@ module TypeSubstitutionRecords = {
186186
// y2.content.
187187
// ^com
188188
}
189+
190+
module CompV4 = {
191+
type props<'n, 's> = {n?: 'n, s: 's}
192+
let make = props => {
193+
let _ = props.n == Some (10)
194+
React.string(props.s)
195+
}
196+
}
197+
198+
let mk = CompV4.make
199+
// ^hov

analysis/tests/src/expected/Hover.res.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,6 @@ Completable: Cpath Value[y2].content.""
158158
"documentation": null
159159
}]
160160

161+
Hover src/Hover.res 197:4
162+
{"contents": "```rescript\nCompV4.props<int, string> => React.element\n```\n\n```rescript\ntype props<'n, 's> = {n: option<'n>, s: 's}\n```\n\n```rescript\ntype element\n```"}
163+

0 commit comments

Comments
 (0)