Merge pull request #16495 from chenzhutianToys/master

the return of topojson.feature() contains the `type:string` field
This commit is contained in:
Arthur Ozga
2017-05-15 14:35:54 -07:00
committed by GitHub
2 changed files with 3 additions and 2 deletions

View File

@@ -1,11 +1,12 @@
// Type definitions for topojson 3.0
// Project: https://github.com/topojson/topojson
// Definitions by: Ricardo Mello <https://github.com/ricardo-mello>
// Zhutian Chen <https://github.com/chenzhutian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export function bbox(topology: any): any;
export function feature(topology: any, o: any): { features: any[]; };
export function feature(topology: any, o: any): { features: any[]; type: string };
export function filter(topology: any, filter: any): any;

View File

@@ -2,5 +2,5 @@ import * as topojson from 'topojson';
// TODO: complete tests.
topojson.feature(null, null); // $ExpectType { features: any[]; }
topojson.feature(null, null); // $ExpectType { features: any[]; type: string; }
topojson.mesh(null, null, (a: any, b: any) => a !== b); // $ExpectType { type: any; coordinates: any[]; }