-
-
Notifications
You must be signed in to change notification settings - Fork 419
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat(language-core): typed fallthrough attributes #4103
Conversation
I have no idea about #2472 💦 |
d0abf57
to
aab3a8a
Compare
31e60a3
to
b7fdfc3
Compare
ef46670
to
19b0a8b
Compare
c6cab9a
to
ab8df96
Compare
commit: vue-component-meta
vue-component-type-helpers
@vue/language-core
@vue/language-plugin-pug
@vue/language-server
@vue/language-service
vue-tsc
@vue/typescript-plugin
|
Since this feature would significantly impact type checking speed, this feature was changed in ebb8490 to require |
This is a minimal reproduction of the case of slow tsc when import { defineComponent } from 'vue';
const Foo = defineComponent({
props: {} as __VLS_TypePropsToOption<{ bar?: string }>,
});
const Bar = defineComponent({
props: {} as __VLS_TypePropsToOption<FooAttrs>,
});
defineComponent({
setup() {
return {};
},
props: {} as __VLS_TypePropsToOption<BarAttrs>,
});
type FooAttrs = __VLS_OmitIndexSignature<Partial<InstanceType<typeof Foo>['$props']>>;
type BarAttrs = __VLS_OmitIndexSignature<Partial<InstanceType<typeof Bar>['$props']>>;
type __VLS_TypePropsToOption<T> = {
[K in keyof T]-?: {} extends Pick<T, K>
? { type: import('vue').PropType<T[K]> }
: { type: import('vue').PropType<T[K]>, required: true }
};
type __VLS_OmitIndexSignature<T> = { [K in keyof T as {} extends Record<K, unknown> ? never : K]: T[K]; }; |
Just a question: it seems that when having |
close #4049. close #4699.
Should add
Co-authored-by: A5rocks <git@helvetica.moe>
as a co-authorEDIT: This now requires adding an option
fallthroughAttributes
tovueCompilerOptions
.