import type { AnyNonPromise } from '@xylabs/promise'; import type { StringOrAlertFunction, TypeCheckConfig, TypeCheckOptionalConfig, TypeCheckRequiredConfig } from './types.ts'; /** A type-narrowing function that attempts to cast a value to T, with optional assertion and configuration overloads. */ export interface AsTypeFunction { (value: AnyNonPromise): TType | undefined; (value: AnyNonPromise, config: TypeCheckRequiredConfig): TType; (value: AnyNonPromise, config: TypeCheckConfig | TypeCheckOptionalConfig): TType | undefined; (value: AnyNonPromise, assert: StringOrAlertFunction): TType | undefined; (value: AnyNonPromise, assert: StringOrAlertFunction, config: TypeCheckRequiredConfig): TType; (value: AnyNonPromise, assert: StringOrAlertFunction, config: TypeCheckConfig | TypeCheckOptionalConfig): TType | undefined; } /** A simplified type-narrowing function that returns T or undefined, without assertion support. */ export type AsOptionalTypeFunction = (value: AnyNonPromise) => TType | undefined; //# sourceMappingURL=AsTypeFunction.d.ts.map