Nonstop Progressive Marxism

    @types/shapefile
    TypeScript icon, indicating that this package has built-in type declarations

    0.6.1 • Public • Published

    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

    // Type definitions for shapefile 0.6
    // Project: https://github.com/mbostock/shapefile
    // Definitions by:  Denis Carriere <https://github.com/DenisCarriere>
    //                  James Bromwell <https://github.com/Thw0rted>
    // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
    // TypeScript Version: 2.3
    
    /// <reference types="node" />
    
    import { Feature, FeatureCollection, GeometryObject, GeoJsonProperties } 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

    Credits

    These definitions were written by Denis Carriere, and James Bromwell.

    Keywords

    none

    Install

    npm i @types/shapefile

    DownloadsWeekly Downloads

    1,798

    Version

    0.6.1

    License

    MIT

    Unpacked Size

    5.36 kB

    Total Files

    4

    Last publish

    Collaborators

    • types