---
url: /docs/guide/usage/linter/rules/vue/no-expose-after-await.md
---

### What it does

Disallow asynchronously registered `expose`.

### Why is this bad?

`defineExpose` and `context.expose()` registered after an `await`
expression in `<script setup>` or `setup()` may not work as expected
because they are registered after the component instance has finished
setting up.

### Examples

Examples of **incorrect** code for this rule:

```vue
<script setup>
await doSomething();
defineExpose({/* ... */}); // error
</script>
```

Examples of **correct** code for this rule:

```vue
<script setup>
defineExpose({/* ... */}); // ok
await doSomething();
</script>
```

## How to use

## Version

This rule was added in v1.67.0.

## References
