Skip to content

T4010: Unknown event ​

Cause ​

The component does not declare the event you listen for, or your component emits an event its contract does not declare.

Example ​

xml
<contract>
{ "name": "Card", "role": "group", "parts": ["root"] }
</contract>
<script>
function go() {}
</script>
<template><div class="root"><Button @click="go">Go</Button></div></template>

What you see ​

text
ERROR  T4010  app/components/Card.tess:7:37
  Button has no event "click".
  Declared events: "press".
  Run `tessera explain T4010` for details.

Fix ​

Use a declared event (the hint suggests the nearest), or add it to the contract.

All errors and warnings