@vue/language-core 3.2.7 → 3.2.9
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 +2 -1
- package/index.js +3 -23
- package/lib/codegen/names.d.ts +73 -26
- package/lib/codegen/names.js +75 -27
- package/lib/codegen/script/component.js +19 -58
- package/lib/codegen/script/index.js +12 -12
- package/lib/codegen/script/scriptSetup.js +48 -81
- package/lib/codegen/script/template.js +29 -63
- package/lib/codegen/style/modules.js +4 -37
- package/lib/codegen/style/scopedClasses.js +2 -1
- package/lib/codegen/template/element.d.ts +1 -0
- package/lib/codegen/template/element.js +45 -25
- package/lib/codegen/template/elementDirectives.js +4 -4
- package/lib/codegen/template/elementEvents.js +3 -2
- package/lib/codegen/template/elementProps.js +9 -9
- package/lib/codegen/template/index.js +16 -49
- package/lib/codegen/template/interpolation.js +3 -36
- package/lib/codegen/template/objectProperty.js +2 -1
- package/lib/codegen/template/slotOutlet.js +5 -5
- package/lib/codegen/template/styleScopedClasses.js +3 -2
- package/lib/codegen/template/templateChild.d.ts +1 -1
- package/lib/codegen/template/templateChild.js +14 -23
- package/lib/codegen/template/vFor.js +3 -20
- package/lib/codegen/template/vIf.js +1 -5
- package/lib/codegen/template/vSlot.js +2 -1
- package/lib/languagePlugin.js +2 -0
- package/lib/plugins/file-md.js +26 -30
- package/lib/plugins/vue-template-html.js +37 -12
- package/lib/plugins/vue-template-inline-ts.js +0 -4
- package/lib/plugins/vue-tsx.js +5 -22
- package/lib/template/compile.d.ts +2 -0
- package/lib/template/compile.js +31 -0
- package/lib/template/transforms/transformElement.d.ts +2 -0
- package/lib/template/transforms/transformElement.js +95 -0
- package/lib/template/transforms/transformText.d.ts +2 -0
- package/lib/template/transforms/transformText.js +35 -0
- package/lib/template/transforms/vFor.d.ts +1 -0
- package/lib/template/transforms/vFor.js +42 -0
- package/lib/template/transforms/vIf.d.ts +1 -0
- package/lib/template/transforms/vIf.js +92 -0
- package/lib/template/utils.d.ts +3 -0
- package/lib/template/utils.js +37 -0
- package/lib/types.d.ts +1 -0
- package/lib/utils/forEachTemplateNode.js +0 -3
- package/lib/virtualCode/ir.js +0 -39
- package/package.json +12 -6
- package/lib/virtualCode/normalize.d.ts +0 -2
- package/lib/virtualCode/normalize.js +0 -205
|
@@ -35,13 +35,14 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.generateComponent = generateComponent;
|
|
37
37
|
exports.generateElement = generateElement;
|
|
38
|
+
exports.generateFragment = generateFragment;
|
|
38
39
|
const CompilerDOM = __importStar(require("@vue/compiler-dom"));
|
|
39
40
|
const shared_1 = require("@vue/shared");
|
|
40
41
|
const muggle_string_1 = require("muggle-string");
|
|
41
42
|
const shared_2 = require("../../utils/shared");
|
|
42
43
|
const codeFeatures_1 = require("../codeFeatures");
|
|
43
44
|
const inlayHints_1 = require("../inlayHints");
|
|
44
|
-
const
|
|
45
|
+
const names_1 = require("../names");
|
|
45
46
|
const utils_1 = require("../utils");
|
|
46
47
|
const boundary_1 = require("../utils/boundary");
|
|
47
48
|
const camelized_1 = require("../utils/camelized");
|
|
@@ -114,9 +115,9 @@ function* generateComponent(options, ctx, node) {
|
|
|
114
115
|
yield utils_1.endOfLine;
|
|
115
116
|
}
|
|
116
117
|
else {
|
|
117
|
-
yield `let ${componentVar}!:
|
|
118
|
+
yield `let ${componentVar}!: ${names_1.names.WithComponent}<'${tag}', ${names_1.names.LocalComponents}, ${names_1.names.GlobalComponents}`;
|
|
118
119
|
yield originalNames.has(options.componentName)
|
|
119
|
-
? `, typeof ${names.
|
|
120
|
+
? `, typeof ${names_1.names.export}`
|
|
120
121
|
: `, void`;
|
|
121
122
|
for (const name of originalNames) {
|
|
122
123
|
yield `, '${name}'`;
|
|
@@ -131,18 +132,21 @@ function* generateComponent(options, ctx, node) {
|
|
|
131
132
|
yield `]${utils_1.endOfLine}`;
|
|
132
133
|
if (utils_1.identifierRegex.test((0, shared_1.camelize)(tag))) {
|
|
133
134
|
// navigation support
|
|
134
|
-
yield `/** @ts-ignore @type {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
yield ` | typeof ${names.components}.`;
|
|
142
|
-
yield* (0, camelized_1.generateCamelized)(tag, 'template', endTagOffset, codeFeatures_1.codeFeatures.navigation);
|
|
135
|
+
yield `/** @ts-ignore @type {`;
|
|
136
|
+
for (const offset of [startTagOffset, endTagOffset]) {
|
|
137
|
+
if (offset === undefined) {
|
|
138
|
+
continue;
|
|
139
|
+
}
|
|
140
|
+
yield ` | typeof ${names_1.names.components}.`;
|
|
141
|
+
yield* (0, camelized_1.generateCamelized)(tag, 'template', offset, codeFeatures_1.codeFeatures.navigation);
|
|
143
142
|
if (tag[0] !== tag[0].toUpperCase()) {
|
|
144
|
-
yield ` | typeof ${names.components}.`;
|
|
145
|
-
yield* (0, camelized_1.generateCamelized)((0, shared_1.capitalize)(tag), 'template',
|
|
143
|
+
yield ` | typeof ${names_1.names.components}.`;
|
|
144
|
+
yield* (0, camelized_1.generateCamelized)((0, shared_1.capitalize)(tag), 'template', offset, codeFeatures_1.codeFeatures.navigation);
|
|
145
|
+
}
|
|
146
|
+
if (tag.includes('-')) {
|
|
147
|
+
yield ` | typeof ${names_1.names.components}[`;
|
|
148
|
+
yield* (0, stringLiteralKey_1.generateStringLiteralKey)(tag, offset, codeFeatures_1.codeFeatures.navigation);
|
|
149
|
+
yield `]`;
|
|
146
150
|
}
|
|
147
151
|
}
|
|
148
152
|
yield `} */${utils_1.newLine}`;
|
|
@@ -163,16 +167,16 @@ function* generateComponentBody(options, ctx, node, tag, tagOffset, props, compo
|
|
|
163
167
|
const failGeneratedExpressions = [];
|
|
164
168
|
const propCodes = [...(0, elementProps_1.generateElementProps)(options, ctx, node, props, options.vueCompilerOptions.checkUnknownProps, failGeneratedExpressions)];
|
|
165
169
|
const functionalVar = ctx.getInternalVariable();
|
|
166
|
-
const
|
|
170
|
+
const vnodeVar = ctx.getInternalVariable();
|
|
167
171
|
const ctxVar = ctx.getInternalVariable();
|
|
168
172
|
const propsVar = ctx.getInternalVariable();
|
|
169
173
|
yield `// @ts-ignore${utils_1.newLine}`;
|
|
170
|
-
yield `const ${functionalVar} = ${options.vueCompilerOptions.checkUnknownProps ?
|
|
174
|
+
yield `const ${functionalVar} = ${options.vueCompilerOptions.checkUnknownProps ? names_1.names.asFunctionalComponent0 : names_1.names.asFunctionalComponent1}(${componentVar}, new ${componentVar}({${utils_1.newLine}`;
|
|
171
175
|
yield (0, muggle_string_1.toString)(propCodes);
|
|
172
176
|
yield `}))${utils_1.endOfLine}`;
|
|
173
177
|
yield `const `;
|
|
174
178
|
const token = yield* (0, boundary_1.startBoundary)('template', node.loc.start.offset, codeFeatures_1.codeFeatures.doNotReportTs6133);
|
|
175
|
-
yield
|
|
179
|
+
yield vnodeVar;
|
|
176
180
|
yield (0, boundary_1.endBoundary)(token, node.loc.end.offset);
|
|
177
181
|
yield ` = ${functionalVar}`;
|
|
178
182
|
if (ctx.currentInfo.generic) {
|
|
@@ -189,7 +193,7 @@ function* generateComponentBody(options, ctx, node, tag, tagOffset, props, compo
|
|
|
189
193
|
yield* propCodes;
|
|
190
194
|
yield `}`;
|
|
191
195
|
yield (0, boundary_1.endBoundary)(token2, tagOffset + tag.length);
|
|
192
|
-
yield `,
|
|
196
|
+
yield `, ...${names_1.names.functionalComponentArgsRest}(${functionalVar}))${utils_1.endOfLine}`;
|
|
193
197
|
yield* generateFailedExpressions(options, ctx, failGeneratedExpressions);
|
|
194
198
|
yield* (0, elementEvents_1.generateElementEvents)(options, ctx, node, componentVar, getCtxVar, getPropsVar);
|
|
195
199
|
yield* (0, elementDirectives_1.generateElementDirectives)(options, ctx, node);
|
|
@@ -220,21 +224,21 @@ function* generateComponentBody(options, ctx, node, tag, tagOffset, props, compo
|
|
|
220
224
|
yield* (0, vSlot_1.generateVSlot)(options, ctx, node, slotDir, getCtxVar());
|
|
221
225
|
}
|
|
222
226
|
if (isCtxVarUsed) {
|
|
223
|
-
yield `var ${ctxVar}!:
|
|
227
|
+
yield `var ${ctxVar}!: ${names_1.names.FunctionalComponentCtx}<typeof ${componentVar}, typeof ${vnodeVar}>${utils_1.endOfLine}`;
|
|
224
228
|
}
|
|
225
229
|
if (isPropsVarUsed) {
|
|
226
|
-
yield `var ${propsVar}!:
|
|
230
|
+
yield `var ${propsVar}!: ${names_1.names.FunctionalComponentProps}<typeof ${componentVar}, typeof ${vnodeVar}>${utils_1.endOfLine}`;
|
|
227
231
|
}
|
|
228
232
|
ctx.components.pop();
|
|
229
233
|
}
|
|
230
234
|
function* generateElement(options, ctx, node) {
|
|
231
235
|
const [startTagOffset, endTagOffset] = (0, shared_2.getElementTagOffsets)(node, options.template);
|
|
232
236
|
const failedPropExps = [];
|
|
233
|
-
yield `${options.vueCompilerOptions.checkUnknownProps ?
|
|
237
|
+
yield `${options.vueCompilerOptions.checkUnknownProps ? names_1.names.asFunctionalElement0 : names_1.names.asFunctionalElement1}(${names_1.names.intrinsics}`;
|
|
234
238
|
yield* (0, propertyAccess_1.generatePropertyAccess)(options, ctx, node.tag, startTagOffset, codeFeatures_1.codeFeatures.withoutHighlightAndCompletion);
|
|
235
239
|
if (endTagOffset !== undefined) {
|
|
236
240
|
yield `, `;
|
|
237
|
-
yield names.intrinsics;
|
|
241
|
+
yield names_1.names.intrinsics;
|
|
238
242
|
yield* (0, propertyAccess_1.generatePropertyAccess)(options, ctx, node.tag, endTagOffset, codeFeatures_1.codeFeatures.withoutHighlightAndCompletion);
|
|
239
243
|
}
|
|
240
244
|
yield `)(`;
|
|
@@ -248,23 +252,39 @@ function* generateElement(options, ctx, node) {
|
|
|
248
252
|
yield* (0, elementDirectives_1.generateElementDirectives)(options, ctx, node);
|
|
249
253
|
const templateRef = getTemplateRef(node);
|
|
250
254
|
if (templateRef) {
|
|
251
|
-
let typeExp =
|
|
255
|
+
let typeExp = `${names_1.names.Elements}['${node.tag}']`;
|
|
252
256
|
if (ctx.inVFor) {
|
|
253
257
|
typeExp += `[]`;
|
|
254
258
|
}
|
|
255
259
|
ctx.addTemplateRef(templateRef[0], typeExp, templateRef[1]);
|
|
256
260
|
}
|
|
257
261
|
if (ctx.singleRootNodes.has(node)) {
|
|
258
|
-
ctx.singleRootElTypes.add(
|
|
262
|
+
ctx.singleRootElTypes.add(`${names_1.names.Elements}['${node.tag}']`);
|
|
259
263
|
}
|
|
260
264
|
if (hasVBindAttrs(options, ctx, node)) {
|
|
261
|
-
ctx.inheritedAttrVars.add(
|
|
265
|
+
ctx.inheritedAttrVars.add(`${names_1.names.intrinsics}.${node.tag}`);
|
|
262
266
|
}
|
|
263
267
|
yield* generateStyleScopedClassReferences(options, node);
|
|
264
268
|
for (const child of node.children) {
|
|
265
269
|
yield* (0, templateChild_1.generateTemplateChild)(options, ctx, child);
|
|
266
270
|
}
|
|
267
271
|
}
|
|
272
|
+
function* generateFragment(options, ctx, node) {
|
|
273
|
+
const [startTagOffset] = (0, shared_2.getElementTagOffsets)(node, options.template);
|
|
274
|
+
// special case for <template v-for="..." :key="..." />
|
|
275
|
+
if (node.props.length) {
|
|
276
|
+
yield `__VLS_asFunctionalElement(__VLS_intrinsics.template)(`;
|
|
277
|
+
const token = yield* (0, boundary_1.startBoundary)('template', startTagOffset, codeFeatures_1.codeFeatures.verification);
|
|
278
|
+
yield `{${utils_1.newLine}`;
|
|
279
|
+
yield* (0, elementProps_1.generateElementProps)(options, ctx, node, node.props, options.vueCompilerOptions.checkUnknownProps);
|
|
280
|
+
yield `}`;
|
|
281
|
+
yield (0, boundary_1.endBoundary)(token, startTagOffset + node.tag.length);
|
|
282
|
+
yield `)${utils_1.endOfLine}`;
|
|
283
|
+
}
|
|
284
|
+
for (const child of node.children) {
|
|
285
|
+
yield* (0, templateChild_1.generateTemplateChild)(options, ctx, child);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
268
288
|
function* generateStyleScopedClassReferences({ template, typescript: ts }, node) {
|
|
269
289
|
for (const prop of node.props) {
|
|
270
290
|
if (prop.type === CompilerDOM.NodeTypes.ATTRIBUTE
|
|
@@ -38,7 +38,7 @@ exports.generateModifiers = generateModifiers;
|
|
|
38
38
|
const CompilerDOM = __importStar(require("@vue/compiler-dom"));
|
|
39
39
|
const shared_1 = require("@vue/shared");
|
|
40
40
|
const codeFeatures_1 = require("../codeFeatures");
|
|
41
|
-
const
|
|
41
|
+
const names_1 = require("../names");
|
|
42
42
|
const utils_1 = require("../utils");
|
|
43
43
|
const boundary_1 = require("../utils/boundary");
|
|
44
44
|
const camelized_1 = require("../utils/camelized");
|
|
@@ -56,9 +56,9 @@ function* generateElementDirectives(options, ctx, node) {
|
|
|
56
56
|
continue;
|
|
57
57
|
}
|
|
58
58
|
const token = yield* (0, boundary_1.startBoundary)('template', prop.loc.start.offset, codeFeatures_1.codeFeatures.verification);
|
|
59
|
-
yield
|
|
59
|
+
yield `${names_1.names.asFunctionalDirective}(`;
|
|
60
60
|
yield* generateIdentifier(options, ctx, prop);
|
|
61
|
-
yield `, {} as import('${options.vueCompilerOptions.lib}').ObjectDirective)(null!, {
|
|
61
|
+
yield `, {} as import('${options.vueCompilerOptions.lib}').ObjectDirective)(null!, { ...${names_1.names.directiveBindingRestFields}, `;
|
|
62
62
|
yield* generateArg(options, ctx, prop);
|
|
63
63
|
yield* generateModifiers(options, ctx, prop);
|
|
64
64
|
yield* generateValue(options, ctx, prop);
|
|
@@ -71,7 +71,7 @@ function* generateIdentifier(options, ctx, prop) {
|
|
|
71
71
|
const rawName = 'v-' + prop.name;
|
|
72
72
|
const startOffset = prop.loc.start.offset;
|
|
73
73
|
const token = yield* (0, boundary_1.startBoundary)('template', startOffset, codeFeatures_1.codeFeatures.verification);
|
|
74
|
-
yield names.directives;
|
|
74
|
+
yield names_1.names.directives;
|
|
75
75
|
yield `.`;
|
|
76
76
|
yield* (0, camelized_1.generateCamelized)(rawName, 'template', prop.loc.start.offset, {
|
|
77
77
|
...codeFeatures_1.codeFeatures.withoutHighlightAndCompletion,
|
|
@@ -41,6 +41,7 @@ exports.isCompoundExpression = isCompoundExpression;
|
|
|
41
41
|
const CompilerDOM = __importStar(require("@vue/compiler-dom"));
|
|
42
42
|
const shared_1 = require("@vue/shared");
|
|
43
43
|
const codeFeatures_1 = require("../codeFeatures");
|
|
44
|
+
const names_1 = require("../names");
|
|
44
45
|
const utils_1 = require("../utils");
|
|
45
46
|
const boundary_1 = require("../utils/boundary");
|
|
46
47
|
const camelized_1 = require("../utils/camelized");
|
|
@@ -56,7 +57,7 @@ function* generateElementEvents(options, ctx, node, componentOriginalVar, getCtx
|
|
|
56
57
|
&& (!prop.arg || prop.arg.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION && prop.arg.isStatic))) {
|
|
57
58
|
if (!emitsVar) {
|
|
58
59
|
emitsVar = ctx.getInternalVariable();
|
|
59
|
-
yield `let ${emitsVar}!:
|
|
60
|
+
yield `let ${emitsVar}!: ${names_1.names.ResolveEmits}<typeof ${componentOriginalVar}, typeof ${getCtxVar()}.emit>${utils_1.endOfLine}`;
|
|
60
61
|
}
|
|
61
62
|
let source = prop.arg?.loc.source ?? 'model-value';
|
|
62
63
|
let start = prop.arg?.loc.start.offset;
|
|
@@ -75,7 +76,7 @@ function* generateElementEvents(options, ctx, node, componentOriginalVar, getCtx
|
|
|
75
76
|
const propName = (0, shared_1.camelize)(propPrefix + source);
|
|
76
77
|
const emitName = emitPrefix + source;
|
|
77
78
|
const camelizedEmitName = (0, shared_1.camelize)(emitName);
|
|
78
|
-
yield `const ${ctx.getInternalVariable()}:
|
|
79
|
+
yield `const ${ctx.getInternalVariable()}: ${names_1.names.NormalizeComponentEvent}<typeof ${getPropsVar()}, typeof ${emitsVar}, '${propName}', '${emitName}', '${camelizedEmitName}'> = (${utils_1.newLine}`;
|
|
79
80
|
if (prop.name === 'on') {
|
|
80
81
|
yield `{ `;
|
|
81
82
|
yield* generateEventArg(options, source, start, emitPrefix.slice(0, -1), codeFeatures_1.codeFeatures.navigation);
|
|
@@ -41,7 +41,7 @@ const picomatch_1 = require("picomatch");
|
|
|
41
41
|
const shared_2 = require("../../utils/shared");
|
|
42
42
|
const codeFeatures_1 = require("../codeFeatures");
|
|
43
43
|
const inlayHints_1 = require("../inlayHints");
|
|
44
|
-
const
|
|
44
|
+
const names_1 = require("../names");
|
|
45
45
|
const utils_1 = require("../utils");
|
|
46
46
|
const boundary_1 = require("../utils/boundary");
|
|
47
47
|
const camelized_1 = require("../utils/camelized");
|
|
@@ -109,7 +109,7 @@ function* generateElementProps(options, ctx, node, props, strictPropsCheck, fail
|
|
|
109
109
|
propName = propName.slice(1);
|
|
110
110
|
}
|
|
111
111
|
const shouldSpread = propName === 'style' || propName === 'class';
|
|
112
|
-
const shouldCamelize =
|
|
112
|
+
const shouldCamelize = getShouldCamelize(options, node, prop, propName);
|
|
113
113
|
const features = getPropsCodeFeatures(strictPropsCheck);
|
|
114
114
|
if (shouldSpread) {
|
|
115
115
|
yield `...{ `;
|
|
@@ -136,7 +136,7 @@ function* generateElementProps(options, ctx, node, props, strictPropsCheck, fail
|
|
|
136
136
|
if (isComponent && prop.name === 'model' && prop.modifiers.length) {
|
|
137
137
|
const propertyName = prop.arg?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION
|
|
138
138
|
? !prop.arg.isStatic
|
|
139
|
-
? `[
|
|
139
|
+
? `[${names_1.names.tryAsConstant}(\`\${${prop.arg.content}}Modifiers\`)]`
|
|
140
140
|
: (0, shared_1.camelize)(propName) + `Modifiers`
|
|
141
141
|
: `modelModifiers`;
|
|
142
142
|
yield* (0, elementDirectives_1.generateModifiers)(options, ctx, prop, propertyName);
|
|
@@ -148,7 +148,7 @@ function* generateElementProps(options, ctx, node, props, strictPropsCheck, fail
|
|
|
148
148
|
continue;
|
|
149
149
|
}
|
|
150
150
|
const shouldSpread = prop.name === 'style' || prop.name === 'class';
|
|
151
|
-
const shouldCamelize =
|
|
151
|
+
const shouldCamelize = getShouldCamelize(options, node, prop, prop.name);
|
|
152
152
|
const features = getPropsCodeFeatures(strictPropsCheck);
|
|
153
153
|
if (shouldSpread) {
|
|
154
154
|
yield `...{ `;
|
|
@@ -219,7 +219,7 @@ function* generatePropExp(options, ctx, prop, exp) {
|
|
|
219
219
|
}
|
|
220
220
|
else {
|
|
221
221
|
ctx.recordComponentAccess('template', propVariableName, exp.loc.start.offset);
|
|
222
|
-
yield names.ctx;
|
|
222
|
+
yield names_1.names.ctx;
|
|
223
223
|
yield `.`;
|
|
224
224
|
yield* codes;
|
|
225
225
|
}
|
|
@@ -234,10 +234,10 @@ function* generateAttrValue(node, features) {
|
|
|
234
234
|
yield* (0, unicode_1.generateUnicode)(content, offset, features);
|
|
235
235
|
yield quote;
|
|
236
236
|
}
|
|
237
|
-
function getShouldCamelize(options, prop, propName) {
|
|
238
|
-
return (
|
|
239
|
-
||
|
|
240
|
-
||
|
|
237
|
+
function getShouldCamelize(options, node, prop, propName) {
|
|
238
|
+
return (node.tagType === CompilerDOM.ElementTypes.COMPONENT
|
|
239
|
+
|| node.tagType === CompilerDOM.ElementTypes.SLOT) && (prop.type !== CompilerDOM.NodeTypes.DIRECTIVE
|
|
240
|
+
|| prop.arg?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION && prop.arg.isStatic)
|
|
241
241
|
&& (0, shared_2.hyphenateAttr)(propName) === propName
|
|
242
242
|
&& !options.vueCompilerOptions.htmlAttributes.some(pattern => (0, picomatch_1.isMatch)(propName, pattern));
|
|
243
243
|
}
|
|
@@ -1,41 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
3
|
exports.generateTemplate = generate;
|
|
37
4
|
const codeFeatures_1 = require("../codeFeatures");
|
|
38
|
-
const
|
|
5
|
+
const names_1 = require("../names");
|
|
39
6
|
const utils_1 = require("../utils");
|
|
40
7
|
const boundary_1 = require("../utils/boundary");
|
|
41
8
|
const context_1 = require("./context");
|
|
@@ -84,24 +51,24 @@ function* generateWorker(options, ctx) {
|
|
|
84
51
|
yield* generateTemplateRefsType(options, ctx);
|
|
85
52
|
yield* generateRootElType(ctx);
|
|
86
53
|
if (ctx.dollarVars.size) {
|
|
87
|
-
yield `var ${names.dollars}!: {${utils_1.newLine}`;
|
|
54
|
+
yield `var ${names_1.names.dollars}!: {${utils_1.newLine}`;
|
|
88
55
|
if (ctx.dollarVars.has('$slots')) {
|
|
89
|
-
const type = ctx.generatedTypes.has(names.Slots) ? names.Slots : `{}`;
|
|
56
|
+
const type = ctx.generatedTypes.has(names_1.names.Slots) ? names_1.names.Slots : `{}`;
|
|
90
57
|
yield `$slots: ${type}${utils_1.endOfLine}`;
|
|
91
58
|
}
|
|
92
59
|
if (ctx.dollarVars.has('$attrs')) {
|
|
93
60
|
yield `$attrs: import('${vueCompilerOptions.lib}').ComponentPublicInstance['$attrs']`;
|
|
94
|
-
if (ctx.generatedTypes.has(names.InheritedAttrs)) {
|
|
95
|
-
yield ` & ${names.InheritedAttrs}`;
|
|
61
|
+
if (ctx.generatedTypes.has(names_1.names.InheritedAttrs)) {
|
|
62
|
+
yield ` & ${names_1.names.InheritedAttrs}`;
|
|
96
63
|
}
|
|
97
64
|
yield utils_1.endOfLine;
|
|
98
65
|
}
|
|
99
66
|
if (ctx.dollarVars.has('$refs')) {
|
|
100
|
-
const type = ctx.generatedTypes.has(names.TemplateRefs) ? names.TemplateRefs : `{}`;
|
|
67
|
+
const type = ctx.generatedTypes.has(names_1.names.TemplateRefs) ? names_1.names.TemplateRefs : `{}`;
|
|
101
68
|
yield `$refs: ${type}${utils_1.endOfLine}`;
|
|
102
69
|
}
|
|
103
70
|
if (ctx.dollarVars.has('$el')) {
|
|
104
|
-
const type = ctx.generatedTypes.has(names.RootEl) ? names.RootEl : `any`;
|
|
71
|
+
const type = ctx.generatedTypes.has(names_1.names.RootEl) ? names_1.names.RootEl : `any`;
|
|
105
72
|
yield `$el: ${type}${utils_1.endOfLine}`;
|
|
106
73
|
}
|
|
107
74
|
yield `} & { [K in keyof import('${vueCompilerOptions.lib}').ComponentPublicInstance]: unknown }${utils_1.endOfLine}`;
|
|
@@ -110,14 +77,14 @@ function* generateWorker(options, ctx) {
|
|
|
110
77
|
}
|
|
111
78
|
function* generateSlotsType(options, ctx) {
|
|
112
79
|
if (options.hasDefineSlots) {
|
|
113
|
-
ctx.generatedTypes.add(names.Slots);
|
|
80
|
+
ctx.generatedTypes.add(names_1.names.Slots);
|
|
114
81
|
return;
|
|
115
82
|
}
|
|
116
83
|
if (!ctx.slots.length && !ctx.dynamicSlots.length) {
|
|
117
84
|
return;
|
|
118
85
|
}
|
|
119
|
-
ctx.generatedTypes.add(names.Slots);
|
|
120
|
-
yield `type ${names.Slots} = {}`;
|
|
86
|
+
ctx.generatedTypes.add(names_1.names.Slots);
|
|
87
|
+
yield `type ${names_1.names.Slots} = {}`;
|
|
121
88
|
for (const { expVar, propsVar } of ctx.dynamicSlots) {
|
|
122
89
|
yield `${utils_1.newLine}& { [K in NonNullable<typeof ${expVar}>]?: (props: typeof ${propsVar}) => any }`;
|
|
123
90
|
}
|
|
@@ -139,16 +106,16 @@ function* generateInheritedAttrsType(ctx) {
|
|
|
139
106
|
if (!ctx.inheritedAttrVars.size) {
|
|
140
107
|
return;
|
|
141
108
|
}
|
|
142
|
-
ctx.generatedTypes.add(names.InheritedAttrs);
|
|
143
|
-
yield `type ${names.InheritedAttrs} = Partial<${[...ctx.inheritedAttrVars].map(name => `typeof ${name}`).join(` & `)}>`;
|
|
109
|
+
ctx.generatedTypes.add(names_1.names.InheritedAttrs);
|
|
110
|
+
yield `type ${names_1.names.InheritedAttrs} = Partial<${[...ctx.inheritedAttrVars].map(name => `typeof ${name}`).join(` & `)}>`;
|
|
144
111
|
yield utils_1.endOfLine;
|
|
145
112
|
}
|
|
146
113
|
function* generateTemplateRefsType(options, ctx) {
|
|
147
114
|
if (!ctx.templateRefs.size) {
|
|
148
115
|
return;
|
|
149
116
|
}
|
|
150
|
-
ctx.generatedTypes.add(names.TemplateRefs);
|
|
151
|
-
yield `type ${names.TemplateRefs} = {}`;
|
|
117
|
+
ctx.generatedTypes.add(names_1.names.TemplateRefs);
|
|
118
|
+
yield `type ${names_1.names.TemplateRefs} = {}`;
|
|
152
119
|
for (const [name, refs] of ctx.templateRefs) {
|
|
153
120
|
yield `${utils_1.newLine}& `;
|
|
154
121
|
if (refs.length >= 2) {
|
|
@@ -173,8 +140,8 @@ function* generateRootElType(ctx) {
|
|
|
173
140
|
if (!ctx.singleRootElTypes.size || ctx.singleRootNodes.has(null)) {
|
|
174
141
|
return;
|
|
175
142
|
}
|
|
176
|
-
ctx.generatedTypes.add(names.RootEl);
|
|
177
|
-
yield `type ${names.RootEl} = `;
|
|
143
|
+
ctx.generatedTypes.add(names_1.names.RootEl);
|
|
144
|
+
yield `type ${names_1.names.RootEl} = `;
|
|
178
145
|
for (const type of ctx.singleRootElTypes) {
|
|
179
146
|
yield `${utils_1.newLine}| ${type}`;
|
|
180
147
|
}
|
|
@@ -1,44 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
3
|
exports.generateInterpolation = generateInterpolation;
|
|
37
4
|
const shared_1 = require("@vue/shared");
|
|
38
5
|
const collectBindings_1 = require("../../utils/collectBindings");
|
|
39
6
|
const shared_2 = require("../../utils/shared");
|
|
40
7
|
const codeFeatures_1 = require("../codeFeatures");
|
|
41
|
-
const
|
|
8
|
+
const names_1 = require("../names");
|
|
42
9
|
const utils_1 = require("../utils");
|
|
43
10
|
// https://github.com/vuejs/core/blob/fb0c3ca519f1fccf52049cd6b8db3a67a669afe9/packages/compiler-core/src/transforms/transformExpression.ts#L47
|
|
44
11
|
const isLiteralWhitelisted = /*@__PURE__*/ (0, shared_1.makeMap)('true,false,null,this');
|
|
@@ -95,11 +62,11 @@ function* forEachInterpolationSegment(ts, setupRefs, ctx, block, originalCode, s
|
|
|
95
62
|
else {
|
|
96
63
|
yield ['', offset, 'errorMappingOnly']; // #1205, #1264
|
|
97
64
|
if (ctx.dollarVars.has(name)) {
|
|
98
|
-
yield names.dollars;
|
|
65
|
+
yield names_1.names.dollars;
|
|
99
66
|
}
|
|
100
67
|
else {
|
|
101
68
|
ctx.recordComponentAccess(block.name, name, start - prefix.length + offset);
|
|
102
|
-
yield names.ctx;
|
|
69
|
+
yield names_1.names.ctx;
|
|
103
70
|
}
|
|
104
71
|
yield `.`;
|
|
105
72
|
yield [name, offset, isShorthand ? 'shorthand' : undefined];
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.generateObjectProperty = generateObjectProperty;
|
|
4
4
|
const shared_1 = require("@vue/shared");
|
|
5
|
+
const names_1 = require("../names");
|
|
5
6
|
const utils_1 = require("../utils");
|
|
6
7
|
const boundary_1 = require("../utils/boundary");
|
|
7
8
|
const camelized_1 = require("../utils/camelized");
|
|
@@ -10,7 +11,7 @@ const interpolation_1 = require("./interpolation");
|
|
|
10
11
|
function* generateObjectProperty(options, ctx, code, offset, features, shouldCamelize = false, shouldBeConstant = false) {
|
|
11
12
|
if (code.startsWith('[') && code.endsWith(']')) {
|
|
12
13
|
if (shouldBeConstant) {
|
|
13
|
-
yield* (0, interpolation_1.generateInterpolation)(options, ctx, options.template, features, code.slice(1, -1), offset + 1, `[
|
|
14
|
+
yield* (0, interpolation_1.generateInterpolation)(options, ctx, options.template, features, code.slice(1, -1), offset + 1, `[${names_1.names.tryAsConstant}(`, `)]`);
|
|
14
15
|
}
|
|
15
16
|
else {
|
|
16
17
|
yield* (0, interpolation_1.generateInterpolation)(options, ctx, options.template, features, code, offset);
|
|
@@ -38,7 +38,7 @@ const CompilerDOM = __importStar(require("@vue/compiler-dom"));
|
|
|
38
38
|
const shared_1 = require("../../utils/shared");
|
|
39
39
|
const codeFeatures_1 = require("../codeFeatures");
|
|
40
40
|
const inlayHints_1 = require("../inlayHints");
|
|
41
|
-
const
|
|
41
|
+
const names_1 = require("../names");
|
|
42
42
|
const utils_1 = require("../utils");
|
|
43
43
|
const boundary_1 = require("../utils/boundary");
|
|
44
44
|
const elementProps_1 = require("./elementProps");
|
|
@@ -59,7 +59,7 @@ function* generateSlotOutlet(options, ctx, node) {
|
|
|
59
59
|
}
|
|
60
60
|
});
|
|
61
61
|
if (options.hasDefineSlots) {
|
|
62
|
-
yield
|
|
62
|
+
yield `${names_1.names.asFunctionalSlot}(`;
|
|
63
63
|
if (nameProp) {
|
|
64
64
|
let codes;
|
|
65
65
|
if (nameProp.type === CompilerDOM.NodeTypes.ATTRIBUTE && nameProp.value) {
|
|
@@ -78,13 +78,13 @@ function* generateSlotOutlet(options, ctx, node) {
|
|
|
78
78
|
codes = [`['default']`];
|
|
79
79
|
}
|
|
80
80
|
const token = yield* (0, boundary_1.startBoundary)('template', nameProp.loc.start.offset, codeFeatures_1.codeFeatures.verification);
|
|
81
|
-
yield options.slotsAssignName ?? names.slots;
|
|
81
|
+
yield options.slotsAssignName ?? names_1.names.slots;
|
|
82
82
|
yield* codes;
|
|
83
83
|
yield (0, boundary_1.endBoundary)(token, nameProp.loc.end.offset);
|
|
84
84
|
}
|
|
85
85
|
else {
|
|
86
86
|
const token = yield* (0, boundary_1.startBoundary)('template', startTagOffset, codeFeatures_1.codeFeatures.verification);
|
|
87
|
-
yield `${options.slotsAssignName ?? names.slots}[`;
|
|
87
|
+
yield `${options.slotsAssignName ?? names_1.names.slots}[`;
|
|
88
88
|
const token2 = yield* (0, boundary_1.startBoundary)('template', startTagOffset, codeFeatures_1.codeFeatures.verification);
|
|
89
89
|
yield `'default'`;
|
|
90
90
|
yield (0, boundary_1.endBoundary)(token2, startTagEndOffset);
|
|
@@ -120,7 +120,7 @@ function* generateSlotOutlet(options, ctx, node) {
|
|
|
120
120
|
ctx.inlayHints.push((0, inlayHints_1.createVBindShorthandInlayHintInfo)(nameProp.exp.loc, 'name'));
|
|
121
121
|
}
|
|
122
122
|
const expVar = ctx.getInternalVariable();
|
|
123
|
-
yield `var ${expVar} =
|
|
123
|
+
yield `var ${expVar} = ${names_1.names.tryAsConstant}(`;
|
|
124
124
|
yield* (0, interpolation_1.generateInterpolation)(options, ctx, options.template, isShortHand
|
|
125
125
|
? codeFeatures_1.codeFeatures.withoutHighlightAndCompletion
|
|
126
126
|
: codeFeatures_1.codeFeatures.all, nameProp.exp.content, nameProp.exp.loc.start.offset);
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.references = void 0;
|
|
4
4
|
exports.generateStyleScopedClassReference = generateStyleScopedClassReference;
|
|
5
5
|
const codeFeatures_1 = require("../codeFeatures");
|
|
6
|
+
const names_1 = require("../names");
|
|
6
7
|
const utils_1 = require("../utils");
|
|
7
8
|
const boundary_1 = require("../utils/boundary");
|
|
8
9
|
const escaped_1 = require("../utils/escaped");
|
|
@@ -11,7 +12,7 @@ const classNameEscapeRegex = /([\\'])/;
|
|
|
11
12
|
exports.references = new WeakMap();
|
|
12
13
|
function* generateStyleScopedClassReference(block, className, offset, fullStart = offset) {
|
|
13
14
|
if (!className) {
|
|
14
|
-
yield `/** @type {
|
|
15
|
+
yield `/** @type {${names_1.names.StyleScopedClasses}['`;
|
|
15
16
|
yield ['', 'template', offset, codeFeatures_1.codeFeatures.completion];
|
|
16
17
|
yield `']} */${utils_1.endOfLine}`;
|
|
17
18
|
return;
|
|
@@ -25,7 +26,7 @@ function* generateStyleScopedClassReference(block, className, offset, fullStart
|
|
|
25
26
|
else {
|
|
26
27
|
cache[1].push([className, offset]);
|
|
27
28
|
}
|
|
28
|
-
yield `/** @type {
|
|
29
|
+
yield `/** @type {${names_1.names.StyleScopedClasses}[`;
|
|
29
30
|
const token = yield* (0, boundary_1.startBoundary)(block.name, fullStart, codeFeatures_1.codeFeatures.navigation);
|
|
30
31
|
yield `'`;
|
|
31
32
|
yield* (0, escaped_1.generateEscaped)(className, block.name, offset, codeFeatures_1.codeFeatures.navigationAndCompletion, classNameEscapeRegex);
|
|
@@ -2,5 +2,5 @@ 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 generateTemplateChild(options: TemplateCodegenOptions, ctx: TemplateCodegenContext, node: CompilerDOM.RootNode | CompilerDOM.TemplateChildNode | CompilerDOM.SimpleExpressionNode, enterNode?: boolean): Generator<Code>;
|
|
5
|
+
export declare function generateTemplateChild(options: TemplateCodegenOptions, ctx: TemplateCodegenContext, node: CompilerDOM.RootNode | CompilerDOM.TemplateChildNode | CompilerDOM.SimpleExpressionNode, enterNode?: boolean, isVForChild?: boolean): Generator<Code>;
|
|
6
6
|
export declare function parseInterpolationNode(node: CompilerDOM.InterpolationNode, template: string): readonly [string, number];
|
|
@@ -45,14 +45,10 @@ const slotOutlet_1 = require("./slotOutlet");
|
|
|
45
45
|
const vFor_1 = require("./vFor");
|
|
46
46
|
const vIf_1 = require("./vIf");
|
|
47
47
|
const vSlot_1 = require("./vSlot");
|
|
48
|
-
function* generateTemplateChild(options, ctx, node, enterNode = true) {
|
|
48
|
+
function* generateTemplateChild(options, ctx, node, enterNode = true, isVForChild = false) {
|
|
49
49
|
if (enterNode && !ctx.enter(node)) {
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
|
-
const cur = node;
|
|
53
|
-
if (cur.codegenNode?.type === CompilerDOM.NodeTypes.JS_CACHE_EXPRESSION) {
|
|
54
|
-
cur.codegenNode = cur.codegenNode.value;
|
|
55
|
-
}
|
|
56
52
|
if (node.type === CompilerDOM.NodeTypes.ROOT) {
|
|
57
53
|
for (const item of collectSingleRootNodes(options, node.children)) {
|
|
58
54
|
ctx.singleRootNodes.add(item);
|
|
@@ -62,27 +58,25 @@ function* generateTemplateChild(options, ctx, node, enterNode = true) {
|
|
|
62
58
|
}
|
|
63
59
|
}
|
|
64
60
|
else if (node.type === CompilerDOM.NodeTypes.ELEMENT) {
|
|
65
|
-
let slotDir;
|
|
66
61
|
if (node.tagType === CompilerDOM.ElementTypes.SLOT) {
|
|
67
62
|
yield* (0, slotOutlet_1.generateSlotOutlet)(options, ctx, node);
|
|
68
63
|
}
|
|
69
|
-
else if (node.tagType === CompilerDOM.ElementTypes.TEMPLATE
|
|
70
|
-
&& ctx.components.length
|
|
71
|
-
&& (slotDir = node.props.find(p => p.type === CompilerDOM.NodeTypes.DIRECTIVE && p.name === 'slot'))) {
|
|
72
|
-
yield* (0, vSlot_1.generateVSlot)(options, ctx, node, slotDir, ctx.components[ctx.components.length - 1]());
|
|
73
|
-
}
|
|
74
|
-
else if (node.tagType === CompilerDOM.ElementTypes.ELEMENT
|
|
75
|
-
|| node.tagType === CompilerDOM.ElementTypes.TEMPLATE) {
|
|
76
|
-
yield* (0, element_1.generateElement)(options, ctx, node);
|
|
77
|
-
}
|
|
78
64
|
else {
|
|
79
|
-
|
|
65
|
+
const slotDir = node.props.find(CompilerDOM.isVSlot);
|
|
66
|
+
if (node.tagType === CompilerDOM.ElementTypes.TEMPLATE && ctx.components.length && slotDir) {
|
|
67
|
+
yield* (0, vSlot_1.generateVSlot)(options, ctx, node, slotDir, ctx.components.at(-1)());
|
|
68
|
+
}
|
|
69
|
+
else if (node.tagType === CompilerDOM.ElementTypes.TEMPLATE && isVForChild) {
|
|
70
|
+
yield* (0, element_1.generateFragment)(options, ctx, node);
|
|
71
|
+
}
|
|
72
|
+
else if (node.tagType === CompilerDOM.ElementTypes.COMPONENT) {
|
|
73
|
+
yield* (0, element_1.generateComponent)(options, ctx, node);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
yield* (0, element_1.generateElement)(options, ctx, node);
|
|
77
|
+
}
|
|
80
78
|
}
|
|
81
79
|
}
|
|
82
|
-
else if (node.type === CompilerDOM.NodeTypes.TEXT_CALL) {
|
|
83
|
-
// {{ var }}
|
|
84
|
-
yield* generateTemplateChild(options, ctx, node.content, false);
|
|
85
|
-
}
|
|
86
80
|
else if (node.type === CompilerDOM.NodeTypes.COMPOUND_EXPRESSION) {
|
|
87
81
|
// {{ ... }} {{ ... }}
|
|
88
82
|
for (const child of node.children) {
|
|
@@ -105,9 +99,6 @@ function* generateTemplateChild(options, ctx, node, enterNode = true) {
|
|
|
105
99
|
// v-for
|
|
106
100
|
yield* (0, vFor_1.generateVFor)(options, ctx, node);
|
|
107
101
|
}
|
|
108
|
-
else if (node.type === CompilerDOM.NodeTypes.TEXT) {
|
|
109
|
-
// not needed progress
|
|
110
|
-
}
|
|
111
102
|
if (enterNode) {
|
|
112
103
|
yield* ctx.exit();
|
|
113
104
|
}
|