mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 19:51:53 +00:00
use external module style in voronoi-diagram
This commit is contained in:
Vendored
+6
-6
@@ -3,16 +3,16 @@
|
||||
// Definitions by: Michael Neu <https://github.com/michaelneu>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare module "voronoi-diagram" {
|
||||
declare namespace voronoi {
|
||||
type Point = number[];
|
||||
type Cell = number[];
|
||||
type Position = number[];
|
||||
|
||||
interface VoronoiDiagram {
|
||||
cells: Cell[];
|
||||
positions: Position[];
|
||||
positions: Point[];
|
||||
}
|
||||
}
|
||||
|
||||
function voronoi(points: Point[]) : VoronoiDiagram;
|
||||
export = voronoi;
|
||||
}
|
||||
declare function voronoi(points: voronoi.Point[]) : voronoi.VoronoiDiagram;
|
||||
|
||||
export = voronoi;
|
||||
@@ -1,19 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"noImplicitAny": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"voronoi-diagram-tests.ts"
|
||||
]
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"noImplicitAny": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"voronoi-diagram-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -2,7 +2,10 @@
|
||||
|
||||
import voronoi = require("voronoi-diagram");
|
||||
|
||||
let points = [
|
||||
const x: voronoi.Point = [1, 2];
|
||||
|
||||
let points: voronoi.Point[] = [
|
||||
x,
|
||||
[1, 1],
|
||||
[2, 2],
|
||||
[3, 3]
|
||||
|
||||
Reference in New Issue
Block a user