Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
#371 was technically a breaking change because the users cannot declare the same name property with hooks as we restrict property types.
For example, there are users declaring
data
property as just a data:Since v7.2.0, above code produces compile error as it conflicts
data
hook type. https://github.com/vuejs/vue-class-component/blob/master/src/lifecycle.ts#L5Although IMO it should be avoided to use the same name with hooks for property name to avoid confusion, this had been working in the previous version. So we should keep that behavior.
To solve this problem, I disabled the type augmentation by default. When users want to use it, they can manually import it via
vue-class-component/hooks
.