egoist/tinyargs

Better TypeScript support

开放

#2 创建于 2021年12月13日

 (0 条评论) (0 个反应) (0 位负责人)TypeScript (2 个派生)user submission
help wanted

仓库指标

星标
 (76 个星标)
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 }

贡献者指南