Comparing version 0.0.22 to 0.0.23
@@ -110,3 +110,3 @@ declare type OkStatus = 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299; | ||
*/ | ||
declare function createFetchmap<Fetch extends (input: any, init?: any) => Promise<BasicResponse>>(fetch: Fetch): <Response_1 extends Awaited<ReturnType<Fetch>>, Map_1 extends Partial<MultiMapResponse<Response_1>>>(map: Map_1, input: Parameters<Fetch>[0], init?: Parameters<Fetch>[1] | undefined) => Promise<{ | ||
declare function createFetchmap<Fetch extends (input: never, init?: never) => Promise<BasicResponse>>(fetch: Fetch): <Response_1 extends Awaited<ReturnType<Fetch>>, Map_1 extends Partial<MultiMapResponse<Response_1>>>(map: Map_1, input: Parameters<Fetch>[0], init?: Parameters<Fetch>[1] | undefined) => Promise<{ | ||
readonly tag: "success"; | ||
@@ -113,0 +113,0 @@ readonly success: SuccessOf<{ readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { |
{ | ||
"name": "fetchmap", | ||
"version": "0.0.22", | ||
"version": "0.0.23", | ||
"description": "Non-throwing fetch wrapper", | ||
@@ -91,4 +91,4 @@ "sideEffects": false, | ||
"typeCoverage": { | ||
"atLeast": 99 | ||
"atLeast": 100 | ||
} | ||
} |
@@ -376,6 +376,6 @@ type OkStatus = | ||
*/ | ||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any | ||
export function createFetchmap<Fetch extends (input: any, init?: any) => Promise<BasicResponse>>( | ||
fetch: Fetch | ||
) { | ||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types | ||
export function createFetchmap< | ||
Fetch extends (input: never, init?: never) => Promise<BasicResponse> | ||
>(fetch: Fetch) { | ||
type Input = Parameters<Fetch>[0] | ||
@@ -382,0 +382,0 @@ type Init = Parameters<Fetch>[1] |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
83285