Skip to content

Commit

Permalink
声明缺失的函数
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongsp committed Mar 14, 2021
1 parent b996164 commit 3551302
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zh/release-notes/typescript-4.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -507,11 +507,11 @@ sortOfArrayish = numberKeys;

更多详情,请参考 [PR](https://github.com/microsoft/TypeScript/pull/41921)

## Declare Missing Helper Function
## 声明缺失的函数

Thanks to [a community pull request](https://github.com/microsoft/TypeScript/pull/41215) from [Alexander Tarasyuk](https://github.com/a-tarasyuk), we now have a quick fix for declaring new functions and methods based on the call-site!
感谢 [Alexander Tarasyuk](https://github.com/a-tarasyuk) 提交的 [PR](https://github.com/microsoft/TypeScript/pull/41215),TypeScript 支持了一个新的快速修复功能,那就是根据调用方来生成新的函数和方法声明!

![An un-declared function `foo` being called, with a quick fix scaffolding out the new contents of the file](https://devblogs.microsoft.com/typescript/wp-content/uploads/sites/11/2021/01/addMissingFunction-4.2.gif)
![一个未被声明的 `foo` 函数被调用了,使用快速修复](https://devblogs.microsoft.com/typescript/wp-content/uploads/sites/11/2021/01/addMissingFunction-4.2.gif)

## Breaking Changes

Expand Down

0 comments on commit 3551302

Please sign in to comment.