# @types/is-file-esm

> TypeScript definitions for is-file-esm

Latest version **1.0.5** (published 2024-02-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/is-file-esm
pnpm add @types/is-file-esm
yarn add @types/is-file-esm
bun add @types/is-file-esm
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2024-02-07 |
| First published | 2022-04-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51440 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/is-file-esm
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/is-file-esm
- npm.io page: https://npm.io/package/@types/is-file-esm

## Recent versions

- 1.0.5 (latest) — 2024-02-07
- 1.0.3 (ts4.5) — 2023-11-07
- 1.0.0 (ts3.9) — 2022-04-24
- 1.0.4 — 2024-02-07
- 1.0.2 — 2023-10-18
- 1.0.1 — 2023-09-26

## README

# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/is-file-esm/index.d.ts)
````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](https://github.com/leonsilicon).

---
_Source: https://npm.io/package/@types/is-file-esm · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
