Closed tsukuha closed 3 days ago
First of all, thank you for your PR. vue-tsc
itself already supports tsc
's --project
option. Is this PR intended to achieve different behavior from the original --project
option?
@johnsoncodehk
Thanks for your reply.
I thought vue-tsc
is not supported to set own tsconfig.json path by tsc's --project
option.
I write the reason below.
executed vue-tsc@2.0.22
$ npx vue-tsc --noEmit --project ./tsconfig.json ./pages/index.vue
error TS5042: Option 'project' cannot be mixed with source files on a command line.
<script setup lang="ts">
function test(arr: string[]) {
const a: string = arr[1]
}
</script>
- tsconfig.json
```json
{
"compilerOptions": {
"noEmit": true,
"strict": true,
"noUncheckedIndexedAccess": true,
},
"exclude": ["node_modules"]
}
according to your reply
vue-tsc itself already supports tsc's --project option
It is a bug, isn't it?
I challenged to add code for fixed this problem, but I found this PR is still not enough fixed to this problem.
Oh, sorry.
I found it is a tsc's specification.
Allow tsconfig.json when input files are specified #27379 https://github.com/microsoft/TypeScript/issues/27379
I will close this PR and Discussion https://github.com/vuejs/language-tools/discussions/4466 .
this problem is a tsc's specification.
Allow tsconfig.json when input files are specified #27379 https://github.com/microsoft/TypeScript/issues/27379
I will close this PR and Discussion https://github.com/vuejs/language-tools/discussions/4466 .
Abstract
I created pull request about this discussions https://github.com/vuejs/language-tools/discussions/4466
About Test