update Ref type import#1616
Conversation
In TypeScript 4.5+, This practice appears error message(`TS1444: 'Ref' is a type and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled.`). We should change Type import mode. Reference linking: https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-beta
|
✔️ Deploy Preview for vuejs ready! 🔨 Explore the source changes: 288d55a 🔍 Inspect the deploy log: https://app.netlify.com/sites/vuejs/deploys/622c994f6f8e3700080955e6 😎 Browse the preview: https://deploy-preview-1616--vuejs.netlify.app |
|
Thanks for the PR. Sorry for the delay. I don't use TS myself, so I didn't really feel qualified to review it, and when I reached out for help it turned out there were various other complications. The syntax currently used in the docs is valid, but it isn't compatible with the default settings used by There are two different ways this could be addressed using the To ensure compatibility with both Vite and the Playground, I've opened PR #1656 to apply the alternative fix. I've updated some of the other examples in that PR too, as there are a handful of other cases where types are being imported. |
Thank you very much |
In TypeScript 4.5+, This practice appears error message(
TS1444: 'Ref' is a type and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled.). We should change Type import mode.Reference linking: https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-beta