UNPKG
typescript-types
Version:
latest (1.0.3)
1.0.3
1.0.2
1.0.1
1.0.0
Typescript typings
github.com/krewi1/typescript-typings
typescript-types
/
types
/
tupple
/
tail.ts
6 lines
(4 loc)
•
183 B
text/typescript
View Raw
1
2
3
4
5
6
export
type
Tail
<T
extends
any
[]> = (
(
...
_
: T
) =>
any
)
extends
(
(
_
:
any
, ...
args
: infer TT
) =>
any
) ?
TT
:
never
;
export
type
HasTail
<T> = T
extends
([] | [
any
]) ?
false
:
true
;