Skip to content

Commit

Permalink
docs: add defineExpose position at the end
Browse files Browse the repository at this point in the history
  • Loading branch information
kelsos committed Sep 3, 2024
1 parent 573cee5 commit efeaa3f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions contribution-guides/vue-typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ The preferred order of a setup script in should be the following:
```typescript
// 1. Imports
import { get } from '@vueuse/core';
import { defineExpose } from '@vue/runtime-core';

// 2. Definitions (defineX)
defineOptions({
Expand Down Expand Up @@ -127,6 +128,11 @@ watch(title, (title) => {
onMounted(() => {
increaseCounter();
});

// 11. Exposed
defineExpose({
increaseCounter,
});
```

### useCssModules
Expand Down

0 comments on commit efeaa3f

Please sign in to comment.