#64496·TypeScript

显示推断的返回类型

作者: iuliust创建于 2026年9月28日更新于 2026年9月28日
标签Suggestion

Type: Feature Request

I would like the tooltip that appears when hovering over the 'return' keyword in a function to display the type of the value returned by that specific return statement. The displayed information should not necessarily be the inferred return type of the entire function (which is already visible by hovering over the function name) or the function's declared return type (if specified), but rather the type of the expression returned by that specific return statement.

内容来源: microsoft/TypeScript