Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/shpjs

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/shpjs

TypeScript definitions for shpjs

  • 3.4.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13K
decreased by-11.74%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/shpjs

Summary

This package contains type definitions for shpjs (https://github.com/calvinmetcalf/shapefile-js#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/shpjs.

index.d.ts

// Type definitions for shpjs 3.4
// Project: https://github.com/calvinmetcalf/shapefile-js#readme
// Definitions by: Hsiao-Ting Yu <https://github.com/littlebtc>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

/// <reference types="node" />
/// <reference types="geojson" />

declare namespace shpjs {
    // All toBuffer() compatible buffers.
    type ShpJSBuffer = Buffer | ArrayBuffer | { buffer: ArrayBuffer };

    interface FeatureCollectionWithFilename extends GeoJSON.FeatureCollection {
        fileName?: string | undefined;
    }

    interface ShpJS {
        (
            base: string | ShpJSBuffer,
            whiteList?: ReadonlyArray<string>,
        ): Promise<FeatureCollectionWithFilename | FeatureCollectionWithFilename[]>;
        parseZip(
            buffer: ShpJSBuffer,
            whiteList?: ReadonlyArray<string>,
        ): Promise<FeatureCollectionWithFilename | FeatureCollectionWithFilename[]>;
        getShapeFile(
            base: string | ShpJSBuffer,
            whiteList?: ReadonlyArray<string>,
        ): Promise<FeatureCollectionWithFilename | FeatureCollectionWithFilename[]>;
        combine(
            arr: [ReadonlyArray<GeoJSON.Geometry>, ReadonlyArray<GeoJSON.GeoJsonProperties>],
        ): GeoJSON.FeatureCollection;
        parseShp(shp: ShpJSBuffer, prj?: string | Buffer): GeoJSON.Geometry[];
        parseDbf(dbf: ShpJSBuffer, cpg: ShpJSBuffer): GeoJSON.GeoJsonProperties[];
    }
}

declare var shpjs: shpjs.ShpJS;
export = shpjs;

Additional Details

  • Last updated: Mon, 25 Sep 2023 13:39:06 GMT
  • Dependencies: @types/geojson, @types/node
  • Global values: none

Credits

These definitions were written by Hsiao-Ting Yu.

FAQs

Package last updated on 25 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc