export type AsyncCallback = (param: T) => Promise; export type Provider = (arg: V) => T; export type MaybeProvider = T | ((arg: V) => T); export type MaybePromise = T | Promise; export type GuardedType = T extends (value: any) => value is infer R ? R : never; export type DeepReadonly = { readonly [P in keyof T]: T[P] extends Record ? DeepReadonly : T[P] extends Array ? ReadonlyArray> : T[P]; }; export type DeepWriteable = { -readonly [K in keyof T]: T[K] extends object ? DeepWriteable : T[K]; }; /** * Simplifies type (copied from effect). */ export type Simplify = { [K in keyof A]: A[K]; } extends infer B ? B : never; /** * Replace types of specified keys. */ export type Specialize = Simplify & U>; /** * Make specified keys optional. */ export type MakeOptional = Omit & Partial>; /** * All types that evaluate to false when cast to a boolean. */ export type Falsy = false | 0 | '' | null | undefined; /** * Use with filter chaining instead of filter(Boolean) to preserve type. * NOTE: To filter by type: * items.filter((item: any): item is RangeSet => item instanceof RangeSet) */ export declare const isNotFalsy: (value: T) => value is Exclude; export declare const isNonNullable: (value: T | null | undefined) => value is T; export declare const doAsync: (fn: () => Promise) => Promise; /** * Get value from a provider. */ export declare const getProviderValue: (provider: MaybeProvider, arg?: V) => T; /** * Get value from a provider, which may be async. */ export declare const getAsyncProviderValue: (provider: MaybeProvider, V>, arg?: V) => MaybePromise; /** * Remove keys with undefined values. */ export declare const stripUndefined: (obj: T) => T; /** * Return new object with sorted keys. */ export declare const sortKeys: (obj: T) => T; /** * Swap position of element within array. */ export declare const arrayMove: (array: T[], from: number, to: number) => Array; //# sourceMappingURL=types.d.ts.map