import * as t from "io-ts"; import { Dictionary } from "lodash"; import { GraphQLInputType, GraphQLOutputType } from "graphql"; /** Convenience utility types */ export declare const MappedRT: (mapped: RT1, stored: RT2) => t.TypeC<{ stored: RT2; mapped: RT1; }>; export declare const MaybeMappedRT: (mapped: RT1, stored: RT2) => t.UnionC<[RT1, t.TypeC<{ stored: RT2; mapped: RT1; }>]>; export declare type Maybe = null | undefined | T; export declare type NNil = Exclude; export interface Dict extends Dictionary { } export interface Lazy { (): T; } export declare type MaybeLazy = T | Lazy; export declare type MaybePromise = T | Promise; export declare type MaybeArray = T | T[]; export declare type MaybeArrayItem> = T extends MaybeArray ? I : never; export interface Factory { (...args: any[]): T; } export interface Newable { new (...args: any[]): T; } export declare type StrKey = keyof T & string; export declare type IdxKey = keyof T & number; export declare type Normalizer = (v: PreNormalizedT) => NormalizedT; export declare type MandateProps = Omit & { [K in keyof Pick]-?: T[K]; }; export declare type ReturnType any> = T extends (...args: any[]) => infer R ? R : any; export declare type Fn = (...args: A) => R; export declare type TypeGuard = (v: any) => v is S; export declare type Omit = Pick>; export declare type ReplaceWith = { [K in keyof TSource]: K extends TKey ? TSub : TSource[K]; }; export declare type MakeOptional = Omit & Partial>; export interface Mapped { mapped: TMapped; stored: TStored; } export declare type MaybeMapped = T | Mapped; export declare type KeyOf = keyof T; export declare type ValueOf = T[KeyOf]; /** * Runtime type representation to validate if a value is instance of a class */ export declare class InstanceType extends t.Type { readonly _tag: "InstanceType"; constructor(Ctor: Newable); } export declare const InstanceOf: (Ctor: Newable) => InstanceType; export declare const IOType: InstanceType>; export declare type MakePartial = Partial> & Omit; export declare const GQLInputType: t.Type; export declare const GQLOutputType: t.Type; export declare const RegExpType: t.Type; export declare type ExtendsWitness = U; interface _MultiSelectionItem { selection(): TTgt; shouldUse(ctx: TCtx): Promise; } export declare type MultiSelectionItem = MakeOptional<_MultiSelectionItem, "shouldUse">; export declare type MultiSelection = MultiSelectionItem> = Dictionary; export declare type Interceptor = (i: T) => T; export declare type PartialDeep = { [P in keyof T]?: T[P] extends Array ? Array> : T[P] extends ReadonlyArray ? ReadonlyArray> : PartialDeep; }; export declare type Predicate = (i: T) => boolean; export {};