ygleam/y
Types
pub type AbstractType
The BaseType type represents the basic Javascript types Yjs can hold:
- String
- Boolean
- Number
- Uint8Array
- Array
- Object<String, BaseType>
pub type BaseType
pub type Transaction
pub type YType {
AbstractType(value: AbstractType)
YDoc(value: YDoc)
YMap(value: YMap)
YArray(value: YArray)
YText(value: YText)
YXmlFragment(value: YXmlFragment)
YXmlElement(value: YXmlElement)
}
Constructors
-
AbstractType(value: AbstractType)
-
YDoc(value: YDoc)
-
YMap(value: YMap)
-
YArray(value: YArray)
-
YText(value: YText)
-
YXmlFragment(value: YXmlFragment)
-
YXmlElement(value: YXmlElement)
pub type YValue {
BaseType(value: Dynamic)
YType(value: YType)
}
Constructors
-
BaseType(value: Dynamic)
-
YType(value: YType)
pub type YXmlElement
pub type YXmlFragment
Functions
pub fn decode(
yvalue: YValue,
decoder: fn(Dynamic) -> Result(a, List(DecodeError)),
) -> Result(a, List(DecodeError))
pub fn from_gleam_json(from: Json) -> BaseType
pub fn nullable(
from input: Option(a),
of inner_type: fn(a) -> BaseType,
) -> BaseType
pub fn preprocessed_array(from: List(BaseType)) -> BaseType