Ошибка при вызове метода anim
<<
TS2416: Property 'anim' in type 'AnimationComponent' is not assignable to the same property in base type 'IAnimation'. Type '(e: Event) => void' is not assignable to type '() => void'.>>
import {IAnimation} from '@/modules/Animation/interface/animation.types'
export class AnimationComponent implements IAnimation {
anim(e: Event) {
console.log(e)
}
init() {
window.addEventListener('scroll', (e: Event) => this.anim(e))
}
destroy() {
window.removeEventListener('scroll', (e: Event) => console.log(e))
}
}
export interface IAnimation {
init: () => void
destroy: () => void
anim: () => void
}