import { Ref } from 'vue'; import { Route } from './route'; import { Router } from './router'; import { RouterReject } from './routerReject'; import { Hooks } from '../models/hooks'; export declare const BUILT_IN_REJECTION_TYPES: readonly ["NotFound"]; export type BuiltInRejectionType = (typeof BUILT_IN_REJECTION_TYPES)[number]; export type RouterRejection = Ref; export type RouterRejections = TRouter['reject'] extends RouterReject ? TRejections[number] : never; export declare const IS_REJECTION_SYMBOL: unique symbol; export declare function isRejection(value: unknown): value is Rejection & RejectionInternal; export type RejectionInternal = { [IS_REJECTION_SYMBOL]: true; route: Route; hooks: Hooks[]; }; /** * Represents an immutable array of Rejection instances. */ export type Rejections = readonly Rejection[]; export type Rejection = { /** * The type of rejection. */ type: TType; }; export type RejectionType = unknown extends TRejections ? never : Rejections extends TRejections ? string : undefined extends TRejections ? string : TRejections extends Rejections ? TRejections[number]['type'] : never; export type ExtractRejections = T extends { rejections: infer TRejections extends Rejections; } ? TRejections : []; export type ExtractRejectionTypes = T[number]['type'] extends string ? T[number]['type'] : never;