import { Ok, Err, Result } from '@hazae41/result'; import { DataInit, Data } from './data.js'; import { FailInit, Fail } from './fail.js'; import { Times, TimesInit } from './times.js'; type FetchedInit = DataInit | FailInit; declare namespace FetchedInit { type Infer = DataInit.Infer | FailInit.Infer; } type Fetched = Data | Fail; declare namespace Fetched { type Infer = Data.Infer | Fail.Infer; function from>(init: T): Fetched, FailInit.Inner>; type Timed = T & { times?: Times; }; function rewrap>(result: Timed, times?: TimesInit): Data>; function rewrap>(result: Timed, times?: TimesInit): Fail>; function rewrap>(result: Timed, times?: TimesInit): Fetched, Err.Inner>; } export { Fetched, FetchedInit };