Comparing version 0.0.17 to 0.0.18
@@ -153,2 +153,94 @@ 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; | ||
} | { | ||
readonly serverError: SuccessOf<{ readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>] extends MapJsonResponse<Response_1> ? ReturnType<(MapJsonResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>])["json"]> : { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>] extends MapBlobResponse<Response_1> ? ReturnType<(MapBlobResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>])["blob"]> : { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>] extends MapTextResponse<Response_1> ? ReturnType<(MapTextResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>])["text"]> : { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>] extends MapFormDataResponse<Response_1> ? ReturnType<(MapFormDataResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>])["formData"]> : { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>] extends MapArrayBufferResponse<Response_1> ? ReturnType<(MapArrayBufferResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>])["arrayBuffer"]> : { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>] extends MapNoBodyResponse<Response_1> ? ReturnType<(MapNoBodyResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>])["noBody"]> : { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>] extends MapResponse<Response_1> ? MapResultOf<Response_1, MapJsonResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>]> | MapResultOf<Response_1, MapTextResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>]> | MapResultOf<Response_1, MapBlobResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>]> | MapResultOf<Response_1, MapArrayBufferResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>]> | MapResultOf<Response_1, MapFormDataResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>]> | MapResultOf<Response_1, MapNoBodyResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>]> : never>; | ||
} | ({ readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["ok" | "notOk" | keyof Map_1] extends MapResponse<Response_1> ? FailureOf<MapResultOf<Response_1, MapJsonResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["ok" | "notOk" | keyof Map_1]>> | FailureOf<MapResultOf<Response_1, MapTextResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["ok" | "notOk" | keyof Map_1]>> | FailureOf<MapResultOf<Response_1, MapBlobResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["ok" | "notOk" | keyof Map_1]>> | FailureOf<MapResultOf<Response_1, MapArrayBufferResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["ok" | "notOk" | keyof Map_1]>> | FailureOf<MapResultOf<Response_1, MapFormDataResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["ok" | "notOk" | keyof Map_1]>> | FailureOf<MapResultOf<Response_1, MapNoBodyResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["ok" | "notOk" | keyof Map_1]>> extends never ? never : { | ||
readonly status: number; | ||
@@ -308,83 +400,5 @@ readonly validationError: FailureOf<{ readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
}; }, keyof Map_1>]> : never>; | ||
} | { | ||
readonly serverError: SuccessOf<{ readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>] extends MapJsonResponse<Response_1> ? ReturnType<(MapJsonResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>])["json"]> : { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>] extends MapBlobResponse<Response_1> ? ReturnType<(MapBlobResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>])["blob"]> : { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>] extends MapTextResponse<Response_1> ? ReturnType<(MapTextResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>])["text"]> : { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>] extends MapFormDataResponse<Response_1> ? ReturnType<(MapFormDataResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>])["formData"]> : { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>] extends MapArrayBufferResponse<Response_1> ? ReturnType<(MapArrayBufferResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>])["arrayBuffer"]> : { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>] extends MapNoBodyResponse<Response_1> ? ReturnType<(MapNoBodyResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>])["noBody"]> : { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>] extends MapResponse<Response_1> ? MapResultOf<Response_1, MapJsonResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>]> | MapResultOf<Response_1, MapTextResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>]> | MapResultOf<Response_1, MapBlobResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>]> | MapResultOf<Response_1, MapArrayBufferResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>]> | MapResultOf<Response_1, MapFormDataResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>]> | MapResultOf<Response_1, MapNoBodyResponse<Response_1> & { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }["notOk" | NotOkKeys<Response_1, { readonly [Key in "ok" | "notOk" | keyof Map_1]: Map_1[Key] extends MapResponse<Response_1> ? Map_1[Key] : { | ||
readonly noBody: (response: Response_1) => SuccessResult<Response_1>; | ||
}; }, keyof Map_1>]> : never>; | ||
}; | ||
} : never); | ||
}>; | ||
export { createFetchmap }; |
{ | ||
"name": "fetchmap", | ||
"version": "0.0.17", | ||
"version": "0.0.18", | ||
"description": "Non-throwing fetch wrapper", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
@@ -207,38 +207,42 @@ type OkStatus = | ||
> = FailureResult< | ||
| (Map[keyof Map] extends MapResponse<Resp> | ||
? FailureOf<MapResultOf<Resp, Map[keyof Map]>> extends never | ||
? never | ||
: { | ||
readonly status: number | ||
readonly validationError: FailureOf< | ||
| (Map[SuccessKeys] extends MapJsonResponse<Resp> | ||
? ReturnType<Map[SuccessKeys]['json']> | ||
: Map[SuccessKeys] extends MapBlobResponse<Resp> | ||
? ReturnType<Map[SuccessKeys]['blob']> | ||
: Map[SuccessKeys] extends MapTextResponse<Resp> | ||
? ReturnType<Map[SuccessKeys]['text']> | ||
: Map[SuccessKeys] extends MapFormDataResponse<Resp> | ||
? ReturnType<Map[SuccessKeys]['formData']> | ||
: Map[SuccessKeys] extends MapArrayBufferResponse<Resp> | ||
? ReturnType<Map[SuccessKeys]['arrayBuffer']> | ||
: Map[SuccessKeys] extends MapNoBodyResponse<Resp> | ||
? ReturnType<Map[SuccessKeys]['noBody']> | ||
: Map[SuccessKeys] extends MapResponse<Resp> | ||
? MapResultOf<Resp, Map[SuccessKeys]> | ||
: never) | ||
| (Map[FailureKeys] extends MapJsonResponse<Resp> | ||
? ReturnType<Map[FailureKeys]['json']> | ||
: Map[FailureKeys] extends MapBlobResponse<Resp> | ||
? ReturnType<Map[FailureKeys]['blob']> | ||
: Map[FailureKeys] extends MapTextResponse<Resp> | ||
? ReturnType<Map[FailureKeys]['text']> | ||
: Map[FailureKeys] extends MapFormDataResponse<Resp> | ||
? ReturnType<Map[FailureKeys]['formData']> | ||
: Map[FailureKeys] extends MapArrayBufferResponse<Resp> | ||
? ReturnType<Map[FailureKeys]['arrayBuffer']> | ||
: Map[FailureKeys] extends MapNoBodyResponse<Resp> | ||
? ReturnType<Map[FailureKeys]['noBody']> | ||
: Map[FailureKeys] extends MapResponse<Resp> | ||
? MapResultOf<Resp, Map[FailureKeys]> | ||
: never) | ||
> | ||
} | ||
: never) | ||
| { | ||
readonly status: number | ||
readonly validationError: FailureOf< | ||
| (Map[SuccessKeys] extends MapJsonResponse<Resp> | ||
? ReturnType<Map[SuccessKeys]['json']> | ||
: Map[SuccessKeys] extends MapBlobResponse<Resp> | ||
? ReturnType<Map[SuccessKeys]['blob']> | ||
: Map[SuccessKeys] extends MapTextResponse<Resp> | ||
? ReturnType<Map[SuccessKeys]['text']> | ||
: Map[SuccessKeys] extends MapFormDataResponse<Resp> | ||
? ReturnType<Map[SuccessKeys]['formData']> | ||
: Map[SuccessKeys] extends MapArrayBufferResponse<Resp> | ||
? ReturnType<Map[SuccessKeys]['arrayBuffer']> | ||
: Map[SuccessKeys] extends MapNoBodyResponse<Resp> | ||
? ReturnType<Map[SuccessKeys]['noBody']> | ||
: Map[SuccessKeys] extends MapResponse<Resp> | ||
? MapResultOf<Resp, Map[SuccessKeys]> | ||
: never) | ||
| (Map[FailureKeys] extends MapJsonResponse<Resp> | ||
? ReturnType<Map[FailureKeys]['json']> | ||
: Map[FailureKeys] extends MapBlobResponse<Resp> | ||
? ReturnType<Map[FailureKeys]['blob']> | ||
: Map[FailureKeys] extends MapTextResponse<Resp> | ||
? ReturnType<Map[FailureKeys]['text']> | ||
: Map[FailureKeys] extends MapFormDataResponse<Resp> | ||
? ReturnType<Map[FailureKeys]['formData']> | ||
: Map[FailureKeys] extends MapArrayBufferResponse<Resp> | ||
? ReturnType<Map[FailureKeys]['arrayBuffer']> | ||
: Map[FailureKeys] extends MapNoBodyResponse<Resp> | ||
? ReturnType<Map[FailureKeys]['noBody']> | ||
: Map[FailureKeys] extends MapResponse<Resp> | ||
? MapResultOf<Resp, Map[FailureKeys]> | ||
: never) | ||
> | ||
} | ||
| { | ||
readonly serverError: SuccessOf< | ||
@@ -245,0 +249,0 @@ Map[FailureKeys] extends MapJsonResponse<Resp> |
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
80166
1027