UNPKG
succulent
Version:
latest (0.21.0)
0.21.0
0.20.0
0.18.1
0.18.0
0.17.0
0.16.1
0.16.0
0.15.0
0.14.1
0.14.0
0.13.0
0.12.0
0.11.0
0.10.0
0.2.0
0.0.2
0.0.1
Powerful and easy runtime type checking
github.com/aslilac/succulent
aslilac/succulent
succulent
/
build
/
_util.d.ts
5 lines
(4 loc)
•
220 B
TypeScript
View Raw
1
2
3
4
5
declare
type
IsAny
<T> =
unknown
extends
T ? (T
extends
{} ? T :
never
) :
never
;
declare
type
NotAny
<T> = T
extends
IsAny
<T> ?
never
: T;
export
declare
function
assertType<T, X
extends
T>(
x
:
NotAny
<X>):
void
;
export
{};