Module Js
type +'a nullA value of this type can be either null or 'a. This type is the same as type t in Null
type +'a undefinedA value of this type can be either undefined or 'a. This type is the same as type t in Undefined
type +'a nullableA value of this type can be undefined, null or 'a. This type is the same as type t n Nullable
type reThe type for JavaScript RegExp
type 'a dictThe type for a simple key-value dictionary abstraction over native JavaScript objects
type 'a iteratorThe type for JavaScript iterators
type 'a array_likeThe type for array-like objects in JavaScript
type bigintThe type for JavaScript BigInt
type +'a promiseThe type for JavaScript Promise
type blobThe type for JavaScript Blob
type fileThe type for JavaScript File
type arrayBuffertype int8Arraytype uint8Arraytype uint8ClampedArraytype int16Arraytype uint16Arraytype int32Arraytype uint32Arraytype float32Arraytype float64Arrayval toOption : 'a nullable -> 'a optionval undefinedToOption : 'a undefined -> 'a optionval nullToOption : 'a null -> 'a optionval isNullable : 'a nullable -> boolval import : 'a -> 'a promiseTODO(anmonteiro): document
val testAny : 'a -> boolThe same as isNullable except that it is more permissive on the types of input
val null : 'a nullThe same as empty in Js.Null will be compiled as null
val undefined : 'a undefinedThe same as empty Js.Undefined will be compiled as undefined
val typeof : 'a -> stringtypeof x will be compiled as typeof x in JS Please consider functions in Types for a type safe way of reflection
val log : 'a -> unitA convenience function to log everything
val log2 : 'a -> 'b -> unitval log3 : 'a -> 'b -> 'c -> unitval log4 : 'a -> 'b -> 'c -> 'd -> unitval logMany : 'a array -> unitA convenience function to log more than 4 arguments
val eqNull : 'a -> 'a null -> boolval eqUndefined : 'a -> 'a undefined -> boolval eqNullable : 'a -> 'a nullable -> boolOperators
val unsafe_lt : 'a -> 'a -> boolunsafe_lt a b will be compiled as a < b. It is marked as unsafe, since it is impossible to give a proper semantics for comparision which applies to any type
val unsafe_le : 'a -> 'a -> boolunsafe_le a b will be compiled as a <= b. See also unsafe_lt
val unsafe_gt : 'a -> 'a -> boolunsafe_gt a b will be compiled as a > b. See also unsafe_lt
val unsafe_ge : 'a -> 'a -> boolunsafe_ge a b will be compiled as a >= b. See also unsafe_lt
Types for JS objects
type 'a tThis used to be mark a Js object type.
module Exn : sig ... endUtilities for dealing with Js exceptions
module String : sig ... endBindings to the functions in String.prototype
module Null : sig ... endUtility functions on null
module Undefined : sig ... endUtility functions on undefined
module Nullable : sig ... endUtility functions on nullable
module Array : sig ... endBindings to the functions in Array.prototype
module Re : sig ... endBindings to the functions in RegExp.prototype
module Promise : sig ... endBindings to JS Promise functions
module Date : sig ... endBindings to the functions in JS's Date.prototype
module Dict : sig ... endUtility functions to treat a JS object as a dictionary
module Global : sig ... endBindings to functions in the JS global namespace
module Json : sig ... endUtility functions to manipulate JSON values
module Math : sig ... endBindings to the functions in the Math object
module Obj : sig ... endUtility functions on `Js.t` JS objects
module Typed_array : sig ... endBindings to the functions in TypedArray.prototype
module Types : sig ... endUtility functions for runtime reflection on JS types
module Float : sig ... endBindings to functions in JavaScript's Number that deal with floats
module Int : sig ... endBindings to functions in JavaScript's Number that deal with ints
module Bigint : sig ... endBindings to functions in JavaScript's BigInt
module Console : sig ... endmodule Set : sig ... endBindings to functions in Set
module WeakSet : sig ... endBindings to functions in WeakSet
module Map : sig ... endBindings to functions in Map
module WeakMap : sig ... endBindings to functions in WeakMap
module Iterator : sig ... endBindings to functions on Iterator
module Blob : sig ... endBindings to Blob
module File : sig ... endBindings to File
module FormData : sig ... endBindings to FormData