# @types/shapefile

> TypeScript definitions for shapefile

Latest version **0.6.4** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

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

## 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; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.6.4 |
| Published | 2023-11-07 |
| First published | 2016-09-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51438 |
| Maintainers | types |

## Links

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

## Dependencies (2)

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

## Recent versions

- 0.6.4 (latest) — 2023-11-07
- 0.6.1 (ts3.6) — 2021-07-06
- 0.6.0 (ts2.3) — 2018-08-23
- 0.5.1 (ts2.0) — 2016-09-21
- 0.6.3 — 2023-10-18
- 0.6.2 — 2023-09-25
- 0.5.2 — 2017-11-01

## README

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

import { Feature, FeatureCollection, GeoJsonProperties, GeometryObject } from "geojson";
import { Readable } from "stream";

export interface Options {
    encoding?: string | undefined;
    highWaterMark?: number | undefined;
}
export interface Source<RecordType> {
    bbox: number[];
    read(): Promise<{ done: boolean; value: RecordType }>;
    cancel(): Promise<void>;
}

export type Openable = string | ArrayBuffer | Uint8Array | Readable | ReadableStream;

export function open(shp: Openable, dbf?: Openable, options?: Options): Promise<Source<Feature>>;
export function openShp(source: Openable, options?: Options): Promise<Source<GeometryObject>>;
export function openDbf(source: Openable, options?: Options): Promise<Source<GeoJsonProperties>>;
export function read(shp: Openable, dbf?: Openable, options?: Options): Promise<FeatureCollection>;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: [@types/geojson](https://npmjs.com/package/@types/geojson), [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [ Denis Carriere](https://github.com/DenisCarriere), and [James Bromwell](https://github.com/Thw0rted).

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