# @types/snowpack-env

> TypeScript definitions for snowpack-env

Latest version **2.3.7** (published 2024-01-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/snowpack-env
pnpm add @types/snowpack-env
yarn add @types/snowpack-env
bun add @types/snowpack-env
```

## 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 | 2.3.7 |
| Published | 2024-01-30 |
| First published | 2020-07-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51437 |
| Maintainers | types |

## Links

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

## Recent versions

- 2.3.7 (latest) — 2024-01-30
- 2.3.6 (ts4.5) — 2023-11-07
- 2.3.4 (ts3.7) — 2021-07-06
- 2.3.5 — 2023-10-18
- 2.3.3 — 2020-12-18
- 2.3.2 — 2020-11-10
- 2.3.1 — 2020-11-03
- 2.3.0 — 2020-07-31

## README

# Installation
> `npm install --save @types/snowpack-env`

# Summary
This package contains type definitions for snowpack-env (https://github.com/pikapkg/snowpack#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/snowpack-env.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/snowpack-env/index.d.ts)
````ts
interface ImportMetaHot {
    /** Accept the HMR update. */
    accept(
        callback?: (update: {
            /** The newer version of the current module */
            module: unknown;
        }) => void,
    ): void;
    /** Accept the HMR update with dependencies update. */
    accept(
        dependencies: readonly string[],
        callback: (update: {
            /** The newer version of the current module */
            module: unknown;
            /** The newer version of dependencies. Order is same as the first argument. */
            deps: unknown[];
        }) => void,
    ): void;
    /** Cleanup side-effects before load the newer version of this module. */
    dispose(callback: () => void): void;
    /** Mark the HMR as invalidated to reload the whole page. */
    invalidate(): void;
    /** Mark this module as HMR incompatible, always reload the page. */
    decline(): void;
    /** See https://github.com/pikapkg/esm-hmr#importmetahotdata */
    data: unknown;
}

interface ImportMeta {
    url: string;
    // TypeScript Bug: https://github.com/microsoft/TypeScript/issues/41468
    // When TS bug is fixed and ecosystem has upgraded, then it will be safe
    // to change `hot` to the more correct "possibly undefined" (hot?: ...).
    readonly hot: ImportMetaHot;
    readonly env: {
        readonly [key: string]: any;
        readonly SNOWPACK_PUBLIC_API_URL: string;
        readonly MODE: string;
        readonly NODE_ENV: string;
        readonly SSR?: boolean | undefined;
    };
}

````

### Additional Details
 * Last updated: Tue, 30 Jan 2024 21:35:45 GMT
 * Dependencies: none

# Credits
These definitions were written by [Fred K. Schott](https://github.com/FredKSchott), [Michael Stramel](https://github.com/stramel), [Drew Powers](https://github.com/drwpow), and [Jack Works](https://github.com/Jack-Works).

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