-
Notifications
You must be signed in to change notification settings - Fork 662
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 ambient TypeScript definitions #329
Conversation
Codecov Report
@@ Coverage Diff @@
## master #329 +/- ##
=======================================
Coverage 88.97% 88.97%
=======================================
Files 44 44
Lines 1234 1234
Branches 183 183
=======================================
Hits 1098 1098
Misses 136 136 Continue to review full report at Codecov.
|
+1 Please could we have this merged!!! |
@bmajz While we wait for the slackers to review this. It would be beneficial to the community if you submit this to DefinitelyTyped and/or roll out a Although, there are some issues with this typescript definition files. For e.g. required params following optional params, some typings are wrong for example |
hey @ashubham, I think it would be incumbent to then maintain those definitions and it seems like a pain to do that in two places for what should hopefully be a quick review. I also need to do an update to these defs, hopefully later this week to clean them up some more |
sorry, we've had some offline discussions about this PR and i could have been more transparent about where we are with this. here's my recap. opinions and discussion welcome. after talking to @bmajz, he asked that i hold off merging this PR because he'd like to improve it. he has some changes in mind, but i'll let him fill us in here if he can. i also commented that im not sure going down this path is the right thing to do for our typescript community. there's no way we (as maintainers) can be certain that the definitions aren't broken because they are never tested against the actual library. we need something to gate us from making a change that breaks the interface definition because, in my opinon, wrong defs would be worse than no defs at all ( |
Yes, I do need to push updates since there were some broken scenarios in there. Unfortunately, the team has been short handed recently and we haven't been able to circle back quickly. My sincere apologies. However, I do agree with @aoberoi in that bad TS defn's can be worse than none at all. Ideally there isn't an extra translation step and the code matches the types. As a third party writing type definitions, I almost think it would've been less work to convert the code natively. I would enthusiastically support the conversion given the rest of the great work Slack is doing there: |
I'm with you both on this. Massive and emphatic support for converting directly to https://slack.engineering/typescript-at-slack-a81307fa288d TypeScript really shines for SDK's and third party libraries, so given the internal move Slack is making toward TypeScript, having the outward facing SDK with Typescript generated Viva la Slack. |
Not sure why this caused a test to fail, should pass on retry by the looks of it |
The next major version of this module will be authored in TypeScript. Until that version is out, I'm going to leave this PR open and actively point people to it when they ask for TypeScript definitions. I feel like this is the best approach in the short term because it should signal to consumers that these are not maintained in a testable way, and if you choose to pull down the definitions, you're taking responsibility for them in your own app. |
This sounds smart. Super glad to hear your re-authoring in typescript itself. Solid! 💪 |
How does everyone feel about pushing the types into DefinitelyTyped/@types in the meantime? |
@bmajz I think it is not possible yet, because @types still can not support types for scoped packages (and the slack client module is scoped under @slack). See: microsoft/types-publisher#155 |
Has anyone actually used this typings ? I'm having some trouble to use them. Not sure if is the problem with the scoped modules. |
I managed to get the typings working. I had to include the ws references and import them inside.
BTW. I think that the scope packages issue is resolved. If I understood correctly this package need to be named |
I'll pull this change into my branch since I think that's where people will get it in the future. Will also look into what it takes to get this into DefinitelyTyped |
It would be awesome to have it DefinitelyTyped! Typings are working perfectly |
Any progress on this ? I had made some improvements to the typings provided in the thread but it's complicated to contribute if we don't have them in the @types repo. |
@bmajz what do you think about contributing these typings to the to be clear, we still plan to author in TypeScript in a future major version. i see publishing to |
I'll look into it ASAP
…Sent from my phone
On Oct 3, 2017, at 3:52 PM, Ankur Oberoi ***@***.***> wrote:
@bmajz what do you think about contributing these typings to the @types npm organization? the guide to doing this is here: http://definitelytyped.org/guides/contributing.html. it seems like the scoped packages issue has been resolved, and this would have to be published as @types/slack__client.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Awesome! We have a few enhancements to the previously posted typing that we want to contribute back.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not merging for reasons in conversation
@bmajz how it goes? Did you add these types in DefinitelyTyped? Could I help you with it? |
There is already the start of a type definition for this SDK ( DefinitelyTyped/DefinitelyTyped#12195 ) in definitely typed, it'd need updating to use the new |
hey everyone! take a look at v4.0.0, which is written using TypeScript! i hope you like it. i'll close this issue now, but if you're looking for type definitions for v3.x, this is still the right place to find them. |
🎉 |
PR Summary
Related Issues
Test strategy