UNPKG
@yoroi/types
Version:
latest (6.2.1)
6.2.1
6.1.0
6.0.0
2.0.0
1.5.10
1.5.9
1.5.8
1.5.7
1.5.6
1.5.4
1.5.3
1.5.1
1.5.0
1.4.0
1.3.0
1.2.0
1.1.0
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
The Yoroi Types package of Yoroi SDK
github.com/Emurgo/yoroi/tree/develop/packages/types/README.md
@yoroi/types
/
src
/
api
/
response.ts
15 lines
(11 loc)
•
281 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import
{
Either
}
from
'../helpers/types'
export
type
ApiResponseError
= {
status
:
number
message
:
string
responseData
:
unknown
}
export
type
ApiResponseSuccess
<T> = {
status
:
number
data
: T }
export
type
ApiResponse
<T> =
Either
<
ApiResponseError
,
ApiResponseSuccess
<T>>