mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00

* New GUN typings * Fixing comments * Gun schema is now supported Co-authored-by: dbaranov <dbaranov@bellintegrator.com>
26 lines
543 B
TypeScript
26 lines
543 B
TypeScript
import { GunSoul, IGunChain, IGunInstanceRoot } from '.';
|
|
|
|
export type GunSoul2TNode<T> = T extends GunSoul<infer TNode, infer _Soul>
|
|
? TNode
|
|
: never;
|
|
|
|
export type GunSoul2Soul<T> = T extends GunSoul<infer _TNode, infer Soul>
|
|
? Soul
|
|
: never;
|
|
|
|
export type IGunChain2TNode<T> = T extends IGunChain<
|
|
infer TNode,
|
|
infer _TChainParent,
|
|
infer _TNodeRoot,
|
|
infer _TKey
|
|
>
|
|
? TNode
|
|
: never;
|
|
|
|
export type IGunInstanceRoot2TGunInstance<T> = T extends IGunInstanceRoot<
|
|
infer _TNode,
|
|
infer TGunInstance
|
|
>
|
|
? TGunInstance
|
|
: never;
|