Skip to content

Commit d97112a

Browse files
authored
Merge pull request #1133 from keleshev/patch-4
Manual typos
2 parents 8f0755c + 504472d commit d97112a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

site/docsource/OCaml-call-JS.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ BuckleScript support typing homogeneous variadic arguments. For example,
224224
[source,ocaml]
225225
--------------
226226
external join : string array -> string = "" [@@bs.module "path"] [@@bs.splice]
227-
let v = join [| "a" "b"|]
227+
let v = join [| "a"; "b"|]
228228
--------------
229229

230230
[source,js]
@@ -740,7 +740,7 @@ reserved for `this` and for arity of 0, there is no need for a redundant `unit`
740740

741741
[source,ocaml]
742742
-----------------
743-
let f : 'obj -> 'b' [@bs.this] =
743+
let f : 'obj -> 'b [@bs.this] =
744744
fun [@bs.this] obj -> ....
745745
let f1 : 'obj -> 'a0 -> 'b [@bs.this] =
746746
fun [@bs.this] obj a -> ...
@@ -1018,15 +1018,15 @@ Objects in a collection also works:
10181018

10191019
[source,ocaml]
10201020
-------------
1021-
let xs = [%bs.obj [| { x = 3 } ; {x = 3 } |] : < x : int > array ]
1022-
let ys = [%bs.obj [| { x = 3} : { x = 4 } |] ]
1021+
let xs = [%bs.obj [| { x = 3 } ; { x = 3 } |] : < x : int > array ]
1022+
let ys = [%bs.obj [| { x = 3 } ; { x = 4 } |] ]
10231023
-------------
10241024

10251025
Output:
10261026
[source,js]
10271027
---------------------------------
1028-
var xs = [ { x : 3 } , { x : 3 }]
1029-
var ys = [ { x : 3 }, {x : 4 } ]
1028+
var xs = [ { x : 3 } , { x : 3 } ]
1029+
var ys = [ { x : 3 } , { x : 4 } ]
10301030
---------------------------------
10311031

10321032
#### Create JS objects using external
@@ -1041,7 +1041,7 @@ let v = make_config ~hi:2 ~lo:3
10411041
Output:
10421042
[source,js]
10431043
-----------------------
1044-
var v = { hi:2, lo:3}
1044+
var v = { hi : 2 , lo : 3 }
10451045
-----------------------
10461046

10471047
Option argument is also supported:
@@ -1081,7 +1081,7 @@ Output:
10811081
[source,js]
10821082
-----------------------------------------------------------------
10831083
1084-
var u = { x : { y : {z : 3}}, fn : function (u,v) {return u + v}}
1084+
var u = { x : { y : { z : 3 } }, fn : function (u, v) {return u + v}}
10851085
var h = u.x.y.z
10861086
var a = h.fn
10871087
var b = a(1,2)

0 commit comments

Comments
 (0)