Удалить в TypeScript с уведомлением Toaster

constructor(
    private toastr: ToastrService
  ) { }

deletePost1(id:number) {
    this.messageService.delete(id).subscribe(res => {
        this.messages = this.messages.filter(item => item.id !== id);
        this.toastr.success("Post deleted successfully!", 'success', { timeOut: 2500 });

    })
}
Emmanuel Meli