Skip to content

Commit

Permalink
update type
Browse files Browse the repository at this point in the history
  • Loading branch information
JonghwanWon committed Oct 22, 2022
1 parent 9122ed0 commit c5e4dbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ type Num = GetReturnType<() => number>; // number

type First<T extends Array<any>> = T extends [infer F, ...infer Rest] ? F : never;

type Str = First<['hello', 1, false]>; // string
type Str = First<['hello', 1, false]>; // 'hello'
```

## Literal Type
Expand Down

0 comments on commit c5e4dbc

Please sign in to comment.