You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
starting from cloning this repo @ develop, pnpm install --frozen-lockfile and pnpm build
from within packages/vue-test-workspace...
edit tsconfig.json to only target the failing test
{
// ...
"include": [
"vue-tsc/#2639/*"
]
}
confirm the test is good so far with vue 3: node ../vue-tsc/bin/vue-tsc.js --noEmit
edit packages/vue-test-workspace/package.json to use vue 2.7 and pnpm install
running vue-tsc.js again produces this error:
vue-tsc/#2639/Bar.vue:4:17 - error TS2339: Property 'name' does not exist on type '{ index: number; }'.
4 <div>{{ item.name }}</div>
~~~~
Found 1 error in vue-tsc/#2639/Bar.vue:4
Some extra thoughts...
I'd really like to help with this project more, but it's difficult to know where to begin and it's challenging learning how all the packages in this repo work together to perform type checking.
I'm super thankful for this extension, IMO there aren't any viable alternatives for Vue 2.7 anymore. Volar seems to be the way to go, but maybe it'd be helpful to create another test package just like vue-test-workspace, but have it use vue 2.7 instead of vue 3. I'd imagine it'd have a subset of the tests from vue-test-workspace, for covering the stuff that should be possible with vue 2.7 and vue 3.
I tried creating this setup and could make a PR for it, but I could use some guidance figuring out which tests should apply to both 2 and 3. However, I wanted to know if that's even desirable for this repo before putting more effort into it. Any thoughts?
The text was updated successfully, but these errors were encountered:
It looks like a generic can be defined, but type argument doesn't appear in the slot. Instead it appears as the generic type.
Example of this working correctly with Vue 3:
language-tools/packages/vue-test-workspace/vue-tsc/#2639/Bar.vue
Lines 2 to 6 in 24968e1
Here,
Foo
has a genericT extends { index: number }
:language-tools/packages/vue-test-workspace/vue-tsc/#2639/Foo.vue
Line 7 in 24968e1
However, trying this with Vue 2.7 fails:

Reproduction
pnpm install --frozen-lockfile
andpnpm build
packages/vue-test-workspace
...tsconfig.json
to only target the failing testnode ../vue-tsc/bin/vue-tsc.js --noEmit
packages/vue-test-workspace/package.json
to use vue 2.7 andpnpm install
Some extra thoughts...
I'd really like to help with this project more, but it's difficult to know where to begin and it's challenging learning how all the packages in this repo work together to perform type checking.
I'm super thankful for this extension, IMO there aren't any viable alternatives for Vue 2.7 anymore. Volar seems to be the way to go, but maybe it'd be helpful to create another test package just like
vue-test-workspace
, but have it use vue 2.7 instead of vue 3. I'd imagine it'd have a subset of the tests fromvue-test-workspace
, for covering the stuff that should be possible with vue 2.7 and vue 3.I tried creating this setup and could make a PR for it, but I could use some guidance figuring out which tests should apply to both 2 and 3. However, I wanted to know if that's even desirable for this repo before putting more effort into it. Any thoughts?
The text was updated successfully, but these errors were encountered: