@vue/language-core 2.0.29 → 2.1.0
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 +4 -3
- package/index.js +4 -3
- package/lib/codegen/common.d.ts +2 -1
- package/lib/codegen/common.js +16 -5
- package/lib/codegen/globalTypes.d.ts +1 -0
- package/lib/codegen/globalTypes.js +123 -0
- package/lib/codegen/localTypes.d.ts +14 -0
- package/lib/codegen/localTypes.js +120 -0
- package/lib/codegen/script/component.d.ts +1 -4
- package/lib/codegen/script/component.js +112 -63
- package/lib/codegen/script/context.d.ts +14 -10
- package/lib/codegen/script/context.js +5 -107
- package/lib/codegen/script/index.d.ts +3 -2
- package/lib/codegen/script/index.js +37 -53
- package/lib/codegen/script/internalComponent.d.ts +1 -1
- package/lib/codegen/script/internalComponent.js +13 -5
- package/lib/codegen/script/scriptSetup.js +144 -62
- package/lib/codegen/script/template.d.ts +3 -0
- package/lib/codegen/script/template.js +80 -79
- package/lib/codegen/template/context.d.ts +6 -1
- package/lib/codegen/template/context.js +9 -2
- package/lib/codegen/template/element.d.ts +1 -1
- package/lib/codegen/template/element.js +214 -92
- package/lib/codegen/template/elementChildren.js +1 -0
- package/lib/codegen/template/elementDirectives.js +8 -4
- package/lib/codegen/template/elementEvents.js +13 -14
- package/lib/codegen/template/elementProps.js +43 -22
- package/lib/codegen/template/index.d.ts +3 -0
- package/lib/codegen/template/index.js +29 -41
- package/lib/codegen/template/interpolation.d.ts +1 -1
- package/lib/codegen/template/interpolation.js +24 -15
- package/lib/codegen/template/objectProperty.d.ts +1 -1
- package/lib/codegen/template/objectProperty.js +7 -2
- package/lib/codegen/template/styleScopedClasses.d.ts +3 -0
- package/lib/codegen/template/styleScopedClasses.js +72 -0
- package/lib/codegen/template/templateChild.js +5 -1
- package/lib/codegen/types.d.ts +9 -0
- package/lib/codegen/types.js +3 -0
- package/lib/languagePlugin.d.ts +2 -4
- package/lib/languagePlugin.js +4 -57
- package/lib/parsers/scriptRanges.d.ts +1 -0
- package/lib/parsers/scriptRanges.js +5 -0
- package/lib/parsers/scriptSetupRanges.d.ts +17 -3
- package/lib/parsers/scriptSetupRanges.js +127 -44
- package/lib/plugins/file-md.js +9 -6
- package/lib/plugins/vue-root-tags.js +51 -0
- package/lib/plugins/vue-tsx.d.ts +40 -3
- package/lib/plugins/vue-tsx.js +17 -4
- package/lib/plugins.js +2 -0
- package/lib/types.d.ts +14 -10
- package/lib/utils/findDestructuredProps.js +3 -0
- package/lib/utils/parseCssClassNames.js +4 -6
- package/lib/utils/parseCssVars.js +5 -7
- package/lib/utils/parseSfc.js +4 -1
- package/lib/utils/ts.js +8 -2
- package/lib/virtualFile/{computedFiles.d.ts → computedEmbeddedCodes.d.ts} +1 -1
- package/lib/virtualFile/{computedFiles.js → computedEmbeddedCodes.js} +3 -3
- package/lib/virtualFile/computedSfc.d.ts +1 -1
- package/lib/virtualFile/computedSfc.js +14 -3
- package/lib/virtualFile/vueFile.d.ts +13 -3
- package/lib/virtualFile/vueFile.js +17 -9
- package/package.json +4 -4
- package/lib/codegen/script/globalTypes.d.ts +0 -2
- package/lib/codegen/script/globalTypes.js +0 -134
- package/lib/codegen/template/objectKey.js +0 -34
- package/lib/languageModule.d.ts +0 -5
- package/lib/languageModule.js +0 -159
- package/lib/plugins/file-dot-setup.js +0 -34
- package/lib/virtualFile/computedMappings.d.ts +0 -4
- package/lib/virtualFile/computedMappings.js +0 -65
- /package/lib/plugins/{file-dot-setup.d.ts → vue-root-tags.d.ts} +0 -0
- /package/lib/{codegen/template/objectKey.d.ts → utils/findDestructuredProps.d.ts} +0 -0
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { Code } from '../../types';
|
|
2
2
|
import type { ScriptCodegenContext } from './context';
|
|
3
3
|
import { type ScriptCodegenOptions } from './index';
|
|
4
|
+
export declare function generateTemplateCtx(options: ScriptCodegenOptions, isClassComponent: boolean): Generator<Code>;
|
|
5
|
+
export declare function generateTemplateComponents(options: ScriptCodegenOptions): Generator<Code>;
|
|
4
6
|
export declare function generateTemplate(options: ScriptCodegenOptions, ctx: ScriptCodegenContext, isClassComponent: boolean): Generator<Code>;
|
|
7
|
+
export declare function generateCssClassProperty(styleIndex: number, classNameWithDot: string, offset: number, propertyType: string, optional: boolean): Generator<Code>;
|
|
5
8
|
export declare function getTemplateUsageVars(options: ScriptCodegenOptions, ctx: ScriptCodegenContext): Set<string>;
|
|
@@ -1,119 +1,114 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generateTemplateCtx = generateTemplateCtx;
|
|
4
|
+
exports.generateTemplateComponents = generateTemplateComponents;
|
|
3
5
|
exports.generateTemplate = generateTemplate;
|
|
6
|
+
exports.generateCssClassProperty = generateCssClassProperty;
|
|
4
7
|
exports.getTemplateUsageVars = getTemplateUsageVars;
|
|
5
8
|
const shared_1 = require("../../utils/shared");
|
|
6
9
|
const common_1 = require("../common");
|
|
7
10
|
const context_1 = require("../template/context");
|
|
8
11
|
const interpolation_1 = require("../template/interpolation");
|
|
12
|
+
const styleScopedClasses_1 = require("../template/styleScopedClasses");
|
|
9
13
|
const index_1 = require("./index");
|
|
10
14
|
const internalComponent_1 = require("./internalComponent");
|
|
11
|
-
function*
|
|
12
|
-
|
|
13
|
-
if (
|
|
14
|
-
|
|
15
|
-
yield `__VLS_template() {${common_1.newLine}`;
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
yield `function __VLS_template() {${common_1.newLine}`;
|
|
19
|
-
}
|
|
20
|
-
const templateCodegenCtx = (0, context_1.createTemplateCodegenContext)(new Set());
|
|
21
|
-
yield* generateCtx(options, ctx, isClassComponent);
|
|
22
|
-
yield* generateTemplateContext(options, templateCodegenCtx);
|
|
23
|
-
yield* generateExportOptions(options);
|
|
24
|
-
yield* generateConstNameOption(options);
|
|
25
|
-
yield* (0, internalComponent_1.generateInternalComponent)(options, ctx, templateCodegenCtx);
|
|
26
|
-
yield `}${common_1.newLine}`;
|
|
15
|
+
function* generateTemplateCtx(options, isClassComponent) {
|
|
16
|
+
const types = [];
|
|
17
|
+
if (isClassComponent) {
|
|
18
|
+
types.push(`typeof this`);
|
|
27
19
|
}
|
|
28
20
|
else {
|
|
29
|
-
|
|
30
|
-
const templateUsageVars = [...getTemplateUsageVars(options, ctx)];
|
|
31
|
-
yield `// @ts-ignore${common_1.newLine}`;
|
|
32
|
-
yield `[${templateUsageVars.join(', ')}]${common_1.newLine}`;
|
|
33
|
-
yield `return {}${common_1.endOfLine}`;
|
|
34
|
-
yield `}${common_1.newLine}`;
|
|
21
|
+
types.push(`InstanceType<__VLS_PickNotAny<typeof __VLS_internalComponent, new () => {}>>`);
|
|
35
22
|
}
|
|
23
|
+
if (options.vueCompilerOptions.petiteVueExtensions.some(ext => options.fileBaseName.endsWith(ext))) {
|
|
24
|
+
types.push(`typeof globalThis`);
|
|
25
|
+
}
|
|
26
|
+
if (options.sfc.styles.some(style => style.module)) {
|
|
27
|
+
types.push(`__VLS_StyleModules`);
|
|
28
|
+
}
|
|
29
|
+
yield `let __VLS_ctx!: ${types.join(' & ')}${common_1.endOfLine}`;
|
|
36
30
|
}
|
|
37
|
-
function*
|
|
38
|
-
|
|
39
|
-
yield `const __VLS_componentsOption = `;
|
|
31
|
+
function* generateTemplateComponents(options) {
|
|
32
|
+
const exps = [];
|
|
40
33
|
if (options.sfc.script && options.scriptRanges?.exportDefault?.componentsOption) {
|
|
41
|
-
const componentsOption = options.scriptRanges.exportDefault
|
|
42
|
-
|
|
34
|
+
const { componentsOption } = options.scriptRanges.exportDefault;
|
|
35
|
+
exps.push([
|
|
43
36
|
options.sfc.script.content.substring(componentsOption.start, componentsOption.end),
|
|
44
37
|
'script',
|
|
45
38
|
componentsOption.start,
|
|
46
39
|
index_1.codeFeatures.navigation,
|
|
47
|
-
];
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
yield `{}`;
|
|
40
|
+
]);
|
|
51
41
|
}
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
function* generateConstNameOption(options) {
|
|
42
|
+
let nameType;
|
|
55
43
|
if (options.sfc.script && options.scriptRanges?.exportDefault?.nameOption) {
|
|
56
|
-
const nameOption = options.scriptRanges.exportDefault
|
|
57
|
-
|
|
58
|
-
yield `${options.sfc.script.content.substring(nameOption.start, nameOption.end)} as const`;
|
|
59
|
-
yield common_1.endOfLine;
|
|
44
|
+
const { nameOption } = options.scriptRanges.exportDefault;
|
|
45
|
+
nameType = options.sfc.script.content.substring(nameOption.start, nameOption.end);
|
|
60
46
|
}
|
|
61
47
|
else if (options.sfc.scriptSetup) {
|
|
62
48
|
yield `let __VLS_name!: '${options.scriptSetupRanges?.options.name ?? options.fileBaseName.substring(0, options.fileBaseName.lastIndexOf('.'))}'${common_1.endOfLine}`;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
49
|
+
nameType = 'typeof __VLS_name';
|
|
50
|
+
}
|
|
51
|
+
if (nameType) {
|
|
52
|
+
exps.push(`{} as {
|
|
53
|
+
[K in ${nameType}]: typeof __VLS_internalComponent
|
|
54
|
+
& (new () => {
|
|
55
|
+
${(0, shared_1.getSlotsPropertyName)(options.vueCompilerOptions.target)}: typeof ${options.scriptSetupRanges?.slots?.name ?? '__VLS_slots'}
|
|
56
|
+
})
|
|
57
|
+
}`);
|
|
58
|
+
}
|
|
59
|
+
exps.push(`{} as NonNullable<typeof __VLS_internalComponent extends { components: infer C } ? C : {}>`);
|
|
60
|
+
exps.push(`{} as __VLS_GlobalComponents`);
|
|
61
|
+
exps.push(`{} as typeof __VLS_ctx`);
|
|
62
|
+
yield `const __VLS_components = {${common_1.newLine}`;
|
|
63
|
+
for (const type of exps) {
|
|
64
|
+
yield `...`;
|
|
65
|
+
yield type;
|
|
66
|
+
yield `,${common_1.newLine}`;
|
|
67
|
+
}
|
|
68
|
+
yield `}${common_1.endOfLine}`;
|
|
67
69
|
}
|
|
68
|
-
function*
|
|
69
|
-
|
|
70
|
-
if (options.vueCompilerOptions.
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
function* generateTemplate(options, ctx, isClassComponent) {
|
|
71
|
+
ctx.generatedTemplate = true;
|
|
72
|
+
if (!options.vueCompilerOptions.skipTemplateCodegen) {
|
|
73
|
+
const templateCodegenCtx = (0, context_1.createTemplateCodegenContext)({
|
|
74
|
+
scriptSetupBindingNames: new Set(),
|
|
75
|
+
edited: options.edited,
|
|
76
|
+
});
|
|
77
|
+
yield* generateTemplateCtx(options, isClassComponent);
|
|
78
|
+
yield* generateTemplateComponents(options);
|
|
79
|
+
yield* generateTemplateBody(options, ctx, templateCodegenCtx);
|
|
80
|
+
yield* (0, internalComponent_1.generateInternalComponent)(options, ctx, templateCodegenCtx);
|
|
75
81
|
}
|
|
76
82
|
else {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
yield `& {${common_1.newLine}`;
|
|
82
|
-
for (let i = 0; i < options.sfc.styles.length; i++) {
|
|
83
|
-
const style = options.sfc.styles[i];
|
|
84
|
-
if (style.module) {
|
|
85
|
-
yield `${style.module}: Record<string, string> & ${ctx.helperTypes.Prettify.name}<{}`;
|
|
86
|
-
for (const className of style.classNames) {
|
|
87
|
-
yield* generateCssClassProperty(i, className.text, className.offset, 'string', false);
|
|
88
|
-
}
|
|
89
|
-
yield `>${common_1.endOfLine}`;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
yield `}`;
|
|
83
|
+
const templateUsageVars = [...getTemplateUsageVars(options, ctx)];
|
|
84
|
+
yield `// @ts-ignore${common_1.newLine}`;
|
|
85
|
+
yield `[${templateUsageVars.join(', ')}]${common_1.newLine}`;
|
|
86
|
+
yield `const __VLS_templateResult { slots: {}, refs: {}, attrs: {} }${common_1.endOfLine}`;
|
|
93
87
|
}
|
|
94
|
-
yield common_1.endOfLine;
|
|
95
88
|
}
|
|
96
|
-
function*
|
|
97
|
-
|
|
98
|
-
yield
|
|
99
|
-
yield `let __VLS_otherComponents!: NonNullable<typeof __VLS_internalComponent extends { components: infer C } ? C : {}> & typeof __VLS_componentsOption${common_1.endOfLine}`;
|
|
100
|
-
yield `let __VLS_own!: __VLS_SelfComponent<typeof __VLS_name, typeof __VLS_internalComponent & (new () => { ${(0, shared_1.getSlotsPropertyName)(options.vueCompilerOptions.target)}: typeof ${options.scriptSetupRanges?.slots?.name ?? '__VLS_slots'} })>${common_1.endOfLine}`;
|
|
101
|
-
yield `let __VLS_localComponents!: typeof __VLS_otherComponents & Omit<typeof __VLS_own, keyof typeof __VLS_otherComponents>${common_1.endOfLine}`;
|
|
102
|
-
yield `let __VLS_components!: typeof __VLS_localComponents & __VLS_GlobalComponents & typeof __VLS_ctx${common_1.endOfLine}`; // for html completion, TS references...
|
|
103
|
-
/* Style Scoped */
|
|
104
|
-
yield `/* Style Scoped */${common_1.newLine}`;
|
|
105
|
-
yield `type __VLS_StyleScopedClasses = {}`;
|
|
89
|
+
function* generateTemplateBody(options, ctx, templateCodegenCtx) {
|
|
90
|
+
const firstClasses = new Set();
|
|
91
|
+
yield `let __VLS_styleScopedClasses!: {}`;
|
|
106
92
|
for (let i = 0; i < options.sfc.styles.length; i++) {
|
|
107
93
|
const style = options.sfc.styles[i];
|
|
108
94
|
const option = options.vueCompilerOptions.experimentalResolveStyleCssClasses;
|
|
109
95
|
if (option === 'always' || (option === 'scoped' && style.scoped)) {
|
|
110
96
|
for (const className of style.classNames) {
|
|
97
|
+
if (firstClasses.has(className.text)) {
|
|
98
|
+
templateCodegenCtx.scopedClasses.push({
|
|
99
|
+
source: 'style_' + i,
|
|
100
|
+
className: className.text.slice(1),
|
|
101
|
+
offset: className.offset + 1
|
|
102
|
+
});
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
firstClasses.add(className.text);
|
|
111
106
|
yield* generateCssClassProperty(i, className.text, className.offset, 'boolean', true);
|
|
112
107
|
}
|
|
113
108
|
}
|
|
114
109
|
}
|
|
115
110
|
yield common_1.endOfLine;
|
|
116
|
-
yield
|
|
111
|
+
yield* (0, styleScopedClasses_1.generateStyleScopedClasses)(templateCodegenCtx, true);
|
|
117
112
|
yield* generateCssVars(options, templateCodegenCtx);
|
|
118
113
|
if (options.templateCodegen) {
|
|
119
114
|
for (const code of options.templateCodegen.codes) {
|
|
@@ -124,9 +119,15 @@ function* generateTemplateContext(options, templateCodegenCtx) {
|
|
|
124
119
|
yield `// no template${common_1.newLine}`;
|
|
125
120
|
if (!options.scriptSetupRanges?.slots.define) {
|
|
126
121
|
yield `const __VLS_slots = {}${common_1.endOfLine}`;
|
|
122
|
+
yield `const __VLS_refs = {}${common_1.endOfLine}`;
|
|
123
|
+
yield `const __VLS_inheritedAttrs = {}${common_1.endOfLine}`;
|
|
127
124
|
}
|
|
128
125
|
}
|
|
129
|
-
yield `
|
|
126
|
+
yield `const __VLS_templateResult = {`;
|
|
127
|
+
yield `slots: ${options.scriptSetupRanges?.slots.name ?? '__VLS_slots'},${common_1.newLine}`;
|
|
128
|
+
yield `refs: __VLS_refs as ${ctx.localTypes.PickRefsExpose}<typeof __VLS_refs>,${common_1.newLine}`;
|
|
129
|
+
yield `attrs: {} as Partial<typeof __VLS_inheritedAttrs>,${common_1.newLine}`;
|
|
130
|
+
yield `}${common_1.endOfLine}`;
|
|
130
131
|
}
|
|
131
132
|
function* generateCssClassProperty(styleIndex, classNameWithDot, offset, propertyType, optional) {
|
|
132
133
|
yield `${common_1.newLine} & { `;
|
|
@@ -134,7 +135,7 @@ function* generateCssClassProperty(styleIndex, classNameWithDot, offset, propert
|
|
|
134
135
|
'',
|
|
135
136
|
'style_' + styleIndex,
|
|
136
137
|
offset,
|
|
137
|
-
index_1.codeFeatures.
|
|
138
|
+
index_1.codeFeatures.navigation,
|
|
138
139
|
];
|
|
139
140
|
yield `'`;
|
|
140
141
|
yield [
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type * as CompilerDOM from '@vue/compiler-dom';
|
|
2
2
|
import type { Code, VueCodeInformation } from '../../types';
|
|
3
3
|
import type { TemplateCodegenOptions } from './index';
|
|
4
|
+
import { InlayHintInfo } from '../types';
|
|
4
5
|
export type TemplateCodegenContext = ReturnType<typeof createTemplateCodegenContext>;
|
|
5
|
-
export declare function createTemplateCodegenContext(
|
|
6
|
+
export declare function createTemplateCodegenContext(options: Pick<TemplateCodegenOptions, 'scriptSetupBindingNames' | 'edited'>): {
|
|
6
7
|
slots: {
|
|
7
8
|
name: string;
|
|
8
9
|
loc?: number;
|
|
@@ -32,11 +33,15 @@ export declare function createTemplateCodegenContext(scriptSetupBindingNames: Te
|
|
|
32
33
|
blockConditions: string[];
|
|
33
34
|
usedComponentCtxVars: Set<string>;
|
|
34
35
|
scopedClasses: {
|
|
36
|
+
source: string;
|
|
35
37
|
className: string;
|
|
36
38
|
offset: number;
|
|
37
39
|
}[];
|
|
38
40
|
emptyClassOffsets: number[];
|
|
41
|
+
inlayHints: InlayHintInfo[];
|
|
39
42
|
hasSlot: boolean;
|
|
43
|
+
inheritedAttrVars: Set<unknown>;
|
|
44
|
+
singleRootNode: CompilerDOM.ElementNode | undefined;
|
|
40
45
|
accessExternalVariable(name: string, offset?: number): void;
|
|
41
46
|
hasLocalVariable: (name: string) => boolean;
|
|
42
47
|
addLocalVariable: (name: string) => void;
|
|
@@ -52,7 +52,7 @@ const _codeFeatures = {
|
|
|
52
52
|
verification: true,
|
|
53
53
|
},
|
|
54
54
|
};
|
|
55
|
-
function createTemplateCodegenContext(
|
|
55
|
+
function createTemplateCodegenContext(options) {
|
|
56
56
|
let ignoredError = false;
|
|
57
57
|
let expectErrorToken;
|
|
58
58
|
let variableId = 0;
|
|
@@ -94,6 +94,7 @@ function createTemplateCodegenContext(scriptSetupBindingNames) {
|
|
|
94
94
|
const usedComponentCtxVars = new Set();
|
|
95
95
|
const scopedClasses = [];
|
|
96
96
|
const emptyClassOffsets = [];
|
|
97
|
+
const inlayHints = [];
|
|
97
98
|
return {
|
|
98
99
|
slots,
|
|
99
100
|
dynamicSlots,
|
|
@@ -104,7 +105,10 @@ function createTemplateCodegenContext(scriptSetupBindingNames) {
|
|
|
104
105
|
usedComponentCtxVars,
|
|
105
106
|
scopedClasses,
|
|
106
107
|
emptyClassOffsets,
|
|
108
|
+
inlayHints,
|
|
107
109
|
hasSlot: false,
|
|
110
|
+
inheritedAttrVars: new Set(),
|
|
111
|
+
singleRootNode: undefined,
|
|
108
112
|
accessExternalVariable(name, offset) {
|
|
109
113
|
let arr = accessExternalVariables.get(name);
|
|
110
114
|
if (!arr) {
|
|
@@ -159,6 +163,9 @@ function createTemplateCodegenContext(scriptSetupBindingNames) {
|
|
|
159
163
|
}
|
|
160
164
|
},
|
|
161
165
|
generateAutoImportCompletion: function* () {
|
|
166
|
+
if (!options.edited) {
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
162
169
|
const all = [...accessExternalVariables.entries()];
|
|
163
170
|
if (!all.some(([_, offsets]) => offsets.size)) {
|
|
164
171
|
return;
|
|
@@ -167,7 +174,7 @@ function createTemplateCodegenContext(scriptSetupBindingNames) {
|
|
|
167
174
|
yield `[`;
|
|
168
175
|
for (const [varName, offsets] of all) {
|
|
169
176
|
for (const offset of offsets) {
|
|
170
|
-
if (scriptSetupBindingNames.has(varName)) {
|
|
177
|
+
if (options.scriptSetupBindingNames.has(varName)) {
|
|
171
178
|
// #3409
|
|
172
179
|
yield [
|
|
173
180
|
varName,
|
|
@@ -2,7 +2,7 @@ import * as CompilerDOM from '@vue/compiler-dom';
|
|
|
2
2
|
import type { Code } from '../../types';
|
|
3
3
|
import type { TemplateCodegenContext } from './context';
|
|
4
4
|
import type { TemplateCodegenOptions } from './index';
|
|
5
|
-
export declare function generateComponent(options: TemplateCodegenOptions, ctx: TemplateCodegenContext, node: CompilerDOM.ElementNode, currentComponent: CompilerDOM.ElementNode | undefined
|
|
5
|
+
export declare function generateComponent(options: TemplateCodegenOptions, ctx: TemplateCodegenContext, node: CompilerDOM.ElementNode, currentComponent: CompilerDOM.ElementNode | undefined): Generator<Code>;
|
|
6
6
|
export declare function generateElement(options: TemplateCodegenOptions, ctx: TemplateCodegenContext, node: CompilerDOM.ElementNode, currentComponent: CompilerDOM.ElementNode | undefined, componentCtxVar: string | undefined): Generator<Code>;
|
|
7
7
|
export declare function getCanonicalComponentName(tagText: string): string;
|
|
8
8
|
export declare function getPossibleOriginalComponentNames(tagText: string, deduplicate: boolean): string[];
|