/** * Runtime type guards for safe narrowing at API boundaries. * Use these instead of `as Record` when the source is external (API responses, user input). */ /** Narrow `unknown` to `Record` with a runtime check. */ export declare function isRecord(value: unknown): value is Record; /** Safely access a nested record field, returning undefined if the path is not a record. */ export declare function asRecord(value: unknown): Record | undefined; /** Safely coerce to string, returning undefined for non-strings. */ export declare function asString(value: unknown): string | undefined; /** Safely coerce to number, returning undefined for non-numbers. */ export declare function asNumber(value: unknown): number | undefined; /** Narrow `unknown` to `FormData` with a runtime check (guards against environments where FormData is not defined). */ export declare function isFormDataBody(body: unknown): body is FormData; /** * Coerce a value to a Record. LLMs sometimes serialize nested objects as JSON * strings (e.g. `params: '{"artifact_id":"..."}' `) instead of actual objects. * This helper transparently parses JSON strings into records so downstream code * can always treat them uniformly. */ export declare function coerceRecord(value: unknown): Record | undefined; //# sourceMappingURL=type-guards.d.ts.map