Installation
npm install --save @types/topojson
Summary
This package contains type definitions for topojson (https://github.com/topojson/topojson).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/topojson.
import * as GeoJSON from "geojson";
import * as TopoJSON from "topojson-specification";
export as namespace topojson;
// ---------------------------------------------------------------
// TopoJSON Server
// ---------------------------------------------------------------
export * from "topojson-server";
// ---------------------------------------------------------------
// TopoJSON Simplify
// ---------------------------------------------------------------
export * from "topojson-simplify";
// ---------------------------------------------------------------
// TopoJSON Client
// ---------------------------------------------------------------
export * from "topojson-client";
// ---------------------------------------------------------------
// U.S. Atlas TopoJSON
// ---------------------------------------------------------------
export interface UsAtlas extends TopoJSON.Topology {
objects: {
counties: { type: "GeometryCollection"; geometries: Array<TopoJSON.Polygon | TopoJSON.MultiPolygon> };
states: { type: "GeometryCollection"; geometries: Array<TopoJSON.Polygon | TopoJSON.MultiPolygon> };
nation: TopoJSON.GeometryCollection;
};
bbox: [number, number, number, number];
transform: TopoJSON.Transform;
}
export interface WorldAtlas extends TopoJSON.Topology {
objects: {
countries: { type: "GeometryCollection"; geometries: Array<TopoJSON.Polygon | TopoJSON.MultiPolygon> };
land: TopoJSON.GeometryCollection;
};
bbox: [number, number, number, number];
transform: TopoJSON.Transform;
}
Additional Details
Credits
These definitions were written by Ricardo Mello, Zhutian Chen, and denisname.