mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 21:00:01 +08:00
Correct signature for readFileSync
This commit is contained in:
2
types/node/index.d.ts
vendored
2
types/node/index.d.ts
vendored
@@ -2834,7 +2834,7 @@ declare module "fs" {
|
||||
* @param fileName
|
||||
* @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFileSync returns a string; otherwise it returns a Buffer.
|
||||
*/
|
||||
export function readFileSync(filename: string, options: { encoding: string; flag?: string; }): string;
|
||||
export function readFileSync(filename: string, options: { encoding?: string | null; flag?: string; }): string;
|
||||
/**
|
||||
* Synchronous readFile - Synchronously reads the entire contents of a file.
|
||||
*
|
||||
|
||||
2
types/node/v4/index.d.ts
vendored
2
types/node/v4/index.d.ts
vendored
@@ -1764,7 +1764,7 @@ declare module "fs" {
|
||||
* @param fileName
|
||||
* @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFileSync returns a string; otherwise it returns a Buffer.
|
||||
*/
|
||||
export function readFileSync(filename: string, options: { encoding: string; flag?: string; }): string;
|
||||
export function readFileSync(filename: string, options: { encoding?: string | null; flag?: string; }): string;
|
||||
/**
|
||||
* Synchronous readFile - Synchronously reads the entire contents of a file.
|
||||
*
|
||||
|
||||
2
types/node/v6/index.d.ts
vendored
2
types/node/v6/index.d.ts
vendored
@@ -2553,7 +2553,7 @@ declare module "fs" {
|
||||
* @param fileName
|
||||
* @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFileSync returns a string; otherwise it returns a Buffer.
|
||||
*/
|
||||
export function readFileSync(filename: string, options: { encoding: string; flag?: string; }): string;
|
||||
export function readFileSync(filename: string, options: { encoding?: string | null; flag?: string; }): string;
|
||||
/**
|
||||
* Synchronous readFile - Synchronously reads the entire contents of a file.
|
||||
*
|
||||
|
||||
2
types/node/v7/index.d.ts
vendored
2
types/node/v7/index.d.ts
vendored
@@ -2685,7 +2685,7 @@ declare module "fs" {
|
||||
* @param fileName
|
||||
* @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFileSync returns a string; otherwise it returns a Buffer.
|
||||
*/
|
||||
export function readFileSync(filename: string, options: { encoding: string; flag?: string; }): string;
|
||||
export function readFileSync(filename: string, options: { encoding?: string | null; flag?: string; }): string;
|
||||
/**
|
||||
* Synchronous readFile - Synchronously reads the entire contents of a file.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user