Cleanup TaggedTemplateExpression print (#18032)
This commit is contained in:
1 parent
b85bff8d1f
commit
b80e9fa795
2 files changed
+5
-5
No files matched your search
@@ -68,7 +68,7 @@ import { printObject } from "./object.js";
|
||||
import { printProperty } from "./property.js";
|
||||
import { printStatementSequence } from "./statement.js";
|
||||
import {
|
||||
printTaggedTemplateLiteral,
|
||||
printTaggedTemplateExpression,
|
||||
printTemplateLiteral,
|
||||
} from "./template-literal.js";
|
||||
import { printTernary } from "./ternary.js";
|
||||
@@ -631,7 +631,7 @@ function printEstree(path, options, print, args) {
|
||||
case "TemplateLiteral":
|
||||
return printTemplateLiteral(path, options, print);
|
||||
case "TaggedTemplateExpression":
|
||||
return printTaggedTemplateLiteral(path, options, print);
|
||||
return printTaggedTemplateExpression(path, options, print);
|
||||
case "PrivateIdentifier":
|
||||
return ["#", node.name];
|
||||
case "PrivateName":
|
||||
|
||||
@@ -128,7 +128,7 @@ function printTemplateLiteral(path, options, print) {
|
||||
return parts;
|
||||
}
|
||||
|
||||
function printTaggedTemplateLiteral(path, options, print) {
|
||||
function printTaggedTemplateExpression(path, options, print) {
|
||||
const quasiDoc = print("quasi");
|
||||
const { node } = path;
|
||||
|
||||
@@ -142,7 +142,7 @@ function printTaggedTemplateLiteral(path, options, print) {
|
||||
if (
|
||||
hasNewlineInRange(
|
||||
options.originalText,
|
||||
locEnd(node.typeArguments ?? node.typeParameters ?? node.tag),
|
||||
locEnd(node.typeArguments ?? node.tag),
|
||||
locStart(quasiLeadingComment),
|
||||
)
|
||||
) {
|
||||
@@ -311,7 +311,7 @@ function isJestEachTemplateLiteral({ node, parent }) {
|
||||
|
||||
export {
|
||||
escapeTemplateCharacters,
|
||||
printTaggedTemplateLiteral,
|
||||
printTaggedTemplateExpression,
|
||||
printTemplateExpressions,
|
||||
printTemplateLiteral,
|
||||
uncookTemplateElementValue,
|
||||
|
||||
Reference in new issue
Block a user