-
-
Notifications
You must be signed in to change notification settings - Fork 366
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: generate valid syntax when noPropertyAccessFromIndexSignature is…
… not enabled (#3575) Co-authored-by: Johnson Chu <johnsoncodehk@gmail.com>
- Loading branch information
1 parent
a065fd7
commit 80b4782
Showing
4 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
5 changes: 5 additions & 0 deletions
5
packages/vue-test-workspace/vue-tsc/non-strict-template/#3574/Comp.vue
This file contains 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,5 @@ | ||
<script lang="ts" setup> | ||
defineEmits<{ | ||
(event: 'change', value: string): void | ||
}>() | ||
</script> |
8 changes: 8 additions & 0 deletions
8
packages/vue-test-workspace/vue-tsc/non-strict-template/#3574/main.vue
This file contains 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,8 @@ | ||
<template> | ||
<Comp @change="(value) => console.log(value)" /> | ||
<!-- ^^^^^ is inferred as `any` now, should be `string` --> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import Comp from './Comp.vue' | ||
</script> |
7 changes: 7 additions & 0 deletions
7
packages/vue-test-workspace/vue-tsc/non-strict-template/#3574/tsconfig.json
This file contains 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,7 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"include": [ "**/*" ], | ||
"compilerOptions": { | ||
"noPropertyAccessFromIndexSignature": false | ||
} | ||
} |