5.0.3 • Published 7 months ago

@types/file-exists v5.0.3

Weekly downloads
453
License
MIT
Repository
github
Last release
7 months ago

Installation

npm install --save @types/file-exists

Summary

This package contains type definitions for file-exists (https://github.com/scottcorgan/file-exists).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/file-exists.

index.d.ts

// Type definitions for file-exists 5.0
// Project: https://github.com/scottcorgan/file-exists
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <reference types="node" />

export = fileExists;

type FilePathType = string | Buffer | URL;

interface FalsyRoot {
    root?: '';
    [otherKey: string]: any;
}

// Promise APIs
declare function fileExists(filepath: FilePathType, options?: FalsyRoot): Promise<boolean>;
declare function fileExists(filepath: string, options: fileExists.Options): Promise<boolean>;

// Callback APIs
declare function fileExists(filepath: FilePathType, callback: (err: Error | null, exists: boolean) => void): void;
declare function fileExists(
    filepath: FilePathType,
    options: FalsyRoot,
    callback: (err: Error | null, exists: boolean) => void,
): void;
declare function fileExists(
    filepath: string,
    options: fileExists.Options,
    callback: (err: Error | null, exists: boolean) => void,
): void;

declare namespace fileExists {
    function sync(filepath: FilePathType, options?: Options): boolean;

    interface Options {
        root?: string;
        [ignoredValues: string]: any;
    }
}

Additional Details

  • Last updated: Sat, 07 Aug 2021 13:31:24 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by BendingBender.

5.0.3

7 months ago

5.0.2

7 months ago

5.0.1

8 months ago

5.0.0

3 years ago

4.0.1

3 years ago

4.0.0

7 years ago