egoist/tinyargs

Better TypeScript support

Open

#2 创建于 2021年12月13日

在 GitHub 查看
 (0 评论) (0 反应) (0 负责人)TypeScript (76 star) (2 fork)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 }

贡献者指南