@types/is-file-esm
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

Installation

npm install --save @types/is-file-esm

Summary

This package contains type definitions for is-file-esm (https://github.com/davidmarkclements/is-file-esm).

Details

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

index.d.ts

interface Result {
    esm: boolean;
    type: "module" | "commonjs" | undefined;
    extType: "c" | "m" | "j";
    path: string;
    pkgPath: string;
}

declare const isFileEsm: {
    constants: {
        ERR_PATH_MUST_BE_STRING: string;
        ERR_PATH_MUST_BE_ABSOLUTE: string;
        ERR_PATH_MUST_EXIST: string;
        ERR_PATH_MUST_HAVE_VALID_EXT: string;
    };

    (path: string, callback: (error: Error | null, result?: Result) => void): void;
    (path: string): Promise<Result>;
    sync(path: string): Result;
};

export = isFileEsm;

Additional Details

  • Last updated: Wed, 07 Feb 2024 13:06:44 GMT
  • Dependencies: none

Credits

These definitions were written by Leon Si.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/is-file-esm

Weekly Downloads

576

Version

1.0.5

License

MIT

Unpacked Size

3.66 kB

Total Files

5

Last publish

Collaborators

  • types