Inspired by typescript-eslint's prefer-function-type rule.
Chooses the more succinct function property over a call signature if there are no other properties on the signature.
A single options object has the following properties.
Whether to enable the fixer or not
| Context | everywhere |
| Tags | `` |
| Recommended | false |
| Settings | |
| Options | enableFixer |
The following patterns are considered problems:
/**
* @param {{
* (arg: string): void;
* }} someName
*/
// Message: Call signature found; function type preferred.
/**
* @param {{
* (arg: string): void;
* }} someName
*/
// "jsdoc/ts-prefer-function-type": ["error"|"warn", {"enableFixer":false}]
// Message: Call signature found; function type preferred.
/**
* @param {(string | {
* (arg: string): void;
* })} someName
*/
// Message: Call signature found; function type preferred.The following patterns are not considered problems:
/**
* @param {() => number} someName
*/
/**
* @param {{
* (arg: string): void;
* abc: number;
* }} someName
*/
/**
* @param {{
* (data: string): number;
* (id: number): string;
* }} someName
*/
/**
* @param {BadType<} someName
*/