diff --git a/types/node/index.d.ts b/types/node/index.d.ts index 67f275c7b6..bcb24150f8 100644 --- a/types/node/index.d.ts +++ b/types/node/index.d.ts @@ -1,6 +1,9 @@ // Type definitions for Node.js v7.x // Project: http://nodejs.org/ -// Definitions by: Microsoft TypeScript , DefinitelyTyped , Parambir Singh +// Definitions by: Microsoft TypeScript +// DefinitelyTyped +// Parambir Singh +// Roberto Desideri // 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;