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

Type of PublicErrors.validation seems wrong

Open
#187 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
38
Forks
27
PR merge metrics
No merged PRs in 30d

Description

[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`!?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.