Skip to content
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

props inference for lang="js" #1426

Closed
danielroe opened this issue Jun 8, 2022 · 0 comments
Closed

props inference for lang="js" #1426

danielroe opened this issue Jun 8, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@danielroe
Copy link
Member

Currently a component with the following script:

<script setup>
const props = defineProps({
  appName: {
    type: String,
    default: "Nuxt"
  },
})
</script>

when used in a template will give the following ts error:

Type '{}' is missing the following properties from type 'Readonly<ExtractPropTypes<{ appName: { type: StringConstructor; default: string; }; }>>': appName. ts(2322)

See nuxt/nuxt#14081

@johnsoncodehk johnsoncodehk added the bug Something isn't working label Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants