UNPKG
@bonsai-components/utility-types
Version:
latest (0.5.7)
0.5.7
0.5.6
0.4.1
0.4.0
0.3.2
0.3.1
0.3.0
useful typescript types
@bonsai-components/utility-types
/
dist
/
opaque-types.d.ts
8 lines
(7 loc)
•
189 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
/** * Hack to add Opaque like support */
export
declare
type
Opaque
<T, K
extends
string
> = T & {
__typename
: K; };
export
declare
type
Base64EncodedString
=
Opaque
<
string
,
'base64'
>;