Skip to content

Commit 5fb1622

Browse files
authored
Fix doc comments (no @ocaml.*) (#6856)
* Check in changes after make lib * Fix doc comments (no @ocaml.*)
1 parent 99470c6 commit 5fb1622

File tree

7 files changed

+341
-304
lines changed

7 files changed

+341
-304
lines changed

jscomp/others/belt_HashSetInt.resi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
2424

2525
/***
26-
This module is [`Belt.HashSet`]() specialized with key type to be a primitive type.
26+
This module is [`Belt.HashSet`]() specialized with key type to be a primitive type.
2727
28-
It is more efficient in general, the API is the same with [`Belt.HashSet`]() except its key type is fixed,
29-
and identity is not needed(using the built-in one)
28+
It is more efficient in general, the API is the same with [`Belt.HashSet`]() except its key type is fixed,
29+
and identity is not needed(using the built-in one)
3030
31-
**See** [`Belt.HashSet`]()
31+
**See** [`Belt.HashSet`]()
3232
*/
3333

3434
type key = int

jscomp/others/belt_HashSetString.resi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
2424

2525
/***
26-
This module is [`Belt.HashSet`]() specialized with key type to be a primitive type.
26+
This module is [`Belt.HashSet`]() specialized with key type to be a primitive type.
2727
28-
It is more efficient in general, the API is the same with [`Belt.HashSet`]() except its key type is fixed,
29-
and identity is not needed(using the built-in one)
28+
It is more efficient in general, the API is the same with [`Belt.HashSet`]() except its key type is fixed,
29+
and identity is not needed(using the built-in one)
3030
31-
**See** [`Belt.HashSet`]()
31+
**See** [`Belt.HashSet`]()
3232
*/
3333

3434
type key = string

jscomp/others/js.res

Lines changed: 66 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,15 @@
2323
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
2424

2525
@@config({flags: ["-unboxed-types", "-w", "-49"]})
26-
@@ocaml.text(/* DESIGN:
26+
27+
/* DESIGN:
2728
- It does not have any code, all its code will be inlined so that
2829
there will never be
2930
{[ require('js')]}
3031
- Its interface should be minimal
3132
*/
3233

33-
"
34+
/***
3435
The Js module mostly contains ReScript bindings to _standard JavaScript APIs_
3536
like [console.log](https://developer.mozilla.org/en-US/docs/Web/API/Console/log),
3637
or the JavaScript
@@ -71,9 +72,9 @@ Js.log(Js.String.startsWith(\"Re\", \"ReScript\"))
7172
## Js.Xxx2 Modules
7273
7374
Prefer `Js.Array2` over `Js.Array`, `Js.String2` over `Js.String`, etc. The latters are old modules.
74-
")
75+
*/
7576

76-
@ocaml.doc(" JS object type ")
77+
/** JS object type */
7778
type t<'a> = {..} as 'a
7879

7980
module MapperRt = Js_mapperRt
@@ -86,24 +87,22 @@ module Internal = {
8687
external opaque: 'a => 'a = "%opaque"
8788
}
8889

89-
@@ocaml.text("/*")
90-
91-
@ocaml.doc("
90+
/**
9291
Nullable value of this type can be either null or 'a. This type is equivalent to Js.Null.t.
93-
")
92+
*/
9493
@unboxed
9594
type null<+'a> = Value('a) | @as(null) Null
9695

97-
@ocaml.doc("
96+
/**
9897
A value of this type can be either undefined or 'a. This type is equivalent to Js.Undefined.t.
99-
")
98+
*/
10099
type undefined<+'a>
101100

102101
@unboxed type nullable<+'a> = Value('a) | @as(null) Null | @as(undefined) Undefined
103102

104-
@@ocaml.text("
103+
/***
105104
A value of this type can be undefined, null or 'a. This type is equivalent to Js.Null_undefined.t.
106-
")
105+
*/
107106

108107
type null_undefined<+'a> = nullable<'a>
109108

@@ -113,177 +112,174 @@ external nullToOption: null<'a> => option<'a> = "#null_to_opt"
113112
external isNullable: nullable<'a> => bool = "#is_nullable"
114113
external import: 'a => promise<'a> = "#import"
115114

116-
@ocaml.doc(" The same as {!test} except that it is more permissive on the types of input ")
115+
/** The same as {!test} except that it is more permissive on the types of input */
117116
external testAny: 'a => bool = "#is_nullable"
118117

119-
@ocaml.doc("
118+
/**
120119
The promise type, defined here for interoperation across packages.
121-
")
120+
*/
122121
type promise<+'a, +'e>
123122

124-
@ocaml.doc("
123+
/**
125124
The same as empty in `Js.Null`. Compiles to `null`.
126-
")
125+
*/
127126
external null: null<'a> = "#null"
128127

129-
@ocaml.doc("
128+
/**
130129
The same as empty `Js.Undefined`. Compiles to `undefined`.
131-
")
130+
*/
132131
external undefined: undefined<'a> = "#undefined"
133132

134-
@ocaml.doc("
133+
/**
135134
`typeof x` will be compiled as `typeof x` in JS. Please consider functions in
136135
`Js.Types` for a type safe way of reflection.
137-
")
136+
*/
138137
external typeof: 'a => string = "#typeof"
139138

140-
@val @scope("console") @ocaml.doc(" Equivalent to console.log any value. ")
139+
@val @scope("console") /** Equivalent to console.log any value. */
141140
external log: 'a => unit = "log"
142141

143142
@val @scope("console") external log2: ('a, 'b) => unit = "log"
144143
@val @scope("console") external log3: ('a, 'b, 'c) => unit = "log"
145144

146145
@val @scope("console") external log4: ('a, 'b, 'c, 'd) => unit = "log"
147146

148-
@val
149-
@scope("console")
150-
@variadic
151-
@ocaml.doc(" A convenience function to console.log more than 4 arguments ")
147+
@val @scope("console") @variadic /** A convenience function to console.log more than 4 arguments */
152148
external logMany: array<'a> => unit = "log"
153149

154150
external eqNull: ('a, null<'a>) => bool = "%bs_equal_null"
155151
external eqUndefined: ('a, undefined<'a>) => bool = "%bs_equal_undefined"
156152
external eqNullable: ('a, nullable<'a>) => bool = "%bs_equal_nullable"
157153

158-
@@ocaml.text(" ## Operators ")
154+
/* ## Operators */
159155

160-
@ocaml.doc("
156+
/**
161157
`unsafe_lt(a, b)` will be compiled as `a < b`.
162158
It is marked as unsafe, since it is impossible
163159
to give a proper semantics for comparision which applies to any type
164-
")
160+
*/
165161
external unsafe_lt: ('a, 'a) => bool = "#unsafe_lt"
166162

167-
@ocaml.doc("
163+
/**
168164
`unsafe_le(a, b)` will be compiled as `a <= b`.
169165
See also `Js.unsafe_lt`.
170-
")
166+
*/
171167
external unsafe_le: ('a, 'a) => bool = "#unsafe_le"
172168

173-
@ocaml.doc("
169+
/**
174170
`unsafe_gt(a, b)` will be compiled as `a > b`.
175171
See also `Js.unsafe_lt`.
176-
")
172+
*/
177173
external unsafe_gt: ('a, 'a) => bool = "#unsafe_gt"
178174

179-
@ocaml.doc("
175+
/**
180176
`unsafe_ge(a, b)` will be compiled as `a >= b`.
181177
See also `Js.unsafe_lt`.
182-
")
178+
*/
183179
external unsafe_ge: ('a, 'a) => bool = "#unsafe_ge"
184180

185-
@@ocaml.text(" ## Nested Modules ")
181+
/* ## Nested Modules */
186182

187-
@ocaml.doc(" Provide utilities for `Js.null<'a>` ")
183+
/** Provide utilities for `Js.null<'a>` */
188184
module Null = Js_null
189185

190-
@ocaml.doc(" Provide utilities for `Js.undefined<'a>` ")
186+
/** Provide utilities for `Js.undefined<'a>` */
191187
module Undefined = Js_undefined
192188

193-
@ocaml.doc(" Provide utilities for `Js.null_undefined` ")
189+
/** Provide utilities for `Js.null_undefined` */
194190
module Nullable = Js_null_undefined
195191

196192
module Null_undefined = Js_null_undefined
197193

198-
@ocaml.doc(" Provide utilities for dealing with Js exceptions ")
194+
/** Provide utilities for dealing with Js exceptions */
199195
module Exn = Js_exn
200196

201-
@ocaml.doc(" Provide bindings to JS array")
197+
/** Provide bindings to JS array*/
202198
module Array = Js_array
203199

204-
@ocaml.doc(" Provide bindings to JS array")
200+
/** Provide bindings to JS array*/
205201
module Array2 = Js_array2
206202

207-
@ocaml.doc(" Provide bindings to JS string ")
203+
/** Provide bindings to JS string */
208204
module String = Js_string
209205

210-
@ocaml.doc(" Provide bindings to JS string ")
206+
/** Provide bindings to JS string */
211207
module String2 = Js_string2
212208

213-
@ocaml.doc(" Provide bindings to JS regex expression ")
209+
/** Provide bindings to JS regex expression */
214210
module Re = Js_re
215211

216-
@ocaml.doc(" Provide bindings to JS Promise ")
212+
/** Provide bindings to JS Promise */
217213
module Promise = Js_promise
218214

219-
@ocaml.doc(" Provide bindings to JS Promise ")
215+
/** Provide bindings to JS Promise */
220216
module Promise2 = Js_promise2
221217

222-
@ocaml.doc(" Provide bindings for JS Date ")
218+
/** Provide bindings for JS Date */
223219
module Date = Js_date
224220

225-
@ocaml.doc(" Provide utilities for JS dictionary object ")
221+
/** Provide utilities for JS dictionary object */
226222
module Dict = Js_dict
227223

228-
@ocaml.doc(" Provide bindings to JS global functions in global namespace")
224+
/** Provide bindings to JS global functions in global namespace*/
229225
module Global = Js_global
230226

231-
@ocaml.doc(" Provide utilities for json ")
227+
/** Provide utilities for json */
232228
module Json = Js_json
233229

234-
@ocaml.doc(" Provide bindings for JS `Math` object ")
230+
/** Provide bindings for JS `Math` object */
235231
module Math = Js_math
236232

237-
@ocaml.doc(" Provide utilities for `Js.t` ")
233+
/** Provide utilities for `Js.t` */
238234
module Obj = Js_obj
239235

240-
@ocaml.doc(" Provide bindings for JS typed array ")
236+
/** Provide bindings for JS typed array */
241237
module Typed_array = Js_typed_array
242238

243-
@ocaml.doc(" Provide bindings for JS typed array ")
239+
/** Provide bindings for JS typed array */
244240
module TypedArray2 = Js_typed_array2
245241

246-
@ocaml.doc(" Provide utilities for manipulating JS types ")
242+
/** Provide utilities for manipulating JS types */
247243
module Types = Js_types
248244

249-
@ocaml.doc(" Provide utilities for JS float ")
245+
/** Provide utilities for JS float */
250246
module Float = Js_float
251247

252-
@ocaml.doc(" Provide utilities for int ")
248+
/** Provide utilities for int */
253249
module Int = Js_int
254250

255-
@ocaml.doc(" Provide utilities for bigint ")
251+
/** Provide utilities for bigint */
256252
module BigInt = Js_bigint
257253

258-
@ocaml.doc(" Provide utilities for File ")
254+
/** Provide utilities for File */
259255
module File = Js_file
260256

261-
@ocaml.doc(" Provide utilities for Blob ")
257+
/** Provide utilities for Blob */
262258
module Blob = Js_blob
263259

264-
@ocaml.doc(" Provide utilities for option ")
260+
/** Provide utilities for option */
265261
module Option = Js_option
266262

267-
@ocaml.doc(" Define the interface for result ")
263+
/** Define the interface for result */
268264
module Result = Js_result
269265

270-
@ocaml.doc(" Provide utilities for list ")
266+
/** Provide utilities for list */
271267
module List = Js_list
272268

273-
@ocaml.doc(" Provides bindings for JS Vector ")
269+
/** Provides bindings for JS Vector */
274270
module Vector = Js_vector
275271

276-
@ocaml.doc(" Provides bindings for console ")
272+
/** Provides bindings for console */
277273
module Console = Js_console
278274

279-
@ocaml.doc(" Provides bindings for ES6 Set ")
275+
/** Provides bindings for ES6 Set */
280276
module Set = Js_set
281277

282-
@ocaml.doc(" Provides bindings for ES6 WeakSet ")
278+
/** Provides bindings for ES6 WeakSet */
283279
module WeakSet = Js_weakset
284280

285-
@ocaml.doc(" Provides bindings for ES6 Map ")
281+
/** Provides bindings for ES6 Map */
286282
module Map = Js_map
287283

288-
@ocaml.doc(" Provides bindings for ES6 WeakMap ")
284+
/** Provides bindings for ES6 WeakMap */
289285
module WeakMap = Js_weakmap

0 commit comments

Comments
 (0)