export function registerGulpMultiTargetBuilds(options: {
taskName: string,
action: (target: string) => Promise<any>,
config: { devTarget: string, buildTargets: string[] }
}) {
...
};
with tslint.json configuration:
{
"rules": {
"prefer-method-signature": true
}
}
"Inline typings" e.g.
options: {
action: (target: string) => Promise<any>,
}
are currently also being linted
prefer-method-signature Use a method signature instead of a property signature of function type.
When using "inline typings" shouldn't suggest using method signature as it will cause some other lint to fail such as unused variable (parameter). Also generally when functions are passed as params are passed more as properties rather than methods (i might be wrong)
Using action(target: string): Promise<any>; won't cause unused-parameter errors. It's just a syntax choice, nothing more.
@andy-hanson I think you're assuming not because you've tried it.
this is what I'm saying

(and I'm passing an argument to the function)
its also triggering member-ordering below it (but that's ok)
That's a bug in that lint rule then. TypeScript's own --noUnusedParameters doesn't warn for that.
Should be fixed by #2235, which uses TypeScript's implementation now.
Should be fixed by #2235
馃殌
Most helpful comment
Using
action(target: string): Promise<any>;won't cause unused-parameter errors. It's just a syntax choice, nothing more.