import { Ensure } from '../helpers/index'; import type { TSchema, SchemaOptions } from '../schema/index'; import { type TComputed } from '../computed/index'; import { type TIntersect } from '../intersect/index'; import { type TUnion } from '../union/index'; import { type TPromise } from '../promise/index'; import { type TRef } from '../ref/index'; type TFromComputed = Ensure<(TComputed<'Awaited', [TComputed]>)>; type TFromRef = Ensure]>>; type TFromRest = (Types extends [infer Left extends TSchema, ...infer Right extends TSchema[]] ? TFromRest]> : Result); export type TAwaited = (Type extends TComputed ? TFromComputed : Type extends TRef ? TFromRef : Type extends TIntersect ? TIntersect> : Type extends TUnion ? TUnion> : Type extends TPromise ? TAwaited : Type); /** `[JavaScript]` Constructs a type by recursively unwrapping Promise types */ export declare function Awaited(type: T, options?: SchemaOptions): TAwaited; export {};