egoist/tinyargs

Better TypeScript support

Open

#2 ouverte le 13 déc. 2021

Voir sur GitHub
 (0 commentaires) (0 réactions) (0 assignés)TypeScript (2 forks)user submission
help wanted

Métriques du dépôt

Stars
 (76 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

Currently the return object is typed as Record<string, any>, ideally it should infer types based on options:

parse([], [{ name:'foo', type: Boolean }, { name: 'bar', type: String, optionalValue: true }])

//=> { foo?: boolean, bar?: string | true }

Guide contributeur