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

[RFC436] default type parameter is not reported as error in editor #1967

Closed
HerringtonDarkholme opened this issue Oct 10, 2022 · 0 comments
Closed
Labels
enhancement New feature or request

Comments

@HerringtonDarkholme
Copy link
Member

<script lang="ts">
interface Test {
  test: string
}
</script>
#                                                                                    ↓ expect error here
<script setup lang="ts" generic="T extends Test = string">
const props = defineProps<{
  msg: T,    // no works
}>()
console.log(props.msg.test)
</script>

Expect: report error about string cannot be assigned to Test.
Actual: no error

image

@johnsoncodehk johnsoncodehk added the enhancement New feature or request label Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants