Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Closed
Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I havesearched for related issues and found none that matched my issue.
- I haveread the FAQ and my problem is not listed.
Playground Link
Repro Code
interfaceObjectWithFunction{func:(x:number)=>number}constobjAsVariable:ObjectWithFunction={func:x=>x+1}constarrAsVariable:ObjectWithFunction[]=[{func:x=>x+1}]classExample{objAsField:ObjectWithFunction={func:x=>x+1}// all of the above work as expectedarrAsField:ObjectWithFunction[]=[{// this should be allowedfunc:x=>x+1}]}
ESLint Config
{"rules":{"@typescript-eslint/explicit-function-return-type":["error",{"allowTypedFunctionExpressions":true}]}}
tsconfig
No response
Expected Result
The given code sample should lint without errors.
Actual Result
There is a linting error on line 26:Missing return type on function. 25:7 - 25:13
, despite the optionallowTypedFunctionExpressions: true
.
Additional Info
I would have liked to check on which version this started occurring, but the online playground apparently doesn't support selecting the tseslint version.