DefinitelyTyped/types/intersects/intersects-tests.ts
Voxylu e268787d2b Add intersects types (#33959)
* add intersects types

* Add strictFunctionTypes to true

* Add tests

* Makes the linter happy
2019-03-18 09:07:58 -07:00

13 lines
289 B
TypeScript

import { polygonBox, pointLine, circleEllipse } from 'intersects';
const res = polygonBox([2, 0, 4, 2, 0, 2], 1, 1, 2, 2);
if (res) {
// do something
}
if (pointLine(0, 8, -5, 4, 7, 6)) {
// do agian something
}
const isGood = circleEllipse(0, 6, 9, 2, 4, 5, 1) ? 'yes' : 'no';