ajv-validator / ajv-validator/ajv

validate typescript signature incorrect?

Aperta
#1,557 7 commenti 0 reazioni 0 assegnatari Vedi su GitHub
thinking typescript
Lingua principale
TypeScript
Stelle
14.8k
Fork
1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

If you pass
```
const data: unknown = 'some data from unknown source';
validate("stringSchema", unknownData);
```

you will always match the first overload, and the first overload is missing the async case.

![image](https://user-images.githubusercontent.com/1499050/115541907-f642ba00-a29f-11eb-8b94-ff4ad04670b6.png)

**Are you going to resolve the issue?**
I can, if someone confirms that it's a valid issue.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.