mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
In many fs functions, mode is optional, which means that the argument that takes its slot becomes the callback.
Adding alternative definitions to account for this.
This commit is contained in:
parent
d39e7a3125
commit
666cd33fe8
6
node/node.d.ts
vendored
6
node/node.d.ts
vendored
@ -762,13 +762,15 @@ declare module "fs" {
|
||||
export function unlinkSync(path: string): void;
|
||||
export function rmdir(path: string, callback?: Function): void;
|
||||
export function rmdirSync(path: string): void;
|
||||
export function mkdir(path: string, mode?: string, callback?: Function): void;
|
||||
export function mkdir(path: string, callback?: Function): void;
|
||||
export function mkdir(path: string, mode: string, callback?: Function): void;
|
||||
export function mkdirSync(path: string, mode?: string): void;
|
||||
export function readdir(path: string, callback?: (err: Error, files: string[]) => void): void;
|
||||
export function readdirSync(path: string): string[];
|
||||
export function close(fd: string, callback?: Function): void;
|
||||
export function closeSync(fd: string): void;
|
||||
export function open(path: string, flags: string, mode?: string, callback?: (err: Error, fd: string) =>any): void;
|
||||
export function open(path: string, flags: string, callback?: (err: Error, fd: string) => any): void;
|
||||
export function open(path: string, flags: string, mode: string, callback?: (err: Error, fd: string) => any): void;
|
||||
export function openSync(path: string, flags: string, mode?: string): void;
|
||||
export function utimes(path: string, atime: number, mtime: number, callback?: Function): void;
|
||||
export function utimesSync(path: string, atime: number, mtime: number): void;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user