mirror of
https://github.com/yjs/yjs.git
synced 2025-12-29 00:25:01 +01:00
@@ -54,6 +54,18 @@ export class YArray extends AbstractType {
|
||||
this._searchMarker = []
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a new YArray containing the specified items.
|
||||
* @template T
|
||||
* @param {Array<T>} items
|
||||
* @return {YArray<T>}
|
||||
*/
|
||||
static from(items) {
|
||||
const a = new YArray()
|
||||
a.push(items)
|
||||
return a
|
||||
}
|
||||
|
||||
/**
|
||||
* Integrate this type into the Yjs instance.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user