loro-crdt
Advanced tools
Comparing version 0.15.0 to 0.15.1
@@ -252,3 +252,3 @@ import { Value, AwarenessWasm, PeerID as PeerID$1, Container, ContainerID, TreeID, OpId, Delta, LoroText, LoroMap, LoroTree, LoroList } from 'loro-wasm'; | ||
* text.insert(0, "Hello"); | ||
* console.log(list.toJson()); // [100, "Hello"]; | ||
* console.log(list.toJSON()); // [100, "Hello"]; | ||
* ``` | ||
@@ -287,4 +287,5 @@ */ | ||
*/ | ||
insert(pos: number, value: Exclude<T, Container>): void; | ||
insert<V extends T>(pos: number, value: Exclude<V, Container>): void; | ||
delete(pos: number, len: number): void; | ||
push<V extends T>(value: Exclude<V, Container>): void; | ||
subscribe(listener: Listener): number; | ||
@@ -325,3 +326,3 @@ getAttached(): undefined | LoroList<T>; | ||
* text.insert(0, "Hello"); | ||
* console.log(list.toJson()); // [100, "Hello"]; | ||
* console.log(list.toJSON()); // [100, "Hello"]; | ||
* ``` | ||
@@ -360,4 +361,5 @@ */ | ||
*/ | ||
insert(pos: number, value: Exclude<T, Container>): void; | ||
insert<V extends T>(pos: number, value: Exclude<V, Container>): void; | ||
delete(pos: number, len: number): void; | ||
push<V extends T>(value: Exclude<V, Container>): void; | ||
subscribe(listener: Listener): number; | ||
@@ -389,3 +391,3 @@ getAttached(): undefined | LoroMovableList<T>; | ||
*/ | ||
set(pos: number, value: Exclude<T, Container>): void; | ||
set<V extends T>(pos: number, value: Exclude<V, Container>): void; | ||
/** | ||
@@ -403,3 +405,3 @@ * Set a container at the index. | ||
* text.insert(0, "Hello"); | ||
* console.log(list.toJson()); // ["Hello"]; | ||
* console.log(list.toJSON()); // ["Hello"]; | ||
* ``` | ||
@@ -476,3 +478,3 @@ */ | ||
*/ | ||
set<Key extends keyof T>(key: Key, value: Exclude<T[Key], Container>): void; | ||
set<Key extends keyof T, V extends T[Key]>(key: Key, value: Exclude<V, Container>): void; | ||
delete(key: string): void; | ||
@@ -479,0 +481,0 @@ subscribe(listener: Listener): number; |
{ | ||
"name": "loro-crdt", | ||
"version": "0.15.0", | ||
"version": "0.15.1", | ||
"description": "Loro CRDTs is a high-performance CRDT framework that makes your app state synchronized, collaborative and maintainable effortlessly.", | ||
@@ -20,3 +20,3 @@ "keywords": [ | ||
"dependencies": { | ||
"loro-wasm": "0.15.0" | ||
"loro-wasm": "0.15.1" | ||
}, | ||
@@ -23,0 +23,0 @@ "devDependencies": { |
@@ -279,3 +279,3 @@ export * from "loro-wasm"; | ||
* text.insert(0, "Hello"); | ||
* console.log(list.toJson()); // [100, "Hello"]; | ||
* console.log(list.toJSON()); // [100, "Hello"]; | ||
* ``` | ||
@@ -317,4 +317,5 @@ */ | ||
*/ | ||
insert(pos: number, value: Exclude<T, Container>): void; | ||
insert<V extends T>(pos: number, value: Exclude<V, Container>): void; | ||
delete(pos: number, len: number): void; | ||
push<V extends T>(value: Exclude<V, Container>): void; | ||
subscribe(listener: Listener): number; | ||
@@ -356,3 +357,3 @@ getAttached(): undefined | LoroList<T>; | ||
* text.insert(0, "Hello"); | ||
* console.log(list.toJson()); // [100, "Hello"]; | ||
* console.log(list.toJSON()); // [100, "Hello"]; | ||
* ``` | ||
@@ -394,4 +395,5 @@ */ | ||
*/ | ||
insert(pos: number, value: Exclude<T, Container>): void; | ||
insert<V extends T>(pos: number, value: Exclude<V, Container>): void; | ||
delete(pos: number, len: number): void; | ||
push<V extends T>(value: Exclude<V, Container>): void; | ||
subscribe(listener: Listener): number; | ||
@@ -423,3 +425,3 @@ getAttached(): undefined | LoroMovableList<T>; | ||
*/ | ||
set(pos: number, value: Exclude<T, Container>): void; | ||
set<V extends T>(pos: number, value: Exclude<V, Container>): void; | ||
/** | ||
@@ -437,3 +439,3 @@ * Set a container at the index. | ||
* text.insert(0, "Hello"); | ||
* console.log(list.toJson()); // ["Hello"]; | ||
* console.log(list.toJSON()); // ["Hello"]; | ||
* ``` | ||
@@ -519,3 +521,6 @@ */ | ||
*/ | ||
set<Key extends keyof T>(key: Key, value: Exclude<T[Key], Container>): void; | ||
set<Key extends keyof T, V extends T[Key]>( | ||
key: Key, | ||
value: Exclude<V, Container>, | ||
): void; | ||
delete(key: string): void; | ||
@@ -522,0 +527,0 @@ subscribe(listener: Listener): number; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
172380
1534
+ Addedloro-wasm@0.15.1(transitive)
- Removedloro-wasm@0.15.0(transitive)
Updatedloro-wasm@0.15.1