Skip to content

Commit

Permalink
快速修复:添加缺失参数
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongsp committed Mar 29, 2024
1 parent d259fcb commit d5a36f1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions zh/release-notes/typescript-5.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,3 +307,15 @@ import * as ns from "foo" with { type: "not-json" };
```

感谢 [Oleksandr Tarasiuk](https://github.com/a-tarasyuk)[PR](https://github.com/microsoft/TypeScript/pull/56034)

## 快速修复:添加缺失参数

TypeScript 现在提供了一个快速修复选项,可以为被调用时传递了过多参数的函数添加一个新的参数。

![](https://devblogs.microsoft.com/typescript/wp-content/uploads/sites/11/2024/01/add-missing-params-5-4-beta-before.png)

![](https://devblogs.microsoft.com/typescript/wp-content/uploads/sites/11/2024/01/add-missing-params-5-4-beta-after.png)

当在多个现有函数之间传递一个新参数时,这将非常有用,而目前这样做可能会很麻烦。

感谢 [Oleksandr Tarasiuk](https://github.com/a-tarasyuk)[PR](https://github.com/microsoft/TypeScript/pull/56411)

0 comments on commit d5a36f1

Please sign in to comment.