egoist/tinyargs

Better TypeScript support

Open

#2 opened on 2021年12月13日

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

説明

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 }

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