point-in-polygon: Lint (#18349)

This commit is contained in:
Andy 2017-07-24 11:58:49 -07:00 committed by GitHub
parent 97c89cee56
commit 73c39cf916
3 changed files with 5 additions and 6 deletions

View File

@ -1,10 +1,8 @@
// Type definitions for point-in-polygon
// Type definitions for point-in-polygon 1.0
// Project: https://github.com/substack/point-in-polygon
// Definitions by: dyst5422 <https://github.com/dyst5422>
// kogai <https://github.com/kogai>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module 'point-in-polygon' {
const inside: (point: number[], polygon: number[][]) => boolean;
export = inside;
}
declare function inside(point: ReadonlyArray<number>, polygon: ReadonlyArray<ReadonlyArray<number>>): boolean;
export = inside;

View File

@ -1,4 +1,4 @@
import * as inside from 'point-in-polygon';
import inside = require("point-in-polygon");
const polygon = [ [ 1, 1 ], [ 1, 2 ], [ 2, 2 ], [ 2, 1 ] ];
const inPolygon: boolean = inside([ 1.5, 1.5 ], polygon);

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }