Skip to content

node: improve util.promisify - #21253

Merged
1 commit merged into
DefinitelyTyped:masterfrom
teppeis:improve-node-promisify
Nov 6, 2017
Merged

1 commit merged into
DefinitelyTyped:masterfrom
teppeis:improve-node-promisify

Conversation

@teppeis

@teppeis teppeis commented Nov 5, 2017

Copy link
Copy Markdown
Contributor
  • Add 2 overloads (with no args).
  • Relax the error type from NodeJS.ErrnoException to Error. The type is not checked in the implementation and it's inconvenient except for the Node native functions.

Please fill in this template.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).

Select one of these and delete the others:

If changing an existing definition:

@dt-bot

dt-bot commented Nov 5, 2017

Copy link
Copy Markdown
Member

types/node/index.d.ts

to authors (@DefinitelyTyped/DefinitelyTyped @parambirs @tellnes @WilcoBakker @octo-sniffle @smac89 @Flarna @mwiktorczyk @wwwy3y3 @DeividasBakanas @kjin @alvis Microsoft TypeScript (account can't be detected)). Could you review this PR?
👍 or 👎?

@RyanCavanaugh RyanCavanaugh added the Popular package This PR affects a popular package (as counted by NPM download counts). label Nov 5, 2017
@RyanCavanaugh

Copy link
Copy Markdown
Member

@teppeis Please fix the failures indicated in the Travis CI log.

@teppeis

teppeis commented Nov 5, 2017

Copy link
Copy Markdown
Contributor Author

@RyanCavanaugh The job was failed with timeout. I don't know why it was failed...

The job exceeded the maximum time limit for jobs, and has been terminated.

I'll re-push -f to retry the job.

@teppeis

teppeis commented Nov 5, 2017

Copy link
Copy Markdown
Contributor Author

@teppeis

teppeis commented Nov 5, 2017

Copy link
Copy Markdown
Contributor Author

@RyanCavanaugh @Andy-MS This CI failure is not related this PR. node in DefinitelyTyped cannot be test in time like: #20692 (comment)

@Flarna Flarna mentioned this pull request Nov 5, 2017
@ghost
ghost merged commit a68863e into DefinitelyTyped:master Nov 6, 2017
@teppeis
teppeis deleted the improve-node-promisify branch November 6, 2017 15:31
@teppeis

teppeis commented Nov 6, 2017

Copy link
Copy Markdown
Contributor Author

@Andy-MS thanks!

@1999

1999 commented Dec 21, 2017

Copy link
Copy Markdown
Contributor

@Andy-MS sorry for late question, but still. It looks like (err: Error) is a bit strict. From what I understand node-style callbacks are usually (err: Error | null), aren't they?

@ghost

ghost commented Dec 21, 2017

Copy link
Copy Markdown

@1999 right, PRs accepted to fix this.

KSXGitHub pushed a commit to KSXGitHub/DefinitelyTyped that referenced this pull request May 12, 2018
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Popular package This PR affects a popular package (as counted by NPM download counts).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants