We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2be6e6f commit b9c97e2Copy full SHA for b9c97e2
src/types.ts
@@ -66,6 +66,8 @@ type _OpReturnType<T> = 200 extends keyof T
66
? T[200]
67
: 201 extends keyof T
68
? T[201]
69
+ : 202 extends keyof T
70
+ ? T[202]
71
: 'default' extends keyof T
72
? T['default']
73
: unknown
@@ -82,11 +84,11 @@ export type OpDefaultReturnType<OP> = _OpDefaultReturnType<OpResponseTypes<OP>>
82
84
const never: unique symbol = Symbol()
83
85
86
type _OpErrorType<T> = {
- [S in Exclude<keyof T, 200 | 201>]: {
87
+ [S in Exclude<keyof T, 200 | 201 | 202>]: {
88
status: S extends 'default' ? typeof never : S
89
data: T[S]
90
}
-}[Exclude<keyof T, 200 | 201>]
91
+}[Exclude<keyof T, 200 | 201 | 202>]
92
93
type Coalesce<T, D> = [T] extends [never] ? D : T
94
0 commit comments