UNPKG
flat-type-samurai
Version:
latest (0.2.0)
0.2.0
0.1.2
0.1.1
0.1.0
Advanced utility types for Typescript
flat-type-samurai
/
src
/
push.d.ts
10 lines
(9 loc)
•
233 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
9
10
/** * Pushes the second argument to the first array argument *
@example
* ```ts * // [1, 2, 3, 4, 5] * type Case1 = Push<[1, 2, 3, 4], 5> * ``` */
export
type
Push
<T
extends
readonly
unknown
[], U
extends
unknown
> = [...T, U];