forked from Thuzi/facebook-node-sdk
-
Notifications
You must be signed in to change notification settings - Fork 116
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
Added basic Typescript definitions. #46
Closed
+132
−2
Closed
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
29ac795
Added basic Typescript definitions.
andrewstart fbdb904
Merge branch 'master' into typings
andrewstart 0236577
Updated to reflect changed API and what is actually exported from the…
andrewstart fd072b8
Use dependency's Promise TS definition.
andrewstart 7487b51
Merge remote-tracking branch 'node-facebook/master' into typings
andrewstart fe11fc4
Added missing methods, some option definitions.
andrewstart caff308
Added test for typescript definition.
andrewstart 68c9eca
Merge branch 'master' into typings
andrewstart ba5e440
Fix comma that got dropped during merge.
andrewstart 8ffe919
Clean up typings test
andrewstart File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Use dependency's Promise TS definition.
commit fd072b87dd6b2f238b53e4b5da82dab0e26fb52d
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
You can remove this line.
Promise
can be used directly without importing it as it is part of ES6.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.
While that is true, that doesn't mean that everyone is using an ES6 environment, and additionally this library uses
any-promise
as the Promise implementation.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.
That's how i have seen it used in most well written typings I have used. If you are not targeting ES6, it is up to the consumer to provide the typings for
Promise
. Example from a fairy recent declaration https://github.com/facebook/dataloader/blob/master/src/index.d.tsThere 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.
Additionally, 2.0 of this library supports only NodeJS environments that support
Promise
natively ;)