Comparing version 0.0.19 to 0.0.20
@@ -23,3 +23,3 @@ declare type AbortControllerGroup = { | ||
declare type Declare<F extends Fetch> = <V = unknown, E = unknown, A = void>(resource: Resource, options?: FetchOptions | ((args: A) => FetchOptions)) => InferResult<F> extends FetchResult ? Declaration<FetchResult<V, E>, never, A> : Declaration<V, null | E, A>; | ||
declare type Declare<F extends Fetch> = <V = unknown, E = unknown, A = void>(resource: Resource, options?: FetchOptions | ((args: A) => FetchOptions)) => InferFetchResult<F> extends FetchResult ? Declaration<FetchResult<V, E>, never, A> : Declaration<V, null | E, A>; | ||
@@ -103,4 +103,12 @@ /** | ||
declare type InferResult<F extends Fetch> = F extends Fetch<infer F> ? F : never; | ||
export declare type Infer<F> = F extends { | ||
fetch: (...args: any) => Promise<FetchResult<infer V, any>>; | ||
} ? V : InferFetchValue<F>; | ||
export declare type InferFetchError<F> = F extends (...args: any) => Promise<FetchResult<any, infer E>> ? E : never; | ||
export declare type InferFetchResult<F extends Fetch> = F extends Fetch<infer F> ? F : never; | ||
export declare type InferFetchValue<F> = F extends (...args: any) => Promise<FetchResult<infer V, any>> ? V : never; | ||
export declare const mergeOptions: (prevOptions?: FetchOptions, options?: FetchOptions, warn?: boolean) => FetchOptions; | ||
@@ -107,0 +115,0 @@ |
{ | ||
"name": "adnf", | ||
"version": "0.0.19", | ||
"version": "0.0.20", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "files": [ |
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
42707
643