-
Notifications
You must be signed in to change notification settings - Fork 13.4k
FR: add config option to force return types #18529
Copy link
Copy link
Closed
Labels
DeclinedThe issue was declined as something which matches the TypeScript visionThe issue was declined as something which matches the TypeScript visionOut of ScopeThis idea sits outside of the TypeScript language design constraintsThis idea sits outside of the TypeScript language design constraintsSuggestionAn idea for TypeScriptAn idea for TypeScript
Metadata
Metadata
Assignees
Labels
DeclinedThe issue was declined as something which matches the TypeScript visionThe issue was declined as something which matches the TypeScript visionOut of ScopeThis idea sits outside of the TypeScript language design constraintsThis idea sits outside of the TypeScript language design constraintsSuggestionAn idea for TypeScriptAn idea for TypeScript
There's an option to configure the compiler to force return types in function parameters, but not the return types of the function themselves.
I would like, with a compiler configuration option, to be able to not allow this to compile
Initially I had thought that the compiler option:
noImplicitAnywould serve this purpose. But it does not.Reasons why I would like something like this:
For example consider we have these following functions in our symbol autocompletion list
If I was to type