function getIdentifier(node) {
  if (!node.name || !(tsc.isIdentifier(node.name) || tsc.isStringLiteral(node.name))) {
    throw new Error('no Identifier found');
  }

  return node.name.text;
}
Helper function that retrieves the text identifier of a named node in the tsc AST.
@param {import('typescript').NamedDeclaration} node
@return {string}