import { StationDataset } from "@dclimate/tabular/reader"; /** * Wrap a `StationDataset` so every method failure -- not just `open`'s -- comes * back as a `DClimateClientError`. * * Translating only at `load` leaves a hole the size of the actual API. `open` * parses a manifest; the errors a caller is far likelier to hit come later, from * `select` on an unknown station, `where` on a non-comparable column, or `rows` * on a selection that matched nothing. Those are raised inside tabular and, * untranslated, escape as `DatasetReaderError` -- so the one `catch (e) { if (e * instanceof DClimateClientError) }` this library tells people to write misses * precisely the failures they were most likely to be catching for. * * A Proxy rather than a hand-written class of forwarding methods, for two * reasons. Selections return *new* `StationDataset` instances, so a class would * have to remember to re-wrap the result of every chainable -- and a method * added to tabular later would silently return an unwrapped dataset, reopening * the hole halfway down a chain. And `toQuery`/`plan`/`rows` return plain data * that must pass through untouched; a proxy distinguishes those by what comes * back rather than by a list someone has to keep current. * * Three return shapes are handled, because the API has all three: * - sync chainable (`select`, `timeRange`, `where`) -> re-wrap * - async chainable (`nearest`) -> re-wrap on resolve * - async terminal (`rows`, `plan`, `listStations`) -> translate rejection */ export declare const wrapStationDataset: (dataset: StationDataset) => StationDataset; //# sourceMappingURL=wrap.d.ts.map