Skip to content

Deprecate Vue Components, props, slots, events ... #2377

@Shinigami92

Description

@Shinigami92

A bit related to #2285 but bigger scope

At #VueAmsterdam2023 the idea came up to make it possible to deprecate all the things like a whole component, named slots, emitters and so on via Volar so it will be displayed as strikethrough in VSCode (and maybe other IDEs)

So for example things like that:

<script setup lang="ts">
import MyDeprecatedComponent from '@/components/MyDeprecatedComponent.vue'
</script>

<template lang="pug">
MyDeprecatedComponent
//- ^ ~~~~~~~~~~~~~ ^

MyDeprecatedComponent
  template(#header="{ deprecatedItem, nonDeprecated }")
  //-       ^~~~~^    ^~~~~~~~~~~~~^
</template>

It might be that we need to add some new language features to vue/vue-macros to support this

e.g.

defineOptions({
  name: 'MyDeprecatedComponent',
  deprecated: 'Reason...',
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions