egoist/tinyargs

Better TypeScript support

Open

#2 建立於 2021年12月13日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)TypeScript (2 fork)user submission
help wanted

倉庫指標

Star
 (76 star)
PR 合併指標
 (30 天內沒有已合併 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 }

貢獻者指南