Skip to content

exportProps

Stability: experimental ⚠️ Experimental feature, use at your risk

Svelte-like Declaring props for Vue.

FeaturesSupported
Vue 3
Nuxt 3
Vue 2
Volar Plugin

Usage

Using export syntax to declare props.

vue
<script setup lang="ts">
export let 
foo
: string
export const
bar
: number = 1 // with default value
</script>

Volar Configuration

jsonc
// tsconfig.json
{
  "vueCompilerOptions": {
    "target": 3,
    "plugins": [
      "@vue-macros/volar/export-props",
      // ...more feature
    ],
  },
}

Contributors

The avatar of contributor named as renovate[bot] renovate[bot]

Changelog