Skip to content

Typing #38

Description

@jneuendorf

For anyone, using this library within TypeScript (and together with d3), you can use

declare module "@mapbox/geojson-rewind" {
    import {ExtendedFeature, ExtendedFeatureCollection, ExtendedGeometryCollection, GeoGeometryObjects} from "d3-geo"

    export default function rewind(
        geojson: ExtendedFeature | ExtendedFeatureCollection | GeoGeometryObjects | ExtendedGeometryCollection,
        clockwise: boolean,
    ): ExtendedFeature | ExtendedFeatureCollection | GeoGeometryObjects | ExtendedGeometryCollection;
}

If people are interested, I guess I could submit a PR with this code in an index.d.ts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions