File tree 1 file changed +7
-4
lines changed
crates/oxc_linter/src/rules/typescript
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -47,13 +47,16 @@ impl std::ops::Deref for ExplicitFunctionReturnType {
47
47
declare_oxc_lint ! (
48
48
/// ### What it does
49
49
///
50
- /// This rule enforces that functions do have an explicit return type annotation.
50
+ /// This rule enforces that functions have an explicit return type annotation.
51
51
///
52
52
/// ### Why is this bad?
53
53
///
54
- /// Explicit return types do make it visually more clear what type is
55
- /// returned by a function. They can also speed up TypeScript type checking
56
- /// performance in large codebases with many large functions.
54
+ /// Explicit return types make it clearer what type is returned by a function. Making the
55
+ /// type returned by a function obvious allows the reader to infer what the function does
56
+ /// and how it can be used from a quick glance.
57
+ ///
58
+ /// Another benefit of explicit return types is the potential for a speed up of type
59
+ /// checking in large codebases with many large functions.
57
60
///
58
61
/// ### Example
59
62
///
You can’t perform that action at this time.
0 commit comments