diff --git a/types/d3-polygon/d3-polygon-tests.ts b/types/d3-polygon/d3-polygon-tests.ts index 28e1e464e1..c4aac0b900 100644 --- a/types/d3-polygon/d3-polygon-tests.ts +++ b/types/d3-polygon/d3-polygon-tests.ts @@ -17,7 +17,7 @@ let containsFlag: boolean; let point: [number, number] = [15, 15]; const polygon: Array<[number, number]> = [[10, 10], [20, 20], [10, 30]]; const pointArray: Array<[number, number]> = [[10, 10], [20, 20], [10, 30], [15, 15]]; -let hull: Array<[number, number]>; +let hullOrNothing: Array<[number, number]> | null; // ----------------------------------------------------------------------------- // Tests @@ -27,7 +27,7 @@ num = d3Polygon.polygonArea(polygon); point = d3Polygon.polygonCentroid(polygon); -hull = d3Polygon.polygonHull(pointArray); +hullOrNothing = d3Polygon.polygonHull(pointArray); containsFlag = d3Polygon.polygonContains(polygon, point); diff --git a/types/d3-polygon/index.d.ts b/types/d3-polygon/index.d.ts index 64e1d2c9b9..b9f8711335 100644 --- a/types/d3-polygon/index.d.ts +++ b/types/d3-polygon/index.d.ts @@ -3,11 +3,11 @@ // Definitions by: Tom Wanzek , Alex Ford , Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// Last module patch version validated against: 1.0.1 +// Last module patch version validated against: 1.0.3 /** - * Returns the signed area of the specified polygon. If the vertices of the polygon are in counterclockwise order ( - * assuming a coordinate system where the origin ⟨0,0⟩ is in the top-left corner), the returned area is positive; + * Returns the signed area of the specified polygon. If the vertices of the polygon are in counterclockwise order + * (assuming a coordinate system where the origin <0,0> is in the top-left corner), the returned area is positive; * otherwise it is negative, or zero. * * @param polygon Array of coordinates , and so on. @@ -34,7 +34,7 @@ export function polygonHull(points: Array<[number, number]>): Array<[number, num * Returns true if and only if the specified point is inside the specified polygon. * * @param polygon Array of coordinates , and so on. - * @param point Coordinates of point + * @param point Coordinates of point . */ export function polygonContains(polygon: Array<[number, number]>, point: [number, number]): boolean; diff --git a/types/d3-polygon/tsconfig.json b/types/d3-polygon/tsconfig.json index 79bd8a43b8..1444a903df 100644 --- a/types/d3-polygon/tsconfig.json +++ b/types/d3-polygon/tsconfig.json @@ -6,7 +6,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ diff --git a/types/d3-polygon/tslint.json b/types/d3-polygon/tslint.json index 604d5950cf..f93cf8562a 100644 --- a/types/d3-polygon/tslint.json +++ b/types/d3-polygon/tslint.json @@ -1,7 +1,3 @@ { - "extends": "dtslint/dt.json", - "rules": { - "unified-signatures": false, - "callable-types": false - } + "extends": "dtslint/dt.json" }