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

Missing documentation on removeError and removeErrors

Aperta
#170 1 commento 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

While going through the [READM on ember-changeset](https://github.com/poteto/ember-changeset) we noticed following lines:

```js
try {
await this.changeset.validate((changes) => FormSchema.validate(changes));
this.changeset.removeError(path); // << what is this method?
} catch (e) {
this.changeset.addError(e.path, { value: this.changeset.get(e.path), validation: e.message });
}
```

We tried to look for said function in [ember-changeset repo](https://github.com/poteto/ember-changeset/search?q=removeError), but apart from README and test, there were no results. Then we found out that said method is actually [defined on validated-changeset](https://github.com/validated-changeset/validated-changeset/blob/main/src/validated.ts#L432-L448).

But even the README of validated-changeset does not mention this method. By looking at the other methods of the `validated.ts` file, it seems like [validated-changeset README](https://github.com/validated-changeset/validated-changeset) is missing the documentation on `removeError` and `removeErrors`?

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Open src/validated.ts at lines 432-448 and the validated-changeset README; compare the existing method documentation with removeError and removeErrors. Document both methods in the README, using their definitions to describe the behavior, and verify that the examples or API descriptions are consistent.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
typescript
Ambito
documentation
Tipo di issue
Documentazione
Difficoltà
1/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.