🥮 mooncakes.io

    XiLaiTL/moobile/vendor/rabbita/js does not have a README file

    Promise

    A JavaScript promise that resolves to a value of type X

    Cast

    pub(open) trait Cast {
    fn into(Value) -> Self?
    fn from(Self) -> Value
    }

    Performs a checked cast from a Value to a Self? type.

    This trait abstracts a function that ensures the cast is valid and returns null if the cast fails. It is useful for safely handling dynamic types in MoonBit.
    impl Cast for Bool
    impl Cast for Int
    impl Cast for Double
    impl Cast for String

    Error_

    pub suberror Error_ {
    Error_(Value)
    }

    impl Show for Error_

    Error_::cause

    fn Error_::cause(self : Error_) -> Value?

    Error_::output

    fn Error_::output(self : Error_, logger : &Logger) -> Unit

    Error_::to_string

    fn Error_::to_string(self : Error_) -> String

    Error_::wrap

    fn[T] Error_::wrap(op : () -> Value, map_ok? : (Value) -> T) -> T raise Error_

    JsArray

    #external
    pub type JsArray[T]

    A native JavaScript Array whose length and elements may be mutated in place.

    Unlike MoonBit's Array, this external type has the JavaScript value ABI by definition and can therefore cross a JavaScript FFI boundary directly.
    impl Cast for JsArray[A]

    JsArray::from

    fn[A : Cast] JsArray::from(value : JsArray[A]) -> Value

    JsArray::get

    fn[T] JsArray::get(self : JsArray[T], index : Int) -> T?

    Returns None for an out-of-bounds index, a hole, or undefined.

    JsArray::into

    fn[A : Cast] JsArray::into(value : Value) -> JsArray[A]?

    JsArray::is_empty

    fn[T] JsArray::is_empty(self : JsArray[T]) -> Bool

    JsArray::iter

    fn[T] JsArray::iter(self : JsArray[T]) -> Iter[T?]

    Iterates the current JavaScript array by index without copying it.

    JsArray::length

    fn[T] JsArray::length(self : JsArray[T]) -> Int

    JsArray::new

    fn[T] JsArray::new() -> JsArray[T]

    Creates an empty native JavaScript array.

    JsArray::pop

    fn[T] JsArray::pop(self : JsArray[T]) -> T?

    JsArray::push

    fn[T] JsArray::push(self : JsArray[T], value : T) -> Unit

    JsArray::set

    fn[T] JsArray::set(self : JsArray[T], index : Int, value : T) -> Unit

    Sets an element in place, expanding the array with holes when needed. Aborts when index is negative.

    JsArray::unsafe_get

    fn[T] JsArray::unsafe_get(self : JsArray[T], index : Int) -> T

    Nullable

    type Nullable[_]

    Nullable::from_option

    fn[T] Nullable::from_option(value : T?) -> Nullable[T]

    Nullable::get_exn

    #deprecated("get_exn does not check for null values. Use unwrap instead")
    fn[T] Nullable::get_exn(self : Nullable[T]) -> T

    Nullable::is_null

    fn[T] Nullable::is_null(self : Nullable[T]) -> Bool

    Nullable::null

    fn[T] Nullable::null() -> Nullable[T]

    Nullable::to_option

    fn[T] Nullable::to_option(self : Nullable[T]) -> T?

    Nullable::unwrap

    fn[T] Nullable::unwrap(self : Nullable[T]) -> T

    Unwraps the nullable value, panicking if it is null.

    Object

    pub struct Object(Value)

    Object::extend_iter

    fn[K, V] Object::extend_iter(self : Object, it : Iter[(K, V)]) -> Unit

    Object::extend_iter2

    fn[K, V] Object::extend_iter2(self : Object, it : Iter2[K, V]) -> Unit

    Object::extend_object

    fn Object::extend_object(self : Object, obj : Object) -> Object

    Object::from_iter

    fn[K, V] Object::from_iter(it : Iter[(K, V)]) -> Object

    Object::from_iter2

    fn[K, V] Object::from_iter2(it : Iter2[K, V]) -> Object

    Object::from_value

    fn Object::from_value(value : Value) -> Optional[Object]

    Object::from_value_unchecked

    fn Object::from_value_unchecked(value : Value) -> Object

    Object::get

    #alias("_[_]")
    fn[K, V] Object::get(self : Object, key : K) -> V

    Object::new

    fn Object::new() -> Object

    Object::set

    #alias("_[_]=_")
    fn[K, V] Object::set(self : Object, key : K, value : V) -> Unit

    Object::to_value

    fn Object::to_value(self : Object) -> Value

    Optional

    type Optional[_]

    Optional::from_option

    fn[T] Optional::from_option(value : T?) -> Optional[T]

    Optional::get_exn

    #deprecated("get_exn does not check for undefined values. Use unwrap instead")
    fn[T] Optional::get_exn(self : Optional[T]) -> T

    Optional::is_undefined

    fn[T] Optional::is_undefined(self : Optional[T]) -> Bool

    Optional::to_option

    fn[T] Optional::to_option(self : Optional[T]) -> T?

    Optional::undefined

    fn[T] Optional::undefined() -> Optional[T]

    Optional::unwrap

    fn[T] Optional::unwrap(self : Optional[T]) -> T

    Unwraps the optional value, panicking if it is undefined.

    Symbol

    type Symbol

    Symbol::make

    fn Symbol::make() -> Symbol

    Symbol::make_with_number

    fn Symbol::make_with_number(num : Double) -> Symbol

    Symbol::make_with_string

    fn Symbol::make_with_string(value : String) -> Symbol

    Symbol::make_with_string_js

    fn Symbol::make_with_string_js(value : String) -> Symbol

    Union2

    type Union2[_, _]

    Union type A | B for JavaScript values.

    Union2::from0

    fn[A : Cast, B] Union2::from0(value : A) -> Union2[A, B]

    Union2::from1

    fn[A, B : Cast] Union2::from1(value : B) -> Union2[A, B]

    Union2::to0

    fn[A : Cast, B] Union2::to0(self : Union2[A, B]) -> A?

    Union2::to1

    fn[A, B : Cast] Union2::to1(self : Union2[A, B]) -> B?

    Union3

    type Union3[_, _, _]

    Union type A | B | C for JavaScript values.

    Union3::from0

    fn[A : Cast, B, C] Union3::from0(value : A) -> Union3[A, B, C]

    Union3::from1

    fn[A, B : Cast, C] Union3::from1(value : B) -> Union3[A, B, C]

    Union3::from2

    fn[A, B, C : Cast] Union3::from2(value : C) -> Union3[A, B, C]

    Union3::to0

    fn[A : Cast, B, C] Union3::to0(self : Union3[A, B, C]) -> A?

    Union3::to1

    fn[A, B : Cast, C] Union3::to1(self : Union3[A, B, C]) -> B?

    Union3::to2

    fn[A, B, C : Cast] Union3::to2(self : Union3[A, B, C]) -> C?

    Union4

    type Union4[_, _, _, _]

    Union type A | B | C | D for JavaScript values.

    Union4::from0

    fn[A : Cast, B, C, D] Union4::from0(value : A) -> Union4[A, B, C, D]

    Union4::from1

    fn[A, B : Cast, C, D] Union4::from1(value : B) -> Union4[A, B, C, D]

    Union4::from2

    fn[A, B, C : Cast, D] Union4::from2(value : C) -> Union4[A, B, C, D]

    Union4::from3

    fn[A, B, C, D : Cast] Union4::from3(value : D) -> Union4[A, B, C, D]

    Union4::to0

    fn[A : Cast, B, C, D] Union4::to0(self : Union4[A, B, C, D]) -> A?

    Union4::to1

    fn[A, B : Cast, C, D] Union4::to1(self : Union4[A, B, C, D]) -> B?

    Union4::to2

    fn[A, B, C : Cast, D] Union4::to2(self : Union4[A, B, C, D]) -> C?

    Union4::to3

    fn[A, B, C, D : Cast] Union4::to3(self : Union4[A, B, C, D]) -> D?

    Union5

    type Union5[_, _, _, _, _]

    Union type A | B | C | D | E for JavaScript values.

    Union5::from0

    fn[A : Cast, B, C, D, E] Union5::from0(value : A) -> Union5[A, B, C, D, E]

    Union5::from1

    fn[A, B : Cast, C, D, E] Union5::from1(value : B) -> Union5[A, B, C, D, E]

    Union5::from2

    fn[A, B, C : Cast, D, E] Union5::from2(value : C) -> Union5[A, B, C, D, E]

    Union5::from3

    fn[A, B, C, D : Cast, E] Union5::from3(value : D) -> Union5[A, B, C, D, E]

    Union5::from4

    fn[A, B, C, D, E : Cast] Union5::from4(value : E) -> Union5[A, B, C, D, E]

    Union5::to0

    fn[A : Cast, B, C, D, E] Union5::to0(self : Union5[A, B, C, D, E]) -> A?

    Union5::to1

    fn[A, B : Cast, C, D, E] Union5::to1(self : Union5[A, B, C, D, E]) -> B?

    Union5::to2

    fn[A, B, C : Cast, D, E] Union5::to2(self : Union5[A, B, C, D, E]) -> C?

    Union5::to3

    fn[A, B, C, D : Cast, E] Union5::to3(self : Union5[A, B, C, D, E]) -> D?

    Union5::to4

    fn[A, B, C, D, E : Cast] Union5::to4(self : Union5[A, B, C, D, E]) -> E?

    Union6

    type Union6[_, _, _, _, _, _]

    Union type A | B | C | D | E | F for JavaScript values.

    Union6::from0

    fn[A : Cast, B, C, D, E, F] Union6::from0(value : A) -> Union6[A, B, C, D, E, F]

    Union6::from1

    fn[A, B : Cast, C, D, E, F] Union6::from1(value : B) -> Union6[A, B, C, D, E, F]

    Union6::from2

    fn[A, B, C : Cast, D, E, F] Union6::from2(value : C) -> Union6[A, B, C, D, E, F]

    Union6::from3

    fn[A, B, C, D : Cast, E, F] Union6::from3(value : D) -> Union6[A, B, C, D, E, F]

    Union6::from4

    fn[A, B, C, D, E : Cast, F] Union6::from4(value : E) -> Union6[A, B, C, D, E, F]

    Union6::from5

    fn[A, B, C, D, E, F : Cast] Union6::from5(value : F) -> Union6[A, B, C, D, E, F]

    Union6::to0

    fn[A : Cast, B, C, D, E, F] Union6::to0(self : Union6[A, B, C, D, E, F]) -> A?

    Union6::to1

    fn[A, B : Cast, C, D, E, F] Union6::to1(self : Union6[A, B, C, D, E, F]) -> B?

    Union6::to2

    fn[A, B, C : Cast, D, E, F] Union6::to2(self : Union6[A, B, C, D, E, F]) -> C?

    Union6::to3

    fn[A, B, C, D : Cast, E, F] Union6::to3(self : Union6[A, B, C, D, E, F]) -> D?

    Union6::to4

    fn[A, B, C, D, E : Cast, F] Union6::to4(self : Union6[A, B, C, D, E, F]) -> E?

    Union6::to5

    fn[A, B, C, D, E, F : Cast] Union6::to5(self : Union6[A, B, C, D, E, F]) -> F?

    Union7

    type Union7[_, _, _, _, _, _, _]

    Union type A | B | C | D | E | F | G for JavaScript values.

    Union7::from0

    fn[A : Cast, B, C, D, E, F, G] Union7::from0(value : A) -> Union7[A, B, C, D, E, F, G]

    Union7::from1

    fn[A, B : Cast, C, D, E, F, G] Union7::from1(value : B) -> Union7[A, B, C, D, E, F, G]

    Union7::from2

    fn[A, B, C : Cast, D, E, F, G] Union7::from2(value : C) -> Union7[A, B, C, D, E, F, G]

    Union7::from3

    fn[A, B, C, D : Cast, E, F, G] Union7::from3(value : D) -> Union7[A, B, C, D, E, F, G]

    Union7::from4

    fn[A, B, C, D, E : Cast, F, G] Union7::from4(value : E) -> Union7[A, B, C, D, E, F, G]

    Union7::from5

    fn[A, B, C, D, E, F : Cast, G] Union7::from5(value : F) -> Union7[A, B, C, D, E, F, G]

    Union7::from6

    fn[A, B, C, D, E, F, G : Cast] Union7::from6(value : G) -> Union7[A, B, C, D, E, F, G]

    Union7::to0

    fn[A : Cast, B, C, D, E, F, G] Union7::to0(self : Union7[A, B, C, D, E, F, G]) -> A?

    Union7::to1

    fn[A, B : Cast, C, D, E, F, G] Union7::to1(self : Union7[A, B, C, D, E, F, G]) -> B?

    Union7::to2

    fn[A, B, C : Cast, D, E, F, G] Union7::to2(self : Union7[A, B, C, D, E, F, G]) -> C?

    Union7::to3

    fn[A, B, C, D : Cast, E, F, G] Union7::to3(self : Union7[A, B, C, D, E, F, G]) -> D?

    Union7::to4

    fn[A, B, C, D, E : Cast, F, G] Union7::to4(self : Union7[A, B, C, D, E, F, G]) -> E?

    Union7::to5

    fn[A, B, C, D, E, F : Cast, G] Union7::to5(self : Union7[A, B, C, D, E, F, G]) -> F?

    Union7::to6

    fn[A, B, C, D, E, F, G : Cast] Union7::to6(self : Union7[A, B, C, D, E, F, G]) -> G?

    Union8

    type Union8[_, _, _, _, _, _, _, _]

    Union type A | B | C | D | E | F | G | H for JavaScript values.

    Union8::from0

    fn[A : Cast, B, C, D, E, F, G, H] Union8::from0(value : A) -> Union8[A, B, C, D, E, F, G, H]

    Union8::from1

    fn[A, B : Cast, C, D, E, F, G, H] Union8::from1(value : B) -> Union8[A, B, C, D, E, F, G, H]

    Union8::from2

    fn[A, B, C : Cast, D, E, F, G, H] Union8::from2(value : C) -> Union8[A, B, C, D, E, F, G, H]

    Union8::from3

    fn[A, B, C, D : Cast, E, F, G, H] Union8::from3(value : D) -> Union8[A, B, C, D, E, F, G, H]

    Union8::from4

    fn[A, B, C, D, E : Cast, F, G, H] Union8::from4(value : E) -> Union8[A, B, C, D, E, F, G, H]

    Union8::from5

    fn[A, B, C, D, E, F : Cast, G, H] Union8::from5(value : F) -> Union8[A, B, C, D, E, F, G, H]

    Union8::from6

    fn[A, B, C, D, E, F, G : Cast, H] Union8::from6(value : G) -> Union8[A, B, C, D, E, F, G, H]

    Union8::from7

    fn[A, B, C, D, E, F, G, H : Cast] Union8::from7(value : H) -> Union8[A, B, C, D, E, F, G, H]

    Union8::to0

    fn[A : Cast, B, C, D, E, F, G, H] Union8::to0(self : Union8[A, B, C, D, E, F, G, H]) -> A?

    Union8::to1

    fn[A, B : Cast, C, D, E, F, G, H] Union8::to1(self : Union8[A, B, C, D, E, F, G, H]) -> B?

    Union8::to2

    fn[A, B, C : Cast, D, E, F, G, H] Union8::to2(self : Union8[A, B, C, D, E, F, G, H]) -> C?

    Union8::to3

    fn[A, B, C, D : Cast, E, F, G, H] Union8::to3(self : Union8[A, B, C, D, E, F, G, H]) -> D?

    Union8::to4

    fn[A, B, C, D, E : Cast, F, G, H] Union8::to4(self : Union8[A, B, C, D, E, F, G, H]) -> E?

    Union8::to5

    fn[A, B, C, D, E, F : Cast, G, H] Union8::to5(self : Union8[A, B, C, D, E, F, G, H]) -> F?

    Union8::to6

    fn[A, B, C, D, E, F, G : Cast, H] Union8::to6(self : Union8[A, B, C, D, E, F, G, H]) -> G?

    Union8::to7

    fn[A, B, C, D, E, F, G, H : Cast] Union8::to7(self : Union8[A, B, C, D, E, F, G, H]) -> H?

    Value

    #external
    pub type Value

    impl Show for Value

    Value::apply

    fn[Arg, Result] Value::apply(self : Value, args : FixedArray[Arg]) -> Result

    self(...args)

    Value::apply_with_index

    fn[Arg, Result] Value::apply_with_index(self : Value, index : Int, args : FixedArray[Arg]) -> Result

    self[index](...args)

    Value::apply_with_string

    fn[Arg, Result] Value::apply_with_string(self : Value, key : String, args : FixedArray[Arg]) -> Result

    self[key](...args)

    Value::apply_with_symbol

    fn[Arg, Result] Value::apply_with_symbol(self : Value, key : Symbol, args : FixedArray[Arg]) -> Result

    self[key](...args)

    Value::cast

    fn[T] Value::cast(self : Value) -> T

    Value::cast_from

    fn[T] Value::cast_from(value : T) -> Value

    Value::extends

    fn Value::extends(self : Value, parent_constructor : Value) -> Value

    @param self The constructor function that accepts this as the first argument

    Value::from_json

    fn Value::from_json(json : Json) -> Value raise

    Value::from_json_string

    fn Value::from_json_string(str : String) -> Value raise

    Value::get_with_index

    fn[T] Value::get_with_index(self : Value, index : Int) -> T

    Value::get_with_string

    fn[T] Value::get_with_string(self : Value, key : String) -> T

    Value::get_with_symbol

    fn[T] Value::get_with_symbol(self : Value, key : Symbol) -> T

    Value::is_bool

    fn Value::is_bool(self : Value) -> Bool

    Value::is_null

    fn Value::is_null(self : Value) -> Bool

    Value::is_number

    fn Value::is_number(self : Value) -> Bool

    Value::is_object

    fn Value::is_object(self : Value) -> Bool

    Value::is_string

    fn Value::is_string(self : Value) -> Bool

    Value::is_symbol

    fn Value::is_symbol(self : Value) -> Bool

    Value::is_undefined

    fn Value::is_undefined(self : Value) -> Bool

    Value::new

    fn[Arg, Result] Value::new(self : Value, args : FixedArray[Arg]) -> Result

    new self(...args)

    Value::new_with_index

    fn[Arg, Result] Value::new_with_index(self : Value, index : Int, args : FixedArray[Arg]) -> Result

    new self[index](...args)

    Value::new_with_string

    fn[Arg, Result] Value::new_with_string(self : Value, key : String, args : FixedArray[Arg]) -> Result

    new self[key](...args)

    Value::new_with_symbol

    fn[Arg, Result] Value::new_with_symbol(self : Value, key : Symbol, args : FixedArray[Arg]) -> Result

    new self[key](...args)

    Value::output

    fn Value::output(self : Value, logger : &Logger) -> Unit

    Value::set_with_index

    fn[T] Value::set_with_index(self : Value, index : Int, value : T) -> Unit

    Value::set_with_string

    fn[T] Value::set_with_string(self : Value, key : String, value : T) -> Unit

    Value::set_with_symbol

    fn[T] Value::set_with_symbol(self : Value, key : Symbol, value : T) -> Unit

    Value::to_json

    fn Value::to_json(self : Value) -> Json raise

    Value::to_json_string

    fn Value::to_json_string(self : Value) -> String raise

    Value::to_string

    fn Value::to_string(self : Value) -> String

    async_iterator

    let async_iterator : Symbol

    globalThis

    let globalThis : Value

    iterator

    let iterator : Symbol

    require

    fn require(path : String, keys? : Array[String]) -> Value