import type { Class } from "./class.js"; import type { AnyCaller } from "./function.js"; /** Something that has a source of a specified type. */ export interface Sourceable { readonly source: T; } /** Recurse through `Sourceable` objects and return the first one that is an instance of `type`, or `undefined` if no source object matches. */ export declare function getSource(type: Class, value: unknown): T | undefined; /** Recurse through `Sourceable` objects and return the first one that is an instance of `type`, or throw `RequiredError` if no source object matches. */ export declare function requireSource(type: Class, data: unknown, caller?: AnyCaller): T;