UNPKG

@resourge/react-fetch

Version:

[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)

24 lines (23 loc) 668 B
/** * react-fetch v1.43.1 * * Copyright (c) resourge. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */ import { type FetchError, type HttpResponseError } from '@resourge/http-service'; export type UseFetchError = HttpResponseError | FetchError | Error | null | any; export type State<T> = { data: T; error: UseFetchError; isLoading: boolean; }; declare const NotificationService: { subscribe(id: string): (notification: () => void) => () => void; notifyAll(): void; notifyById(id: string): void; }; export default NotificationService;