@volar/vue-language-core
Advanced tools
Comparing version 1.6.1 to 1.6.2
@@ -123,3 +123,3 @@ "use strict"; | ||
if (usedHelperTypes.ToTemplateSlots) { | ||
codes.push(`type __VLS_ToTemplateSlots<T> = { [K in keyof T]: NonNullable<T[K]> extends (...args: any[]) => any ? T[K] : (props: T[K]) => any };\n`); | ||
codes.push(`type __VLS_ToTemplateSlots<T> = { [K in keyof T]?: NonNullable<T[K]> extends (...args: any[]) => any ? T[K] : (props: T[K]) => any };\n`); | ||
} | ||
@@ -287,8 +287,6 @@ if (usedHelperTypes.PropsChildren) { | ||
//#region props | ||
if ((scriptSetupRanges.propsRuntimeArg && scriptSetupRanges.defineProps) | ||
if (scriptSetupRanges.propsRuntimeArg | ||
|| scriptSetupRanges.defineProp.length) { | ||
if (scriptSetupRanges.propsRuntimeArg && scriptSetupRanges.defineProps) { | ||
codes.push(`const __VLS_props = `); | ||
addExtraReferenceVirtualCode('scriptSetup', scriptSetupRanges.defineProps.start, scriptSetupRanges.defineProps.end); | ||
codes.push(`;\n`); | ||
if (scriptSetupRanges.propsRuntimeArg) { | ||
codes.push(`const __VLS_props = (new __VLS_publicComponent()).$props;\n`); | ||
} | ||
@@ -295,0 +293,0 @@ else if (scriptSetupRanges.defineProp.length) { |
@@ -28,7 +28,2 @@ "use strict"; | ||
export type PickNotAny<A, B> = IsAny<A> extends true ? B : A; | ||
type ForableSource<T> = [ | ||
T extends { [Symbol.iterator](): Iterator<infer T1> } ? T1 : T[keyof T], // item | ||
typeof Symbol.iterator extends keyof T ? number : T extends T ? keyof T : never, // key | ||
typeof Symbol.iterator extends keyof T ? undefined : number, // index | ||
][]; | ||
@@ -55,3 +50,16 @@ export type Prettify<T> = { | ||
export declare function getVForSourceType<T>(source: T): ForableSource<NonNullable<T extends number ? number[] : T extends string ? string[] : T>>; | ||
// v-for | ||
export declare function getVForSourceType(source: number): [number, number, number][]; | ||
export declare function getVForSourceType(source: string): [string, number, number][]; | ||
export declare function getVForSourceType<T extends { [Symbol.iterator](): Iterator<any> }>(source: T): [ | ||
T extends { [Symbol.iterator](): Iterator<infer T1> } ? T1 : never, // item | ||
number, // key | ||
undefined, // index | ||
][]; | ||
export declare function getVForSourceType<T>(source: T): [ | ||
T[keyof T], // item | ||
keyof T, // key | ||
number, // index | ||
][]; | ||
export declare function getSlotParams<T>(slot: T): Parameters<PickNotAny<NonNullable<T>, (...args: any[]) => any>>; | ||
@@ -58,0 +66,0 @@ export declare function getSlotParam<T>(slot: T): Parameters<PickNotAny<NonNullable<T>, (...args: any[]) => any>>[0]; |
{ | ||
"name": "@volar/vue-language-core", | ||
"version": "1.6.1", | ||
"version": "1.6.2", | ||
"main": "out/index.js", | ||
@@ -18,6 +18,6 @@ "license": "MIT", | ||
"@volar/source-map": "1.4.1", | ||
"@vue/compiler-dom": "^3.2.0", | ||
"@vue/compiler-sfc": "^3.2.0", | ||
"@vue/reactivity": "^3.2.0", | ||
"@vue/shared": "^3.2.0", | ||
"@vue/compiler-dom": "^3.3.0-beta.3", | ||
"@vue/compiler-sfc": "^3.3.0-beta.3", | ||
"@vue/reactivity": "^3.3.0-beta.3", | ||
"@vue/shared": "^3.3.0-beta.3", | ||
"minimatch": "^9.0.0", | ||
@@ -30,3 +30,3 @@ "muggle-string": "^0.2.2", | ||
}, | ||
"gitHead": "93408e358cf4e6d7ba86d0949333032a17c8d109" | ||
"gitHead": "927d564d66ba041da4c4affcb9f06d197613aa54" | ||
} |
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
231807
54
5091