Comparing version 3.0.0 to 3.0.1
@@ -1,3 +0,3 @@ | ||
import type { Data, InfiniteSrollOptions, Service } from './types'; | ||
declare const useInfiniteScroll: <TData extends Data>(service: Service<TData>, options?: InfiniteSrollOptions<TData>) => { | ||
import type { Data, InfiniteScrollOptions, Service } from './types'; | ||
declare const useInfiniteScroll: <TData extends Data>(service: Service<TData>, options?: InfiniteScrollOptions<TData>) => { | ||
data: TData | undefined; | ||
@@ -4,0 +4,0 @@ loading: boolean; |
@@ -8,3 +8,3 @@ import type { DependencyList } from 'react'; | ||
export declare type Service<TData extends Data> = (currentData?: TData) => Promise<TData>; | ||
export interface InfiniteSrollResult<TData extends Data> { | ||
export interface InfiniteScrollResult<TData extends Data> { | ||
data: TData; | ||
@@ -21,3 +21,3 @@ loading: boolean; | ||
} | ||
export interface InfiniteSrollOptions<TData extends Data> { | ||
export interface InfiniteScrollOptions<TData extends Data> { | ||
target?: BasicTarget; | ||
@@ -24,0 +24,0 @@ isNoMore?: (data?: TData) => boolean; |
@@ -36,2 +36,3 @@ var __read = this && this.__read || function (o, n) { | ||
import useAutoRunPlugin from './plugins/useAutoRunPlugin'; | ||
import useCachePlugin from './plugins/useCachePlugin'; | ||
@@ -41,4 +42,2 @@ import useDebouncePlugin from './plugins/useDebouncePlugin'; | ||
import usePollingPlugin from './plugins/usePollingPlugin'; | ||
import useReadyPlugin from './plugins/useReadyPlugin'; | ||
import useRefreshDeps from './plugins/useRefreshDeps'; | ||
import useRefreshOnWindowFocusPlugin from './plugins/useRefreshOnWindowFocusPlugin'; | ||
@@ -59,5 +58,5 @@ import useRetryPlugin from './plugins/useRetryPlugin'; | ||
function useRequest(service, options, plugins) { | ||
return useRequestImplement(service, options, __spread(plugins || [], [useDebouncePlugin, useLoadingDelayPlugin, usePollingPlugin, useRefreshOnWindowFocusPlugin, useThrottlePlugin, useRefreshDeps, useCachePlugin, useRetryPlugin, useReadyPlugin])); | ||
return useRequestImplement(service, options, __spread(plugins || [], [useDebouncePlugin, useLoadingDelayPlugin, usePollingPlugin, useRefreshOnWindowFocusPlugin, useThrottlePlugin, useAutoRunPlugin, useCachePlugin, useRetryPlugin])); | ||
} | ||
export default useRequest; |
@@ -1,3 +0,3 @@ | ||
import type { Data, InfiniteSrollOptions, Service } from './types'; | ||
declare const useInfiniteScroll: <TData extends Data>(service: Service<TData>, options?: InfiniteSrollOptions<TData>) => { | ||
import type { Data, InfiniteScrollOptions, Service } from './types'; | ||
declare const useInfiniteScroll: <TData extends Data>(service: Service<TData>, options?: InfiniteScrollOptions<TData>) => { | ||
data: TData | undefined; | ||
@@ -4,0 +4,0 @@ loading: boolean; |
@@ -8,3 +8,3 @@ import type { DependencyList } from 'react'; | ||
export declare type Service<TData extends Data> = (currentData?: TData) => Promise<TData>; | ||
export interface InfiniteSrollResult<TData extends Data> { | ||
export interface InfiniteScrollResult<TData extends Data> { | ||
data: TData; | ||
@@ -21,3 +21,3 @@ loading: boolean; | ||
} | ||
export interface InfiniteSrollOptions<TData extends Data> { | ||
export interface InfiniteScrollOptions<TData extends Data> { | ||
target?: BasicTarget; | ||
@@ -24,0 +24,0 @@ isNoMore?: (data?: TData) => boolean; |
@@ -48,2 +48,4 @@ "use strict"; | ||
var useAutoRunPlugin_1 = __importDefault(require("./plugins/useAutoRunPlugin")); | ||
var useCachePlugin_1 = __importDefault(require("./plugins/useCachePlugin")); | ||
@@ -57,6 +59,2 @@ | ||
var useReadyPlugin_1 = __importDefault(require("./plugins/useReadyPlugin")); | ||
var useRefreshDeps_1 = __importDefault(require("./plugins/useRefreshDeps")); | ||
var useRefreshOnWindowFocusPlugin_1 = __importDefault(require("./plugins/useRefreshOnWindowFocusPlugin")); | ||
@@ -81,5 +79,5 @@ | ||
function useRequest(service, options, plugins) { | ||
return useRequestImplement_1["default"](service, options, __spread(plugins || [], [useDebouncePlugin_1["default"], useLoadingDelayPlugin_1["default"], usePollingPlugin_1["default"], useRefreshOnWindowFocusPlugin_1["default"], useThrottlePlugin_1["default"], useRefreshDeps_1["default"], useCachePlugin_1["default"], useRetryPlugin_1["default"], useReadyPlugin_1["default"]])); | ||
return useRequestImplement_1["default"](service, options, __spread(plugins || [], [useDebouncePlugin_1["default"], useLoadingDelayPlugin_1["default"], usePollingPlugin_1["default"], useRefreshOnWindowFocusPlugin_1["default"], useThrottlePlugin_1["default"], useAutoRunPlugin_1["default"], useCachePlugin_1["default"], useRetryPlugin_1["default"]])); | ||
} | ||
exports["default"] = useRequest; |
{ | ||
"name": "ahooks", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "react hooks library", | ||
@@ -61,3 +61,3 @@ "keywords": [ | ||
"license": "MIT", | ||
"gitHead": "78f694fd5f93a338947be612bf7448254b5a1a2c" | ||
"gitHead": "946af1f3b597ce8e1fb80274402d64a2c2dea7ae" | ||
} |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
611970
444
15335