export default function emptyThrows<T>(x: T[], message: string): T[] {
  if (x.length === 0) {
    throw new Error(message);
  }
  return x;
}
