@vue/language-core 3.3.5 → 3.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/lib/codegen/codeFeatures.d.ts +24 -84
- package/lib/codegen/codeFeatures.js +46 -4
- package/lib/codegen/names.d.ts +3 -4
- package/lib/codegen/names.js +3 -4
- package/lib/codegen/script/index.js +5 -5
- package/lib/codegen/script/scriptSetup.js +4 -4
- package/lib/codegen/style/common.js +7 -11
- package/lib/codegen/style/index.d.ts +55 -27
- package/lib/codegen/style/index.js +3 -3
- package/lib/codegen/template/context.d.ts +55 -124
- package/lib/codegen/template/context.js +187 -269
- package/lib/codegen/template/element.js +16 -15
- package/lib/codegen/template/elementDirectives.js +11 -11
- package/lib/codegen/template/elementEvents.js +45 -44
- package/lib/codegen/template/elementProps.js +12 -12
- package/lib/codegen/template/index.d.ts +55 -27
- package/lib/codegen/template/index.js +7 -7
- package/lib/codegen/template/interpolation.js +28 -28
- package/lib/codegen/template/objectProperty.js +5 -5
- package/lib/codegen/template/propertyAccess.js +1 -1
- package/lib/codegen/template/slotOutlet.js +8 -10
- package/lib/codegen/template/styleScopedClasses.js +4 -4
- package/lib/codegen/template/vFor.js +3 -3
- package/lib/codegen/template/vIf.js +4 -4
- package/lib/codegen/template/vSlot.js +9 -9
- package/lib/codegen/utils/boundary.d.ts +7 -2
- package/lib/codegen/utils/boundary.js +15 -9
- package/lib/codegen/utils/camelized.js +5 -13
- package/lib/codegen/utils/escaped.js +4 -9
- package/lib/codegen/utils/index.d.ts +1 -1
- package/lib/codegen/utils/index.js +3 -3
- package/lib/codegen/utils/stringLiteralKey.js +3 -3
- package/lib/codegen/utils/unicode.d.ts +1 -1
- package/lib/codegen/utils/unicode.js +4 -4
- package/lib/languagePlugin.js +2 -1
- package/lib/parsers/scriptRanges.d.ts +2 -2
- package/lib/parsers/scriptRanges.js +3 -10
- package/lib/parsers/scriptSetupRanges.d.ts +2 -2
- package/lib/parsers/scriptSetupRanges.js +3 -10
- package/lib/parsers/utils.d.ts +1 -0
- package/lib/parsers/utils.js +10 -0
- package/lib/parsers/vueCompilerOptions.js +2 -2
- package/lib/plugins/file-html.js +4 -4
- package/lib/plugins/file-md.js +15 -15
- package/lib/plugins/file-vue.js +2 -2
- package/lib/plugins/vue-root-tags.js +3 -3
- package/lib/plugins/vue-sfc-customblocks.js +2 -2
- package/lib/plugins/vue-sfc-scripts.js +2 -4
- package/lib/plugins/vue-sfc-styles.js +3 -3
- package/lib/plugins/vue-sfc-template.js +2 -2
- package/lib/plugins/vue-style-css.js +86 -33
- package/lib/plugins/vue-template-html.js +3 -3
- package/lib/plugins/vue-template-inline-css.js +2 -7
- package/lib/plugins/vue-template-inline-ts.js +4 -5
- package/lib/plugins/vue-tsx.d.ts +61 -31
- package/lib/plugins/vue-tsx.js +26 -23
- package/lib/plugins.d.ts +0 -1
- package/lib/plugins.js +0 -15
- package/lib/utils/forEachTemplateNode.js +36 -43
- package/lib/virtualCode/index.js +2 -2
- package/package.json +2 -2
- package/types/template-helpers.d.ts +14 -24
- package/lib/plugins/shared.d.ts +0 -2
- package/lib/plugins/shared.js +0 -12
|
@@ -21,25 +21,16 @@ declare global {
|
|
|
21
21
|
: N2 extends keyof GlobalComponents ? { [K in N0]: GlobalComponents[N2] }
|
|
22
22
|
: N3 extends keyof GlobalComponents ? { [K in N0]: GlobalComponents[N3] }
|
|
23
23
|
: {};
|
|
24
|
-
type
|
|
24
|
+
type __VLS_ExtractComponentContext<T, K> = __VLS_PickNotAny<
|
|
25
25
|
'__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends { __ctx?: infer Ctx } ? NonNullable<Ctx> : never : any,
|
|
26
26
|
T extends (props: any, ctx: infer Ctx) => any ? Ctx : any
|
|
27
27
|
>;
|
|
28
|
-
type
|
|
28
|
+
type __VLS_ExtractComponentProps<T, K> = '__ctx' extends keyof __VLS_PickNotAny<K, {}>
|
|
29
29
|
? K extends { __ctx?: { props?: infer P } } ? NonNullable<P> : never
|
|
30
30
|
: T extends (props: infer P, ...args: any) => any ? P
|
|
31
31
|
: {};
|
|
32
|
-
type
|
|
33
|
-
|
|
34
|
-
attrs?: any;
|
|
35
|
-
slots?: T extends { $slots: infer Slots } ? Slots : Record<string, any>;
|
|
36
|
-
emit?: T extends { $emit: infer Emit } ? Emit : {};
|
|
37
|
-
props?: typeof props;
|
|
38
|
-
expose?: (exposed: T) => void;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
type __VLS_FunctionalComponent1<T> = (
|
|
42
|
-
props: (T extends { $props: infer Props } ? Props : {}) & Record<string, unknown>,
|
|
32
|
+
type __VLS_FunctionalComponent<T, P = {}> = (
|
|
33
|
+
props: (T extends { $props: infer Props } ? Props : {}) & P,
|
|
43
34
|
ctx?: any,
|
|
44
35
|
) => {
|
|
45
36
|
__ctx?: {
|
|
@@ -50,9 +41,8 @@ declare global {
|
|
|
50
41
|
expose?: (exposed: T) => void;
|
|
51
42
|
};
|
|
52
43
|
};
|
|
53
|
-
type __VLS_IsFunction<T, K> = K extends keyof T ?
|
|
54
|
-
|
|
55
|
-
: false
|
|
44
|
+
type __VLS_IsFunction<T, K> = K extends keyof T ? unknown extends T[K] ? false
|
|
45
|
+
: true
|
|
56
46
|
: false;
|
|
57
47
|
type __VLS_ResolveEvent<
|
|
58
48
|
Props,
|
|
@@ -123,20 +113,20 @@ declare global {
|
|
|
123
113
|
>
|
|
124
114
|
: T extends (...args: any) => any ? T
|
|
125
115
|
: (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown) => void;
|
|
126
|
-
function __VLS_asFunctionalComponent0<T, K
|
|
116
|
+
function __VLS_asFunctionalComponent0<T, K>(
|
|
127
117
|
t: T,
|
|
128
|
-
instance
|
|
129
|
-
): T extends new(...args: any) => any ?
|
|
118
|
+
instance: K,
|
|
119
|
+
): T extends new(...args: any) => any ? __VLS_FunctionalComponent<K>
|
|
130
120
|
: T extends () => any ? (props: {}, ctx?: any) => ReturnType<T>
|
|
131
121
|
: T extends (...args: any) => any ? T
|
|
132
|
-
:
|
|
133
|
-
function __VLS_asFunctionalComponent1<T, K
|
|
122
|
+
: __VLS_FunctionalComponent<{}>;
|
|
123
|
+
function __VLS_asFunctionalComponent1<T, K>(
|
|
134
124
|
t: T,
|
|
135
|
-
instance
|
|
136
|
-
): T extends new(...args: any) => any ?
|
|
125
|
+
instance: K,
|
|
126
|
+
): T extends new(...args: any) => any ? __VLS_FunctionalComponent<K, Record<string, unknown>>
|
|
137
127
|
: T extends () => any ? (props: {}, ctx?: any) => ReturnType<T>
|
|
138
128
|
: T extends (...args: any) => any ? T
|
|
139
|
-
:
|
|
129
|
+
: __VLS_FunctionalComponent<{}, Record<string, unknown>>;
|
|
140
130
|
function __VLS_functionalComponentArgsRest<T extends (...args: any) => any>(
|
|
141
131
|
t: T,
|
|
142
132
|
): 2 extends Parameters<T>['length'] ? [any] : [];
|
package/lib/plugins/shared.d.ts
DELETED
package/lib/plugins/shared.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.allCodeFeatures = void 0;
|
|
4
|
-
exports.allCodeFeatures = {
|
|
5
|
-
verification: true,
|
|
6
|
-
completion: true,
|
|
7
|
-
semantic: true,
|
|
8
|
-
navigation: true,
|
|
9
|
-
structure: true,
|
|
10
|
-
format: true,
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=shared.js.map
|