// Type definitions for shapefile 0.6 // Project: https://github.com/mbostock/shapefile // Definitions by: Denis Carriere // James Bromwell // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 /// import { Feature, FeatureCollection, GeometryObject, GeoJsonProperties } from "geojson"; import { Readable } from "stream"; export interface Options { encoding?: string; highWaterMark?: number; } export interface Source { bbox: number[]; read(): Promise<{done: boolean, value: RecordType}>; cancel(): Promise; } export type Openable = string | ArrayBuffer | Uint8Array | Readable | ReadableStream; export function open(shp: Openable, dbf?: Openable, options?: Options): Promise>; export function openShp(source: Openable, options?: Options): Promise>; export function openDbf(source: Openable, options?: Options): Promise>; export function read(shp: Openable, dbf?: Openable, options?: Options): Promise;