Skip to content

Add TypeScript definition#4

Open
qm3ster wants to merge 2 commits intolimulus:masterfrom
qm3ster:master
Open

Add TypeScript definition#4
qm3ster wants to merge 2 commits intolimulus:masterfrom
qm3ster:master

Conversation

@qm3ster
Copy link
Copy Markdown

@qm3ster qm3ster commented Aug 28, 2018

No description provided.

@limulus
Copy link
Copy Markdown
Owner

limulus commented Aug 28, 2018

I kid you not, I was thinking I should look into doing this last night!

I’ll take a look at this later today.

@qm3ster
Copy link
Copy Markdown
Author

qm3ster commented Aug 28, 2018

It's a PR, not a feature request.
Not saying it so that you pull it faster, just so you don't end up doing the same work.
It took quite a few iterations with different arrangements of generics until it typed everything and never inferred Callback<{}>
For example, overloading the function totally didn't want to work.
Neither did making the return type a parameter, like <T, P extends Promise<T>>

@limulus
Copy link
Copy Markdown
Owner

limulus commented Aug 29, 2018

Thanks, @qm3ster! I’m new to TypeScript, so I’m glad you did this instead of me as my first experience with TS!

I’m starting to understand how this works. After I play around with it some I expect I will pull and publish this relatively soon.

@limulus limulus self-assigned this Aug 29, 2018
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.

2 participants