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.
2 parents b986ed8 + aa73d51 commit 5405963Copy full SHA for 5405963
src/types.ts
@@ -49,6 +49,8 @@ type _OpReturnType<T> = 200 extends keyof T
49
? T[200]
50
: 201 extends keyof T
51
? T[201]
52
+ : 204 extends keyof T
53
+ ? T[204]
54
: 'default' extends keyof T
55
? T['default']
56
: unknown
@@ -65,11 +67,11 @@ export type OpDefaultReturnType<OP> = _OpDefaultReturnType<OpResponseTypes<OP>>
65
67
const never: unique symbol = Symbol()
66
68
69
type _OpErrorType<T> = {
- [S in Exclude<keyof T, 200 | 201>]: {
70
+ [S in Exclude<keyof T, 200 | 201 | 204>]: {
71
status: S extends 'default' ? typeof never : S
72
data: T[S]
73
}
-}[Exclude<keyof T, 200 | 201>]
74
+}[Exclude<keyof T, 200 | 201 | 204>]
75
76
type Coalesce<T, D> = [T] extends [never] ? D : T
77
0 commit comments