[node] Edit fs.readdir() and fs.readdirSync()

This commit is contained in:
Roberto Desideri
2017-05-14 08:10:21 +02:00
parent e251c14388
commit 5ea24bf9e1

10
types/node/index.d.ts vendored
View File

@@ -1,6 +1,9 @@
// Type definitions for Node.js v7.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>, DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>, Parambir Singh <https://github.com/parambirs>
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Roberto Desideri <https://github.com/RobDesideri>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/************************************************
@@ -2569,8 +2572,9 @@ declare module "fs" {
* @returns Returns the created folder path.
*/
export function mkdtempSync(prefix: string): string;
export function readdir(path: string | Buffer, callback?: (err: NodeJS.ErrnoException, files: string[]) => void): void;
export function readdirSync(path: string | Buffer): string[];
export function readdir(path: string | Buffer, callback: (err: NodeJS.ErrnoException, files: string[]) => void): void;
export function readdir(path: string | Buffer, options: string | Object, callback: (err: NodeJS.ErrnoException, files: string[]) => void): void;
export function readdirSync(path: string | Buffer, options?: string | Object): string[];
export function close(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
export function closeSync(fd: number): void;
export function open(path: string | Buffer, flags: string | number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void;