-
Notifications
You must be signed in to change notification settings - Fork 58
/
Copy pathSignatureHelpUncurried.res
78 lines (56 loc) · 1.6 KB
/
SignatureHelpUncurried.res
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
@@uncurried
type someVariant = One | Two | Three
/** Does stuff. */
let someFunc = (one: int, ~two: option<string>=?, ~three: unit => unit, ~four: someVariant, ()) => {
ignore(one)
ignore(two)
ignore(three())
ignore(four)
}
let otherFunc = (first: string, second: int, third: float) => {
ignore(first)
ignore(second)
ignore(third)
}
// let _ = someFunc(
// ^she
// let _ = someFunc(1
// ^she
// let _ = someFunc(123, ~two
// ^she
// let _ = someFunc(123, ~two="123"
// ^she
// let _ = someFunc(123, ~two="123", ~four
// ^she
// let _ = someFunc(123, ~two="123", ~four=O
// ^she
// let _ = otherFunc(
// ^she
// let _ = otherFunc("123"
// ^she
// let _ = otherFunc("123", 123, 123.0)
// ^she
// let _ = Completion.Lib.foo(~age
// ^she
let iAmSoSpecial = (iJustHaveOneArg: string) => {
ignore(iJustHaveOneArg)
}
// let _ = iAmSoSpecial(
// ^she
// let _ = "hello"->otherFunc(1
// ^she
let fn = (age: int, name: string, year: int) => {
ignore(age)
ignore(name)
ignore(year)
}
// let _ = fn(22, )
// ^she
// let _ = fn(22, , 2023)
// ^she
// let _ = fn(12, "hello", )
// ^she
// let _ = fn({ iAmSoSpecial() })
// ^she
// let _ = fn({ iAmSoSpecial({ someFunc() }) })
// ^she