diff --git a/types/topojson/index.d.ts b/types/topojson/index.d.ts index bafc431ea3..67f71310d0 100644 --- a/types/topojson/index.d.ts +++ b/types/topojson/index.d.ts @@ -1,11 +1,12 @@ // Type definitions for topojson 3.0 // Project: https://github.com/topojson/topojson // Definitions by: Ricardo Mello +// Zhutian Chen // 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; diff --git a/types/topojson/topojson-tests.ts b/types/topojson/topojson-tests.ts index a8049b6b26..68171809d5 100644 --- a/types/topojson/topojson-tests.ts +++ b/types/topojson/topojson-tests.ts @@ -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[]; }