Skip to content

no error on invalid bound in $$Generic #1778

New issue

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

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

Already on GitHub? # to your account

Closed
DetachHead opened this issue Dec 16, 2022 · 2 comments
Closed

no error on invalid bound in $$Generic #1778

DetachHead opened this issue Dec 16, 2022 · 2 comments
Labels
bug Something isn't working limitation Constraints of the existing architecture make this hard to fix wontfix This will not be worked on

Comments

@DetachHead
Copy link
Contributor

Describe the bug

there's no error when specifying an invalid bound on $$Generic

Reproduction

<script lang="ts">
    type T = $$Generic<asdf> // no error
</script>

Expected behaviour

error because asdf does not exist

System Info

  • OS: windows 10
  • IDE: vscode

Which package is the issue about?

svelte-check

Additional Information, eg. Screenshots

No response

@dummdidumm
Copy link
Member

Reason for this is that we currently completely remove the original string during transformation. To have the error persisted, we would need to move it, which is hard in this place (the render function).

@jasonlyu123 jasonlyu123 added the limitation Constraints of the existing architecture make this hard to fix label Feb 6, 2023
@dummdidumm
Copy link
Member

Closing since the generics attribute is the way to do generics now, and $$Generics is deprecated

@dummdidumm dummdidumm added the wontfix This will not be worked on label Jul 31, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working limitation Constraints of the existing architecture make this hard to fix wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants