src/main/range-util.js/isJsSourceElement
function isJsSourceElement(type) {
  return (
    type === "Directive" ||
    type === "TypeAlias" ||
    type === "TSExportAssignment" ||
    type.startsWith("Declare") ||
    type.startsWith("TSDeclare") ||
    type.endsWith("Statement") ||
    type.endsWith("Declaration")
  );
}