Closed VictorienT closed 4 years ago
It's related to ESLint. You can disable this rule for a code blocks you want as follows.
/* eslint-disable explicit-function-return-type */
const reset = createActionCreator('RESET', resolve => (count: number) =>
resolve(count)
)
/* eslint-enable explicit-function-return-type */
You can read more about disabling ESLint in this blog post.
Hi, thanks for your prompt response! Yeah I do know it's related to ESLint, I was wondering if there were a way to get the explicit return type rather than just disabling the rule.
Sorry about misunderstanding. The purpose of this library is to reduce some redundant type verbosity. BTW, if you want it, here you go:
import { Action } from 'deox'
const reset = createActionCreator('RESET', resolve => (count: number): Action<'RESET', number> =>
resolve(count)
)
Nice, thank you!
When using as specified in doc :
the explicit-function-return-type rule is reported on the
(count: number) =>
function.How that should be handled?