Skip to content

Commit 4c92796

Browse files
aspeddrozth
authored andcommitted
fix examples
1 parent 22328b6 commit 4c92796

File tree

1 file changed

+31
-34
lines changed

1 file changed

+31
-34
lines changed

src/Core__Console.resi

Lines changed: 31 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ external log: 'a => unit = "console.log"
2626
2727
```rescript
2828
Console.log2("Hello", "World")
29-
Console.log2([1, 2, 3], [4])
29+
Console.log2([1, 2, 3], '4')
3030
```
3131
*/
3232
@val
@@ -39,7 +39,7 @@ external log2: ('a, 'b) => unit = "console.log"
3939
4040
```rescript
4141
Console.log3("Hello", "World", "ReScript")
42-
Console.log2([1, 2, 3], [4], [5])
42+
Console.log2("One", 2, #3)
4343
```
4444
*/
4545
@val
@@ -51,7 +51,7 @@ external log3: ('a, 'b, 'c) => unit = "console.log"
5151
5252
```rescript
5353
Console.log4("Hello", "World", "ReScript", "!!!")
54-
Console.log4([1, 2, 3], [4], [5])
54+
Console.log4([1, 2], (3, 4), [#5, #6], #"polyvar")
5555
```
5656
*/
5757
@val
@@ -63,8 +63,8 @@ external log4: ('a, 'b, 'c, 'd) => unit = "console.log"
6363
## Examples
6464
6565
```rescript
66-
Console.log5("Hello", "World", "from", "JS", "!!!")
67-
Console.log5(1, 2, 3, 4, 5)
66+
Console.log5("Hello", "World", "JS", '!', '!')
67+
Console.log5([1, 2], (3, 4), [#5, #6], #"polyvar", {"name": "ReScript"})
6868
```
6969
*/
7070
@val
@@ -77,35 +77,34 @@ on MDN.
7777
## Examples
7878
7979
```rescript
80-
Console.info("Hello")
81-
Console.info([1, 2, 3])
82-
Console.info(("Hello", "ReScript"))
80+
Console.info("Information")
81+
Console.info(("Hello", "JS"))
8382
```
8483
*/
8584
@val
8685
external info: 'a => unit = "console.info"
8786

8887
/**
89-
`info2(v1, v2)`. Like `info`, but two arguments.
88+
`info2(v1, v2)`. Like `info`, but with two arguments.
9089
9190
## Examples
9291
9392
```rescript
94-
Console.info2("Failed to", "download")
95-
Console.info2([""])
93+
Console.info2("Info", "failed to download")
94+
Console.info2(#info, {"name": "ReScript"})
9695
```
9796
*/
9897
@val
9998
external info2: ('a, 'b) => unit = "console.info"
10099

101100
/**
102-
`info3(v1, v2, v3)`. Like `info`, but three arguments.
101+
`info3(v1, v2, v3)`. Like `info`, but with three arguments.
103102
104103
## Examples
105104
106105
```rescript
107106
Console.info3("Hello", "World", "ReScript")
108-
Console.info3([1, 2, 3], [4], [5])
107+
Console.info3([1, 2, 3], #4, #5)
109108
```
110109
*/
111110
@val
@@ -117,8 +116,8 @@ external info3: ('a, 'b, 'c) => unit = "console.info"
117116
## Examples
118117
119118
```rescript
120-
Console.info4("Hello", "World", "ReScript", "!!!")
121-
Console.info4([1, 2, 3], [4], [5])
119+
Console.info4("Hello", "World", "ReScript", '!')
120+
Console.info4([1, 2, 3], #4, #5, #lastinfo)
122121
```
123122
*/
124123
@val
@@ -131,7 +130,7 @@ external info4: ('a, 'b, 'c, 'd) => unit = "console.info"
131130
132131
```rescript
133132
Console.info5("Hello", "World", "from", "JS", "!!!")
134-
Console.info5(1, 2, 3, 4, 5)
133+
Console.info5([1, 2], (3, 4), [#5, #6], #"polyvar", {"name": "ReScript"})
135134
```
136135
*/
137136
@val
@@ -145,9 +144,8 @@ on MDN.
145144
## Examples
146145
147146
```rescript
148-
Console.warn("Hello")
149-
Console.warn([1, 2, 3])
150-
Console.warn(("Hello", "ReScript"))
147+
Console.warn("Warning")
148+
Console.warn(("Warning", "invalid number"))
151149
```
152150
*/
153151
@val
@@ -160,7 +158,7 @@ external warn: 'a => unit = "console.warn"
160158
161159
```rescript
162160
Console.warn2("Hello", "World")
163-
Console.warn2([1, 2, 3], [4])
161+
Console.warn2([1, 2, 3], 4)
164162
```
165163
*/
166164
@val
@@ -173,7 +171,7 @@ external warn2: ('a, 'b) => unit = "console.warn"
173171
174172
```rescript
175173
Console.warn3("Hello", "World", "ReScript")
176-
Console.warn3([1, 2, 3], [4], [5])
174+
Console.warn3([1, 2, 3], #4, #5)
177175
```
178176
*/
179177
@val
@@ -186,7 +184,7 @@ external warn3: ('a, 'b, 'c) => unit = "console.warn"
186184
187185
```rescript
188186
Console.warn4("Hello", "World", "ReScript", "!!!")
189-
Console.warn4([1, 2, 3], [4], [5])
187+
Console.warn4(#first, #second, #third, ("fourth"))
190188
```
191189
*/
192190
@val
@@ -199,7 +197,7 @@ external warn4: ('a, 'b, 'c, 'd) => unit = "console.warn"
199197
200198
```rescript
201199
Console.warn5("Hello", "World", "from", "JS", "!!!")
202-
Console.warn5(1, 2, 3, 4, 5)
200+
Console.warn5([1, 2], (3, 4), [#5, #6], #"polyvar", {"name": "ReScript"})
203201
```
204202
*/
205203
@val
@@ -213,9 +211,8 @@ on MDN.
213211
## Examples
214212
215213
```rescript
216-
Console.error("Hello")
217-
Console.error([1, 2, 3])
218-
Console.error(("Hello", "ReScript"))
214+
Console.error("error message")
215+
Console.error(("error", "invalid value"))
219216
```
220217
*/
221218
@val
@@ -227,8 +224,8 @@ external error: 'a => unit = "console.error"
227224
## Examples
228225
229226
```rescript
230-
Console.error("Hello", "World")
231-
Console.error([1, 2, 3], [4])
227+
Console.error2("Error", "here")
228+
Console.error2(("log", "error"), "message")
232229
```
233230
*/
234231
@val
@@ -240,8 +237,8 @@ external error2: ('a, 'b) => unit = "console.error"
240237
## Examples
241238
242239
```rescript
243-
Console.error3("Hello", "World", "ReScript")
244-
Console.error3([1, 2, 3], [4], [5])
240+
Console.error3("Hello", "World", "!!!")
241+
Console.error3(#first, #second, #third)
245242
```
246243
*/
247244
@val
@@ -253,8 +250,8 @@ external error3: ('a, 'b, 'c) => unit = "console.error"
253250
## Examples
254251
255252
```rescript
256-
Console.error("Hello", "World", "ReScript", "!!!")
257-
Console.error([1, 2, 3], [4], [5])
253+
Console.error4("Hello", "World", "ReScript", '!')
254+
Console.error4(#first, #second, #third, ("fourth"))
258255
```
259256
*/
260257
@val
@@ -266,8 +263,8 @@ external error4: ('a, 'b, 'c, 'd) => unit = "console.error"
266263
## Examples
267264
268265
```rescript
269-
Console.error5("Hello", "World", "from", "JS", "!!!")
270-
Console.error5(1, 2, 3, 4, 5)
266+
Console.error5('e', 'r, 'r', 'o', 'r')
267+
Console.error5(1, #second, #third, ("fourth"), 'c')
271268
```
272269
*/
273270
@val

0 commit comments

Comments
 (0)