DefinitelyTyped/types/shapefile/index.d.ts
Arne Schubert 216ea719fa GeoJSON: Enhance with generic properties (#20932)
* Make properties optional generic

* Write tests for generic usage of gGeoJSON feature properties

* Apply layout like recommend in the tslint default rule-set.

* double quotes
* 4 spaces indent (no tabs!)

* Remove jsdoc typings and force typescript version 2.3 for sub type-definitions of geojson

* apply change of andy-ms in PR #20933

* remove empty comments and set typescript version to 2.3 to fix linting errors

* Add myself to the list of authors

* Set TypeScript version to 2.3 for packages depending on geojson
2017-11-01 08:40:26 -07:00

33 lines
902 B
TypeScript

// Type definitions for shapefile 0.5.6
// Project: https://github.com/mbostock/shapefile
// Definitions by: Denis Carriere <https://github.com/DenisCarriere>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
/// <reference types="geojson"/>
declare const shapefile: shapefile.ShapefileStatic;
declare namespace shapefile {
interface Options {
encoding: string
highWaterMark: number
}
interface Feature {
done: boolean
value: GeoJSON.Feature<any>
}
interface Shapefile {
bbox: Array<number>
read(): Promise<Feature>;
}
interface ShapefileStatic {
open(shp: any, dbf?: any, options?: Options): Promise<Shapefile>;
read(shp: any, dbf?: any, options?: Options): Promise<GeoJSON.FeatureCollection<any>>;
}
}
declare module "shapefile" {
export = shapefile
}