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
git clone https://github.com/n0099/open-tbm &&cd open-tbm
git checkout 8d887a976eb7b2161be592d27c69073f694903b0
cd fe
yarn
sed 's/:postType="props.postType"/:postType="postType"/' src/components/post/badge/Time.vue
yarn vue-tsc
What is expected?
Not reporting as typing of props.postType will narrow the conditional type of timestampType:
but removing props. for postType will simplify timestampType into:
When you directly use postType, its type intersects with the globally defined postType variable. We cannot correctly determine whether it belongs to props to provide better type inference in this situation.
…duced in aa2bba7 @ app/router.options.ts & utils/post/queryForm/queryParams.ts
* fix all violations of eslint rule `@typescript-eslint/unbound-method` @ pages/bilibiliVote.vue
* enable option `allowAsThisParameter` for rule `@typescript-eslint/no-invalid-void-type` to allow using `this: void` to resolve violation of rule `@typescript-eslint/unbound-method` @ eslint.config.js
* replace the callback as v-bind of `ref` with plain attr @ `<RelativeTime>`
* referencing vuejs/language-tools#4798 in comment since 2f8b0a0 @ `<PostBadgeTime>`
@ fe
KazariEX
changed the title
prop with conditional type that referencing type param of generic component is simplified in the unwrapped variant for <template>
Local variables intersect with global variables of the same name
Feb 21, 2025
Vue - Official extension or vue-tsc version
both 2.1.4
VSCode version
1.92.2
Vue version
3.5.0
TypeScript version
5.5.4
System Info
package.json dependencies
https://github.com/n0099/open-tbm/blob/8d887a976eb7b2161be592d27c69073f694903b0/fe/package.json
Steps to reproduce
What is expected?
Not reporting as typing of


props.postType
will narrow the conditional type oftimestampType
:but removing
props.
forpostType
will simplifytimestampType
into:What is actually happening?
Link to minimal reproduction
https://github.com/n0099/open-tbm/blob/8d887a976eb7b2161be592d27c69073f694903b0/fe
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: