adopted-ember-addons / adopted-ember-addons/validated-changeset

Type of PublicErrors.validation seems wrong

Aperta
#187 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug
Lingua principale
TypeScript
Stelle
38
Fork
27
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

[Here](https://github.com/validated-changeset/validated-changeset/blob/c1c95b729aae80fd30b30b691202a94c974a3309/src/types/index.ts#L89) it is typed as `ValidationErr | ValidationErr[]`, but `ValidationErr` itself is also typed as potentially being an array [here](https://github.com/validated-changeset/validated-changeset/blob/c1c95b729aae80fd30b30b691202a94c974a3309/src/types/index.ts#L18), so narrowed down it seems the type would be `string | string[] | string[][]`, and the last parts seems wrong, not?

I think it should be typed just as `validation: ValidationErr`!?

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.