From 39ece045a8654e5d10a7b6097a28689755d29861 Mon Sep 17 00:00:00 2001 From: Zixuan Chen Date: Fri, 24 Mar 2023 19:59:48 +0800 Subject: [PATCH] feat: add return type for map and list --- loro-js/src/index.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/loro-js/src/index.ts b/loro-js/src/index.ts index 4dd21170..a6602e6e 100644 --- a/loro-js/src/index.ts +++ b/loro-js/src/index.ts @@ -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; } }