@types/topojson
TypeScript icon, indicating that this package has built-in type declarations

3.2.6 • Public • Published

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.

index.d.ts

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;
}

// ---------------------------------------------------------------
// World Atlas TopoJSON
// ---------------------------------------------------------------

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/topojson

Weekly Downloads

35,037

Version

3.2.6

License

MIT

Unpacked Size

6.98 kB

Total Files

5

Last publish

Collaborators

  • types