@volar/vue-language-core
Advanced tools
Comparing version 1.3.7 to 1.3.8
@@ -282,2 +282,5 @@ "use strict"; | ||
codeGen.push('__VLS_props: '); | ||
if (!vueCompilerOptions.strictTemplates) { | ||
codeGen.push(`Record<string, unknown> & `); | ||
} | ||
addVirtualCode('scriptSetup', scriptSetupRanges.propsTypeArg.start, scriptSetupRanges.propsTypeArg.end); | ||
@@ -284,0 +287,0 @@ } |
@@ -111,3 +111,3 @@ "use strict"; | ||
export type SelfComponent<N, C> = string extends N ? {} : N extends string ? { [P in N]: C } : {}; | ||
export type WithComponent<N0, Components, N1, N2 = unknown, N3 = unknown> = | ||
export type WithComponent<N0 extends string, Components, N1, N2 = unknown, N3 = unknown> = | ||
N1 extends keyof Components ? { [K in N0]: Components[N1] } : | ||
@@ -117,12 +117,9 @@ N2 extends keyof Components ? { [K in N0]: Components[N2] } : | ||
${vueCompilerOptions.strictTemplates ? '{}' : '{ [K in N0]: any }'}; | ||
export type asFunctionalComponent<T> = | ||
${vueCompilerOptions.strictTemplates ? '' : 'Record<string, unknown> &'} | ||
( | ||
T extends new (...args: any) => { $props: infer Props } ? (_: Props) => any | ||
: T extends (props: infer Props, ...args: any) => any ? T | ||
: T extends (...args: any) => { props: infer Props } ? (_: Props) => any | ||
: T extends new (...args: any) => any ? (_: {}) => any | ||
: T extends (...args: any) => any ? (_: {}) => any | ||
: (_: T) => any // IntrinsicElement | ||
); | ||
export declare function asFunctionalComponent<T>(t: T): | ||
T extends new (...args: any) => { $props: infer Props } ? (_: ${vueCompilerOptions.strictTemplates ? '' : 'Record<string, unknown> &'} Props) => any | ||
: T extends (props: infer Props, ...args: any) => any ? T | ||
: T extends (...args: any) => { props: infer Props } ? (_: ${vueCompilerOptions.strictTemplates ? '' : 'Record<string, unknown> &'} Props) => any | ||
: T extends new (...args: any) => any ? (_: ${vueCompilerOptions.strictTemplates ? '' : 'Record<string, unknown> &'} {}) => any | ||
: T extends (...args: any) => any ? (_: ${vueCompilerOptions.strictTemplates ? '' : 'Record<string, unknown> &'} {}) => any | ||
: (_: T) => any; // IntrinsicElement | ||
export type InstanceProps<I, C> = I extends { $props: infer Props } ? Props & Record<string, unknown> : C & Record<string, unknown>; | ||
@@ -134,3 +131,3 @@ export type EventObject<I, K1 extends string, C, E1> = { | ||
E1, | ||
I extends { $emit: infer Emit } ? EmitEvent2<Emit, K1> : unknown, | ||
I extends { $emit: infer Emit } ? EmitEvent2<Emit, K1> : unknown | ||
> | ||
@@ -137,0 +134,0 @@ > |
{ | ||
"name": "@volar/vue-language-core", | ||
"version": "1.3.7", | ||
"version": "1.3.8", | ||
"main": "out/index.js", | ||
@@ -29,3 +29,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "7ce8724a60d8cd2c5b952048c9146e1d20d6ae50" | ||
"gitHead": "82721965355e6d0810130ec140d4d2f909d649c6" | ||
} |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
232253
5196