egoist/tinyargs

Better TypeScript support

Open

#2 opened on Dec 13, 2021

View on GitHub
 (0 comments) (0 reactions) (0 assignees)TypeScript (76 stars) (2 forks)user submission
help wanted

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 }

Contributor guide

Better TypeScript support · egoist/tinyargs#2 | Good First Issue