From 6eae3bf1bd2d980fc8c8527d25275dfd8bb29df2 Mon Sep 17 00:00:00 2001 From: zhutian chen Date: Sat, 13 May 2017 01:04:23 +0800 Subject: [PATCH 1/3] should contain a type in the return of feature --- types/topojson/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/topojson/index.d.ts b/types/topojson/index.d.ts index bafc431ea3..68efb8ee9c 100644 --- a/types/topojson/index.d.ts +++ b/types/topojson/index.d.ts @@ -5,7 +5,7 @@ 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; From 3cb428af9940ae0d0a3df72fda6e5b581ac5a5ca Mon Sep 17 00:00:00 2001 From: zhutian chen Date: Sat, 13 May 2017 01:06:46 +0800 Subject: [PATCH 2/3] add myself --- types/topojson/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/topojson/index.d.ts b/types/topojson/index.d.ts index 68efb8ee9c..67f71310d0 100644 --- a/types/topojson/index.d.ts +++ b/types/topojson/index.d.ts @@ -1,6 +1,7 @@ // 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; From 74135b05f356af327820047d3343298aba540992 Mon Sep 17 00:00:00 2001 From: zhutian chen Date: Sat, 13 May 2017 12:18:03 +0800 Subject: [PATCH 3/3] updaste the test --- types/topojson/topojson-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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[]; }