Skip to content

Commit 3409c80

Browse files
committed
fix(language-core): use lib option in global types instead of hardcoding as vue
1 parent e857361 commit 3409c80

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

packages/language-core/lib/codegen/globalTypes.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,10 @@ export function generateGlobalTypes({
167167
function __VLS_makeOptional<T>(t: T): { [K in keyof T]?: T[K] };
168168
function __VLS_asFunctionalComponent<T, K = T extends new (...args: any) => any ? InstanceType<T> : unknown>(t: T, instance?: K):
169169
T extends new (...args: any) => any ? __VLS_FunctionalComponent<K>
170-
: T extends () => any ? (props: {}, ctx?: any) => ReturnType<T>
171-
${(
170+
: T extends () => any ? (props: {}, ctx?: any) => ReturnType<T>${(
172171
target === 2.7
173-
? `: T extends import('vue').AsyncComponent ? (props: {}, ctx?: any) => any`
174-
: ``
175-
)}
172+
? `: T extends import('${lib}').AsyncComponent ? (props: {}, ctx?: any) => any`
173+
: ``)}
176174
: T extends (...args: any) => any ? T
177175
: __VLS_FunctionalComponent<{}>;
178176
function __VLS_functionalComponentArgsRest<T extends (...args: any) => any>(t: T): 2 extends Parameters<T>['length'] ? [any] : [];

0 commit comments

Comments
 (0)