Skip to content

Add copyFile to node - #20185

Merged
1 commit merged into
DefinitelyTyped:masterfrom
Loghorn:copy-file
Oct 17, 2017
Merged

1 commit merged into
DefinitelyTyped:masterfrom
Loghorn:copy-file

Conversation

@Loghorn

@Loghorn Loghorn commented Oct 2, 2017

Copy link
Copy Markdown
Contributor

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).

If changing an existing definition:

@Loghorn
Loghorn requested a review from vvakame as a code owner October 2, 2017 07:37
@dt-bot

dt-bot commented Oct 2, 2017

Copy link
Copy Markdown
Member

types/backoff/index.d.ts

to author (@BendingBender). Could you review this PR?
👍 or 👎?

Checklist

  • pass the Travis CI test?

types/commander/index.d.ts

to authors (@alan-agius4 @mdezem @vvakame). Could you review this PR?
👍 or 👎?

Checklist

  • pass the Travis CI test?

types/execa/index.d.ts

to authors (@douglasduteil @BendingBender). Could you review this PR?
👍 or 👎?

Checklist

  • pass the Travis CI test?

types/node/index.d.ts

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

Checklist

  • pass the Travis CI test?

Comment thread types/node/index.d.ts
* @param src A path to the source file.
* @param dest A path to the destination file.
*/
export function copyFile(src: PathLike, dest: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be NodeJS.ErrnoException | null.

Comment thread types/node/index.d.ts
* @param dest A path to the destination file.
* @param flags An integer that specifies the behavior of the copy operation. The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists.
*/
export function copyFile(src: PathLike, dest: PathLike, flags: number, callback: (err: NodeJS.ErrnoException) => void): void;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be NodeJS.ErrnoException | null.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you are right, but all the other callbacks are declared this way so I kept the same style

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok fine with me. Maybe it's better to change them all via a separated PR.

@typescript-bot typescript-bot added the Popular package This PR affects a popular package (as counted by NPM download counts). label Oct 2, 2017
@Flarna

Flarna commented Oct 2, 2017

Copy link
Copy Markdown
Contributor

LGTM for changes in node.

@Flarna Flarna mentioned this pull request Oct 2, 2017
8 tasks done
@Loghorn Loghorn mentioned this pull request Oct 2, 2017
6 of 8 tasks
@typescript-bot

Copy link
Copy Markdown
Contributor

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

@ghost

ghost commented Oct 16, 2017

Copy link
Copy Markdown

@Loghorn Could you remove unrelated changes? If there are test failures in other packages they should be changed in other PRs.

@Loghorn

Loghorn commented Oct 17, 2017

Copy link
Copy Markdown
Contributor Author

@Andy-MS Done

@ghost

ghost commented Oct 17, 2017

Copy link
Copy Markdown

Thanks!

@ghost
ghost merged commit 0905b3d into DefinitelyTyped:master Oct 17, 2017
@Loghorn
Loghorn deleted the copy-file branch October 17, 2017 15:09
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

Other Approved This PR was reviewed and signed-off by a community member. 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.

5 participants