@happy-ts/fetch-t
    Preparing search index...

    Type Alias FetchResult<T>

    FetchResult: AsyncIOResult<T>

    Represents the result of a fetch operation as an async Result type.

    This is an alias for AsyncIOResult<T> from the happy-rusty library, providing Rust-like error handling without throwing exceptions.

    Type Parameters

    • T

      The type of the data expected in a successful response.

    import { fetchT, type FetchResult } from '@happy-ts/fetch-t';

    // FetchResult is a Promise that resolves to Result<T, Error>
    const result: FetchResult<string> = fetchT('https://api.example.com', {
    responseType: 'text',
    });

    const res = await result;
    res
    .inspect((text) => console.log('Success:', text))
    .inspectErr((err) => console.error('Error:', err));