egoist/tinyargs

Better TypeScript support

Aberta

#2 aberto em 13 de dez. de 2021

 (0 comentário) (0 reação) (0 responsável)TypeScript (2 forks)user submission
help wanted

Métricas do repositório

Stars
 (76 estrelas)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

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 }

Guia do colaborador