Socket
Socket
Sign inDemoInstall

@aspida/swr

Package Overview
Dependencies
Maintainers
3
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aspida/swr - npm Package Compare versions

Comparing version 1.7.0 to 1.7.1

12

dist/index.d.ts

@@ -1,12 +0,12 @@

import { responseInterface, ConfigInterface } from 'swr';
declare type Options<T extends (option: any) => Promise<any>> = Parameters<Parameters<T> extends [Parameters<T>[0]] ? (option: Parameters<T>[0] & ConfigInterface<ReturnType<T> extends Promise<infer S> ? S : never> & {
import { SWRResponse, SWRConfiguration } from 'swr';
declare type Options<T extends (option: any) => Promise<any>> = Parameters<Parameters<T> extends [Parameters<T>[0]] ? (option: Parameters<T>[0] & SWRConfiguration<ResponseData<T>> & {
enabled?: boolean;
}) => void : (option?: Parameters<T>[0] & ConfigInterface<ReturnType<T> extends Promise<infer S> ? S : never> & {
}) => void : (option?: Parameters<T>[0] & SWRConfiguration<ResponseData<T>> & {
enabled?: boolean;
}) => void>;
declare type Res<T extends (option: any) => Promise<any>> = responseInterface<ReturnType<T> extends Promise<infer S> ? S : never, any>;
declare type ResponseData<T extends (option: any) => Promise<any>> = ReturnType<T> extends Promise<infer S> ? S : never;
declare function useAspidaSWR<T extends Record<string, any> & {
$get: (option: any) => Promise<any>;
$path: (option?: any) => string;
}>(api: T, ...option: Options<T['$get']>): Res<T['$get']>;
}>(api: T, ...option: Options<T['$get']>): SWRResponse<ResponseData<T['$get']>, any>;
declare function useAspidaSWR<T extends Record<string, any> & {

@@ -16,4 +16,4 @@ $path: (option?: any) => string;

[K in keyof T]: T[K] extends (option: any) => Promise<any> ? K : never;
}[keyof T]>(api: T, key: U, ...option: Options<T[U]>): Res<T[U]>;
}[keyof T]>(api: T, key: U, ...option: Options<T[U]>): SWRResponse<ResponseData<T[U]>, any>;
export default useAspidaSWR;
//# sourceMappingURL=index.d.ts.map
{
"name": "@aspida/swr",
"version": "1.7.0",
"version": "1.7.1",
"description": "SWR wrapper for aspida",

@@ -29,4 +29,4 @@ "author": "Solufa <solufa2020@gmail.com>",

"dependencies": {
"aspida": "^1.7.0"
"aspida": "^1.7.1"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc