According to the policy of [Abandoned] Class API proposal: Update: the Class API proposal is being dropped. , we should to set the default value to false in the TypeScript prompt Use class-style component syntax?.
Change vue-cli/packages/@vue/cli-plugin-typescript/prompts.js as follows:
{
name: `classComponent`,
type: `confirm`,
message: `Use class-style component syntax?`,
default: false
},
vue-class-component will continue to be supported / exist in Vue 3, with decorators just like it works now.
We just don't intend to make a class API without decorators part of Core.
So as vue-class-component still provides the best TS exerience as fas as complete type safety is concerned, it makes sense to keep it as a default.
When Vue 3 arrives, people who want to use the "new way" of using TS would have to migrate their code with either style (class or options object)
Thank you. I understood very well.
Many people around me are wondering that vue-class-component will not be supported in Vue 3. So I hope your team announce that policy widely.
We mentioned it many times in the RFC discussions both before and after it was abandoned. It's a separate library and was never affected by the RFC.
And still it might be a good idea to communicate this more clearly, I agree. We will get to that.
Thank you!
Most helpful comment
vue-class-componentwill continue to be supported / exist in Vue 3, with decorators just like it works now.We just don't intend to make a class API without decorators part of Core.
So as vue-class-component still provides the best TS exerience as fas as complete type safety is concerned, it makes sense to keep it as a default.
When Vue 3 arrives, people who want to use the "new way" of using TS would have to migrate their code with either style (class or options object)