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

strictTemplates fails to report unknown components #3539

Closed
cexbrayat opened this issue Sep 6, 2023 · 6 comments · Fixed by #3717
Closed

strictTemplates fails to report unknown components #3539

cexbrayat opened this issue Sep 6, 2023 · 6 comments · Fixed by #3717
Labels
enhancement New feature or request good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first

Comments

@cexbrayat
Copy link
Member

I think strictTemplates: true used to report unknown components used in a template (or am I mistaken?).

Using vue-tsc v1.8.10, the following component does not report any errors, even if <Hello> does not exist.

<script setup lang="ts">
import { ref } from 'vue'

const msg = ref('Hello World!')
</script>

<template>
  <Hello :msg="msg"></Hello>
</template>

Stackblitz

Playground

@so1ve
Copy link
Member

so1ve commented Sep 6, 2023

Does it work in v1.8.9?

@cexbrayat
Copy link
Member Author

I don't know, I had to disable strictTemplates for a while because of #3487

But I tried quickly in the stackblitz repro, and it doesn't look like it worked in v1.8.9

@so1ve
Copy link
Member

so1ve commented Sep 6, 2023

This problem is introduced in 376352a. It doesn't seemed to be related to #3487

@so1ve so1ve added bug Something isn't working good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first labels Sep 8, 2023
@IceBlizz6
Copy link

@cexbrayat
Just discovered this issue myself, seems like my team has been without strict template type support for months.
I narrowed down the version.

This was working in 1.8.3 and then it does not work in 1.8.4

@IceBlizz6
Copy link

@so1ve
Do you know how to solve this?
or do you know if we can get someone to take a look at it?

@so1ve
Copy link
Member

so1ve commented Nov 8, 2023

#3717 wip

@so1ve so1ve added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Nov 9, 2023
johnsoncodehk added a commit that referenced this issue Nov 29, 2023
Co-authored-by: Johnson Chu <johnsoncodehk@gmail.com>
so1ve pushed a commit to so1ve/language-tools that referenced this issue Dec 4, 2023
so1ve added a commit to so1ve/language-tools that referenced this issue Dec 4, 2023
Co-authored-by: Johnson Chu <johnsoncodehk@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants