-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Update amqplib definitions to v0.5.0 #12427
Conversation
Travis fails with an error unrelated to this PR: For file:/home/travis/build/DefinitelyTyped/DefinitelyTyped/chocolatechipjs/tsconfig.json
\home\travis\build\DefinitelyTyped\DefinitelyTyped\chocolatechipjs\index.d.ts
Line 1363: All declarations of 'responseURL' must have identical modifiers. |
It is out problem. types-2.0/HEAD is back to green. |
import * as Promise from 'bluebird'; | ||
import * as events from 'events'; | ||
import shared = require('amqplib/properties'); | ||
import callback_api = require('amqplib/callback_api'); |
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.
Think this callback_api import is unused?
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.
Completely right. Removed.
import shared = require('amqplib/properties'); | ||
import callback_api = require('amqplib/callback_api'); | ||
|
||
export import Replies = shared.Replies; |
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.
A simplier syntax might be to do
export {
Replies,
Options,
Message
} from 'amqplib/properties';
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.
Those are inlined export import
s. Your suggestion wouldn't do the same thing, am I right?
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.
My mistake, I thought that exporting in the fashion I suggested also imported them into the local scope
Assuming passes CI after rebase / merge with upstream then 👍 |
@mnahkies Ok, it may be a little too late now - but I just realized that for some awkward reason, When updating to [ts] Argument of type 'Bluebird<void>' is not assignable to parameter of type 'Promise<void>'. Thoughts? |
Please fill in this template.
types-2.0
branch.If adding a new definition:
tsc
without errors.If changing an existing definition: