File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " openapi-typescript-fetch" ,
33 "description" : " A typed fetch client for openapi-typescript" ,
4- "version" : " 1.1.0 " ,
4+ "version" : " 1.1.1 " ,
55 "engines" : {
66 "node" : " >= 12.0.0" ,
77 "npm" : " >= 7.0.0"
Original file line number Diff line number Diff line change @@ -45,6 +45,8 @@ type OpResponseTypes<OP> = OP extends {
4545
4646type _OpReturnType < T > = 200 extends keyof T
4747 ? T [ 200 ]
48+ : 201 extends keyof T
49+ ? T [ 201 ]
4850 : 'default' extends keyof T
4951 ? T [ 'default' ]
5052 : unknown
@@ -61,11 +63,11 @@ export type OpDefaultReturnType<OP> = _OpDefaultReturnType<OpResponseTypes<OP>>
6163const never : unique symbol = Symbol ( )
6264
6365type _OpErrorType < T > = {
64- [ S in Exclude < keyof T , 200 > ] : {
66+ [ S in Exclude < keyof T , 200 | 201 > ] : {
6567 status : S extends 'default' ? typeof never : S
6668 data : T [ S ]
6769 }
68- } [ Exclude < keyof T , 200 > ]
70+ } [ Exclude < keyof T , 200 | 201 > ]
6971
7072type Coalesce < T , D > = [ T ] extends [ never ] ? D : T
7173
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ type BodyAndQuery = {
2828 query : { scalar : string }
2929 body : { payload : { list : string [ ] } }
3030 }
31- responses : { 200 : { schema : Data } }
31+ responses : { 201 : { schema : Data } }
3232}
3333
3434export type paths = {
You can’t perform that action at this time.
0 commit comments