npm.io
3.2.6 • Published 2 years ago

@types/topojson

Licence
MIT
Version
3.2.6
Deps
5
Size
7 kB
Vulns
0
Weekly
0
Stars
51.4K

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.