How can I output the isChecked value to the parent component? This value indicates whether the checkbox is clicked or not. Unfortunately, changing it to const is not an option due to an assignment below. My linter is suggesting that I change it to const, but I need it to be mutable. Can anyone assist me in resolving this issue?
export class CheckboxConfigureComponent {
@Input() selectedProperty: DateRowConfigDto | LabelRowConfigDto | EnumRowConfigDto
@Output() filterEvent = new EventEmitter<boolean>()
constructor() {
}
updateFilter(): void {
let isChecked: boolean;
isChecked = this.selectedProperty.visible ? true : false
this.filterEvent.emit(isChecked)
}
}
'isChecked' is never reassigned. Use 'const' instead prefer-const ✖ 3 problems (3 errors, 0 warnings) 1 error and 0 warnings potentially fixable with the
--fix
option. husky > pre-commit hook failed (add --no-verify to bypass)