Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for TypeScript #15

Merged
merged 1 commit into from
Dec 10, 2018
Merged

Conversation

blakeembrey
Copy link
Contributor

I love the simplicity of this project and want to start adopting it across the projects I maintain (replacing minimist). Providing a TypeScript definition will make adoption a lot easier by adding type safety in any strictly typed projects. Additionally, anyone using VS Code (and other editors with .d.ts support) with JavaScript will appreciate the automatic type output. It works by mapping over the "spec" type and producing the types according to the function return type (e.g. String is (x: string) => string and it'll pick out string from the return type).

@Qix-
Copy link
Contributor

Qix- commented Dec 9, 2018

Thank you for the nice words, Blake :)

I am not really familiar with Typescript, but I am all for this.

Maybe @timneutkens, @leo or @javivelasco can comment on the validity (though I'd go out on a limb to say you probably know what you're talking about 😉).

Copy link
Member

@timneutkens timneutkens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What an incredible type definition, I haven't used Typescript that much, but the definition seems to be fine, so ✅

@javivelasco
Copy link
Member

Sounds great and I need it now!

@rauchg rauchg merged commit 8bad2e3 into vercel:master Dec 10, 2018
nevilm-lt pushed a commit to nevilm-lt/arg that referenced this pull request Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants