Skip to content

Add missing defineExpose import #2126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

raulrpearson
Copy link

Description of Problem

An example on guide/essentials/template-refs.md is missing the import of defineExpose.

Proposed Solution

Add it.

@netlify
Copy link

netlify bot commented Dec 16, 2022

Deploy Preview for vuejs ready!

Name Link
🔨 Latest commit 207be11
🔍 Latest deploy log https://app.netlify.com/sites/vuejs/deploys/639c888049692300081e80bf
😎 Deploy Preview https://deploy-preview-2126--vuejs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@skirtles-code
Copy link
Contributor

Thanks for the PR, but defineExpose is a compiler macro and doesn't need to be imported.

@raulrpearson
Copy link
Author

raulrpearson commented Dec 16, 2022

Interesting, I didn't know that. Do you think it would be worth mentioning that instead?

As a beginner I was a bit confused. I tested it out on a project and got a red squiggle under my use of defineExpose, so I assumed it required importing. I guess there's something wrong with my setup, then. (EDIT: ESLint is the one complaining in my case).

If you'd like me to suggest some phrasing for that "compiler macro" piece of information, let me know and I'll add a commit. Or feel free to add it yourself or close the PR if you think that's the best course of action. And thanks for the quick feedback!

@skirtles-code
Copy link
Contributor

I've opened #2140 to try to address this. More work may be needed beyond that, as the concept of 'compiler macros' hasn't been introduced properly and we're largely glossing over it in that guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants