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
/
unshift.d.ts
10 lines
(9 loc)
•
238 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
9
10
/** * Adds the second argument to the beginning of the first array argument. *
@example
* ```ts * // ['foo', 'bar'] * type Result = Unshift<['bar'], 'foo'> * ``` */
export
type
Unshift
<T
extends
readonly
unknown
[], U> = [U, ...T];