import type { Loader, StrictLoaderOptions } from "../../loader-types.js"; import type { RequiredOptions } from "../option-utils/merge-options.js"; /** Common properties for all data sources */ export type DataSourceOptions = Partial<{ core: { /** Allows application to specify which source should be selected. Matches `Source.type`. Defaults to 'auto' */ type?: string; /** Any dataset attributions (in case underlying metadata does not include attributions) */ attributions?: string[]; /** LoaderOptions provide an option to override `fetch`. Will also be passed to any sub loaders */ loadOptions?: StrictLoaderOptions; /** Make additional loaders available to the data source */ loaders?: Loader[]; }; [key: string]: Record; }>; /** base class of all data sources */ export declare abstract class DataSource { static defaultOptions: Required; optionsType?: OptionsT & DataSourceOptions; options: Required; readonly data: DataT; readonly url: string; /** The actual load options, if calling a loaders.gl loader */ loadOptions: StrictLoaderOptions; /** A resolved fetch function extracted from loadOptions prop */ fetch: (url: string, options?: RequestInit) => Promise; _needsRefresh: boolean; constructor(data: DataT, options: OptionsT, defaultOptions?: Omit, 'core'>); setProps(options: OptionsT): void; /** Mark this data source as needing a refresh (redraw) */ setNeedsRefresh(): void; /** * Does this data source need refreshing? * @note The specifics of the refresh mechanism depends on type of data source */ getNeedsRefresh(clear?: boolean): boolean; } /** * Gets the current fetch function from options * @todo - move to loader-utils module * @todo - use in core module counterpart * @param options * @param context */ export declare function getFetchFunction(options?: StrictLoaderOptions): (url: string, fetchOptions?: RequestInit) => Promise; //# sourceMappingURL=data-source.d.ts.map