Skip to main content

Module types

Module types 

Source
Expand description

Helper methods on CheckType and ScopeItem, plus private type-matching utilities.

Functionsยง

const_matches ๐Ÿ”’
Returns true if a is the const variant of b or vice versa (e.g. CInt <-> Int).
const_variant ๐Ÿ”’
Converts a mutable TypeAnnotation to its immutable (C-prefixed) variant.
enum_matches ๐Ÿ”’
Returns true if a and b are the same named tag (enum), regardless of Enum/CEnum (mutable/const) mismatch.
null_array_elision ๐Ÿ”’
Returns true if two array types are compatible when either inner type is Null (i.e. an empty array [] is compatible with any typed array).
null_map_elision ๐Ÿ”’
record_matches ๐Ÿ”’
Returns true if a and b are the same named record, regardless of Record/CRecord (mutable/const) mismatch.
set_matches ๐Ÿ”’