# @types/shpjs

> TypeScript definitions for shpjs

Latest version **3.4.7** (published 2024-04-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/shpjs
pnpm add @types/shpjs
yarn add @types/shpjs
bun add @types/shpjs
```

## 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 | 3.4.7 |
| Published | 2024-04-27 |
| First published | 2018-11-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51438 |
| Maintainers | types |

## Links

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

## Dependencies (2)

- [@types/node](https://npm.io/package/@types/node.md) *
- [@types/geojson](https://npm.io/package/@types/geojson.md) *

## Recent versions

- 3.4.7 (latest) — 2024-04-27
- 3.4.6 (ts4.5) — 2023-11-21
- 3.4.2 (ts4.1) — 2022-11-14
- 3.4.1 (ts3.9) — 2021-07-06
- 3.4.0 (ts3.2) — 2018-11-19
- 3.4.5 — 2023-11-07
- 3.4.4 — 2023-10-18
- 3.4.3 — 2023-09-25

## README

# Installation
> `npm install --save @types/shpjs`

# Summary
This package contains type definitions for shpjs (https://github.com/calvinmetcalf/shapefile-js#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/shpjs.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/shpjs/index.d.ts)
````ts
/// <reference types="node" />
/// <reference types="geojson" />

declare namespace shpjs {
    // All toBuffer() compatible buffers.
    type ShpJSBuffer = Buffer | ArrayBuffer | { buffer: ArrayBuffer };

    interface FeatureCollectionWithFilename extends GeoJSON.FeatureCollection {
        fileName?: string | undefined;
    }

    interface ShpJS {
        (
            base: string | ShpJSBuffer,
            whiteList?: readonly string[],
        ): Promise<FeatureCollectionWithFilename | FeatureCollectionWithFilename[]>;
        parseZip(
            buffer: ShpJSBuffer,
            whiteList?: readonly string[],
        ): Promise<FeatureCollectionWithFilename | FeatureCollectionWithFilename[]>;
        getShapefile(
            base: string | ShpJSBuffer,
            whiteList?: readonly string[],
        ): Promise<FeatureCollectionWithFilename | FeatureCollectionWithFilename[]>;
        combine(
            arr: [readonly GeoJSON.Geometry[], readonly GeoJSON.GeoJsonProperties[]],
        ): GeoJSON.FeatureCollection;
        parseShp(shp: ShpJSBuffer, prj?: string | Buffer): GeoJSON.Geometry[];
        parseDbf(dbf: ShpJSBuffer, cpg: ShpJSBuffer): GeoJSON.GeoJsonProperties[];
    }
}

declare var shpjs: shpjs.ShpJS;
export = shpjs;

````

### Additional Details
 * Last updated: Sat, 27 Apr 2024 10:07:07 GMT
 * Dependencies: [@types/geojson](https://npmjs.com/package/@types/geojson), [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Hsiao-Ting Yu](https://github.com/littlebtc).

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