| 1 | /** |
| 2 | * @template T |
| 3 | * @param {string} nombre |
| 4 | * @param {T | undefined} entidad |
| 5 | */ |
| 6 | export function validaEntidadObligatoria(nombre, entidad) { |
| 7 | |
| 8 | if (entidad === undefined) |
| 9 | throw new Error(`Registro de ${nombre} no encontrado.`) |
| 10 | |
| 11 | return entidad |
| 12 | } |
| 13 |