From 36ca9b438fc42f67382e809c8ffe0a71de6f5154 Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Sat, 30 May 2020 18:55:40 -0400 Subject: [PATCH] gun.load() typings --- services/gunDB/contact-api/SimpleGUN.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/gunDB/contact-api/SimpleGUN.ts b/services/gunDB/contact-api/SimpleGUN.ts index 25f9e8ba..0929b854 100644 --- a/services/gunDB/contact-api/SimpleGUN.ts +++ b/services/gunDB/contact-api/SimpleGUN.ts @@ -38,6 +38,9 @@ export interface Soul { export type OpenListenerData = Primitive | null | OpenListenerDataObj export type OpenListener = (data: OpenListenerData, key: string) => void +export type LoadListenerData = OpenListenerData +export type LoadListener = (data: LoadListenerData, key: string) => void + export interface GUNNodeBase { _: Soul @@ -48,6 +51,8 @@ export interface GUNNodeBase { open(this: GUNNode, cb?: OpenListener): GUNNode + load(this: GUNNode, cb?: LoadListener): GUNNode + off(): void user(): UserGUNNode user(epub: string): GUNNode