C
C
Comnox2021-09-07 13:56:40
typescript
Comnox, 2021-09-07 13:56:40

$event type error for TypeScript in Vue?

Hello everyone, I faced such a problem that when specifying the type for event: Event , TS still swears that
''Property 'dataTransfer' does not exist on type 'Event'."
613744a6c33b1375009723.png
on the element itself, the method works in this format:
@dragstart=" onDragStart($event, city, 'toBigCards')"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexandroppolus, 2021-09-07
@Comnox

DragEvent instead of Event

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question