mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Merge pull request #15769 from ricardo-mello/topojson
Added type definitions for topojson 3.0
This commit is contained in:
Vendored
+48
@@ -0,0 +1,48 @@
|
||||
// Type definitions for topojson 3.0.0
|
||||
// Project: https://github.com/topojson/topojson
|
||||
// Definitions by: Ricardo Mello <https://github.com/ricardo-mello>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export function bbox(topology: any): any;
|
||||
|
||||
export function feature(topology: any, o: any): { features: any[]; };
|
||||
|
||||
export function filter(topology: any, filter: any): any;
|
||||
|
||||
export function filterAttached(topology: any): any;
|
||||
|
||||
export function filterAttachedWeight(topology: any, minWeight: any, weight: any): any;
|
||||
|
||||
export function filterWeight(topology: any, minWeight: any, weight: any): any;
|
||||
|
||||
export function merge(topology: any, ...args: any[]): { type: any, coordinates: any[] };
|
||||
|
||||
export function mergeArcs(topology: any, objects: any): any;
|
||||
|
||||
export function mesh(topology: any, ...args: any[]): { type: any; coordinates: any[]; };
|
||||
|
||||
export function meshArcs(topology: any, object$$1: any, filter: any, ...args: any[]): { type: any; coordinates: any[]; };
|
||||
|
||||
export function neighbors(objects: any): any[];
|
||||
|
||||
export function planarRingArea(ring: any): any;
|
||||
|
||||
export function planarTriangleArea(triangle: any): any;
|
||||
|
||||
export function presimplify(topology: any, weight: any): any[];
|
||||
|
||||
export function quantile(topology: any, p: any): any;
|
||||
|
||||
export function quantize(topology: any, transform: any): any;
|
||||
|
||||
export function simplify(topology: any, minWeight: any): any;
|
||||
|
||||
export function sphericalRingArea(ring: any, interior: any): any;
|
||||
|
||||
export function sphericalTriangleArea(t: any): any;
|
||||
|
||||
export function topology(objects: any, quantization: any): any;
|
||||
|
||||
export function transform(transform: any): any;
|
||||
|
||||
export function untransform(transform: any): any;
|
||||
@@ -0,0 +1,6 @@
|
||||
import * as topojson from 'topojson';
|
||||
|
||||
// TODO: complete tests.
|
||||
|
||||
topojson.feature(null, null); // $ExpectType { features: any[]; }
|
||||
topojson.mesh(null, null, (a: any, b: any) => a !== b); // $ExpectType { type: any; coordinates: any[]; }
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"topojson-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "../tslint.json"
|
||||
}
|
||||
Reference in New Issue
Block a user