UNPKG
@battle-racing/br-common-lib
Version:
latest (4.6.2)
4.6.2
4.6.1
4.6.0
4.5.0
4.4.0
4.3.0
4.1.0
3.8.0
3.5.0
3.4.0
3.3.0
3.2.0
3.1.0
3.0.0
2.5.0
2.4.1
2.4.0
2.3.1
2.3.0
2.1.0
2.0.0
1.5.2
1.5.1
1.5.0
1.4.2
1.4.1
1.4.0
1.3.0
1.2.10
1.2.9
1.2.8
1.2.7
1.2.6
1.2.5
1.2.4
1.2.3
1.2.2
1.2.1
1.2.0
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.2
1.0.1
1.0.0
Common library for all Battle Racing Repositorios
@battle-racing/br-common-lib
/
dist
/
domains
/
response
/
Response.types.d.ts
10 lines
(9 loc)
•
299 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
9
10
import
{ z }
from
'zod'
;
import
{ errorResponseSchema }
from
'./Response.schema'
;
export
type
ErrorResponse
= z.
infer
<
typeof
errorResponseSchema>;
export
type
SuccessResponse
<T> = {
status
:
'success'
;
code
:
200
;
data
?: T; };
export
type
Response
<T> =
SuccessResponse
<T> |
ErrorResponse
;