Skip to content

Commit

Permalink
Update typescript-most-practical-features-compilation.md
Browse files Browse the repository at this point in the history
  • Loading branch information
owenlongbo authored Jan 25, 2024
1 parent 78ada7e commit a5e2ec7
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,9 @@ keyof any 对应的类型为 number | string | symbol,是可以做对象键的

ReturnType 获取 T 类型对应的返回值类型。

```typescript
type ReturnType<T extends (...args: any) => any> = T extends (...args: any) => infer R ? R : any
```
### Exclude
Expand Down

0 comments on commit a5e2ec7

Please sign in to comment.