mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* 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
33 lines
902 B
TypeScript
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
|
|
}
|