gun/lib/unset.d.ts
Orimay d53d157f19
New GUN typings (#1205)
* New GUN typings

* Fixing comments

* Gun schema is now supported

Co-authored-by: dbaranov <dbaranov@bellintegrator.com>
2022-02-18 23:17:41 -08:00

24 lines
750 B
TypeScript

import { GunSchema, GunSoul, IGunChain } from '..';
import {} from '../types/gun/IGunChain';
import { IGunChain2TNode } from '../types/utils';
declare module '../types/gun/IGunChain' {
export interface IGunChain<TNode, TChainParent, TGunInstance, TKey> {
/**
* After you save some data in an unordered list, you may need to remove it
*/
unset<
T extends Partial<V> | GunSoul<V> | IGunChain<V, any, any, any>,
K extends keyof TNode & string,
V extends TNode[K] & Record<string, GunSchema>
>(
node: IGunChain<
IGunChain2TNode<T>,
IGunChain<TNode, TChainParent, TGunInstance, TKey>,
TGunInstance,
K
>
): IGunChain<TNode, TChainParent, TGunInstance, TKey>;
}
}