feat: add return type for map and list

This commit is contained in:
Zixuan Chen 2023-03-24 19:59:48 +08:00 committed by Leonzhao
parent 0a421d3931
commit 39ece045a8

View file

@ -8,14 +8,7 @@ export {
setPanicHook,
Transaction,
} from "loro-wasm";
import {
ContainerID,
ContainerType,
Loro,
LoroList,
LoroMap,
Transaction,
} from "loro-wasm";
import { ContainerID, Loro, Transaction } from "loro-wasm";
export type { ContainerID, ContainerType } from "loro-wasm";
@ -141,6 +134,8 @@ declare module "loro-wasm" {
pos: number,
container: string,
): never;
get(index: number): Value;
}
interface LoroMap {
@ -164,5 +159,7 @@ declare module "loro-wasm" {
key: string,
container_type: string,
): never;
get(key: string): Value;
}
}