mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-18 07:51:48 +08:00
Merge pull request #16495 from chenzhutianToys/master
the return of topojson.feature() contains the `type:string` field
This commit is contained in:
3
types/topojson/index.d.ts
vendored
3
types/topojson/index.d.ts
vendored
@@ -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;
|
||||
|
||||
|
||||
@@ -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[]; }
|
||||
|
||||
Reference in New Issue
Block a user