You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Already on GitHub?
Sign in
to your account
[explicit-function-return-type] Decorators being reported ESLint: Missing return type on function
#2842
[explicit-function-return-type] Decorators being reported ESLint: Missing return type on function
#2842
abrarazeem
opened this issue
Dec 3, 2020
· 1 comment
I have tried restarting my IDE and the issue persists.
I have updated to the latest version of the packages.
import{Controller,HttpCode,HttpStatus}from'@nestjs/common'import{AppService}from'./app.service'// Actually it's imported from @nestjs/common package but for the sake of testing and quick glimpse adding here.exportdeclareconstGet: (path?: string|string[])=>MethodDecorator
@Controller()exportclassAppController{constructor(privatereadonlyappService: AppService){}
@Get()// ESLint: Missing return type on function.(@typescript-eslint/explicit-function-return-type)
@HttpCode(HttpStatus.OK)getHello(){returnthis.appService.getHello()
Expected Result
Decorators shouldn't be reported as missing return type.
Actual Result
Missing return type on function.eslint@typescript-eslint/explicit-function-return-type