I have found this issue over and over in Typescript but haven't been able to find a solution other than disabling the rule for the selected code.
Every time I declare a function with parameters in a Typescript Interface I get the no-unused-vars
error on the parameter, see example below.
interface Template {
template: Template;
setTemplate: (template: Template) => void;
}
In this case, the setTemplate()
function would throw an Eslint warning: 'template' is defined but never used: Eslint no-unused-vars
Does anyone know the Eslint rule or config required to avoid this, tired of adding // eslint-disable-next-line no-unused-vars
.