-
-
Notifications
You must be signed in to change notification settings - Fork 472
test(tsc): add tests for #3779, #3820 #3838
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
33db74c
fix
so1ve 3fdd529
Merge branch 'master' into pr/3838
johnsoncodehk f8bbcc4
Fixes
johnsoncodehk 48addc3
Merge branch 'master' into pr/3838
johnsoncodehk dc53e1e
Merge branch 'master' into pr/3838
johnsoncodehk abc5168
Update pnpm-lock.yaml
johnsoncodehk a971bf4
Merge branch 'master' into pr/3838
johnsoncodehk 861b433
updates
johnsoncodehk 248aa41
Add tests for #3779, #3820
johnsoncodehk f26e8bb
Merge branch 'fix/issue-3779-3820' of https://github.com/so1ve/langua…
johnsoncodehk c392bfb
Revert "Merge branch 'fix/issue-3779-3820' of https://github.com/so1v…
johnsoncodehk 3584e49
updates
johnsoncodehk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<script setup lang="ts"> | ||
import { exactType } from '../../shared'; | ||
defineProps<{ | ||
optionalBoolean?: boolean; | ||
}>(); | ||
</script> | ||
|
||
<template> | ||
<h1>{{ exactType(optionalBoolean, {} as boolean | undefined) }}</h1> | ||
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<script setup lang="ts"> | ||
import { exactType } from '../../shared'; | ||
const props = defineProps<{ | ||
optionalBoolean?: boolean; | ||
}>(); | ||
</script> | ||
|
||
<template> | ||
<h1>{{ exactType(optionalBoolean, true as boolean) }}</h1> | ||
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<script setup lang="ts" generic="T extends { name: string }"> | ||
const props = defineProps<{ | ||
one: T; | ||
all: Array<T>; | ||
}>(); | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<!-- incorrect inference --> | ||
<div>{{ one.name }}</div> | ||
<!-- correct inference --> | ||
<div>{{ props.one.name }}</div> | ||
<ul> | ||
<!-- correct inference --> | ||
<li v-for="el in all">{{ el.name }}</li> | ||
</ul> | ||
</div> | ||
</template> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.