gleam/javascript
Types
Symbols are special unique values in JavaScript.
For further information view the MDN documentation: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol
pub type Symbol
The variants that type_of can return.
pub type TypeOf {
UndefinedType
ObjectType
BooleanType
NumberType
BigIntType
StringType
SymbolType
FunctionType
}
Constructors
-
UndefinedTypeIt is the value
undefined. -
ObjectTypeIt is some object, or it is
null. -
BooleanTypeIt is either
trueorfalse. -
NumberTypeIt is some number, a 64 bit float.
-
BigIntTypeIt is a JavaScript big-integer.
-
StringTypeIt is a string.
-
SymbolTypeIt is a JavaScript symbol.
-
FunctionTypeIt is a function of unknown argument types and return type.
Functions
pub fn get_symbol(a: String) -> Symbol
Use the JavaScript Symbol.for method to look up a symbol with the given
string name, creating a new one if one does exist.
For further information see the MDN documentation: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/for
pub fn type_of(a: a) -> TypeOf
Determine what category of JavaScript type a value belongs to.
This uses the JavaScript typeof operator and has limited accuracy. It
cannot tell you anything about what Gleam type a value has.
For further information view the MDN documentation: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol