This error occurs when you want to include a generic Event in your method. My code looked like this:
doReorder(ev: Event) {
console.log('Dragged from index', ev.detail.from, 'to', ev.detail.to);
}
The error was:
error TS2339: Property 'detail' does not exist on type 'Event'.
You can typecast to make it go away:
doReorder(ev: Event) {
const customEvent = ev as CustomEvent<ItemReorderEventDetail>;
// The `from` and `to` properties contain the index of the item
// when the drag started and ended, respectively
console.log('Dragged from index', customEvent.detail.from, 'to', customEvent.detail.to);
// Finish the reorder and position the item in the DOM based on
// where the gesture ended. This method can also be called directly
// by the reorder group
customEvent.detail.complete();
}