@omnia/tooling-vue 8.0.244-dev → 8.0.246-dev
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.
|
@@ -234,7 +234,10 @@ function extractTypes(types, componentInfo) {
|
|
|
234
234
|
}
|
|
235
235
|
else if (typeName === "DefineEmit" || typeName === "DefineSlot") {
|
|
236
236
|
const params = t.typeParams.params;
|
|
237
|
-
|
|
237
|
+
let name = extractTypeValue(params[0]);
|
|
238
|
+
if (!name) {
|
|
239
|
+
name = extractTypeValue(params[0], true);
|
|
240
|
+
}
|
|
238
241
|
const type = extractTypeValue(params[1]);
|
|
239
242
|
const info = typeName === "DefineEmit" ? componentInfo.emits : componentInfo.slots;
|
|
240
243
|
if (params.length > 2) {
|
|
@@ -300,6 +303,9 @@ function extractTypeValue(tsType, rawValue = false) {
|
|
|
300
303
|
if (rawValue && tsType.literal.type === "StringLiteral") {
|
|
301
304
|
result = tsType.literal.raw;
|
|
302
305
|
}
|
|
306
|
+
else if (rawValue && tsType.literal.type === "TemplateLiteral") {
|
|
307
|
+
result = tsType.literal.quasis.map(q => q.raw).join();
|
|
308
|
+
}
|
|
303
309
|
else {
|
|
304
310
|
result = tsType.literal.value;
|
|
305
311
|
}
|