egoist/tinyargs

Better TypeScript support

Open

#2 opened on 2021年12月13日

GitHub で見る
 (0 comments) (0 reactions) (0 assignees)TypeScript (2 forks)user submission
help wanted

Repository metrics

Stars
 (76 stars)
PR merge metrics
 (30d に merged PR はありません)

説明

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 }

コントリビューターガイド