src/codegeneration/TemplateLiteralTransformer.js
function maybeAddEmptyStringAtEnd(elements, items) {
  let length = elements.length;
  if (!length || elements[length - 1].type !== TEMPLATE_LITERAL_PORTION) {
    items.push(createStringLiteralExpression(null, '""'));
  }
}
function maybeAddEmptyStringAtEnd(elements, items) {
  let length = elements.length;
  if (!length || elements[length - 1].type !== TEMPLATE_LITERAL_PORTION) {
    items.push(createStringLiteralExpression(null, '""'));
  }
}
function maybeAddEmptyStringAtEnd ( elements , items ) { let length = elements . length ; if ( ! length || elements [ length - 1 ] . type !== TEMPLATE_LITERAL_PORTION ) { items . push ( createStringLiteralExpression ( null , '""' ) ) ; } }
Adds an empty string at the end if needed. This is needed in case the
template literal does not end with a literal portion.
@param {Array<ParseTree>} elements
@param {Array<ParseTree>} items This is the array that gets mutated.
Adds an empty string at the end if needed . This is needed in case the template literal does not end with a literal portion .