I have in my component an EventEmitter
but I can\'t compile it because it return the error:
Supplied parameters do not match any signature of call target<
Another option to strongly type it is as follows:
@Output addModel = new EventEmitter<{make: string, name: string}>();
you can then emit it like @Pankaj-Parkar shows
this.addModel.emit({make, name});
or
this.addModel.emit({make: 'honda', name: 'civic'});
You now have strong typing instead of using object
or any
.