New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@types/bindings

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/bindings

TypeScript definitions for bindings

ts4.5
ts4.6
ts4.7
ts4.8
ts4.9
ts5.0
ts5.1
ts5.2
ts5.3
ts5.4
ts5.5
ts5.6
ts5.7
ts5.8
ts5.9
ts6.0
latest
Source
npmnpm
Version
1.5.5
Version published
Weekly downloads
49K
-19.82%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/bindings

Summary

This package contains type definitions for bindings (https://github.com/TooTallNate/node-bindings).

Details

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

index.d.ts

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

/**
 * The main `bindings()` function loads the compiled bindings for a given module.
 * It uses V8's Error API to determine the parent filename that this function is
 * being invoked from, which is then used to find the root directory.
 */
declare function bindings(mod: string | bindings.Options): any;
declare namespace bindings {
    interface Options {
        /** @default process.env.NODE_BINDINGS_ARROW || ' → ' */
        arrow?: string | undefined;
        /** @default process.env.NODE_BINDINGS_COMPILED_DIR || 'compiled' */
        compiled?: string | undefined;
        /** @default process.platform */
        platform?: NodeJS.Platform | undefined;
        /** @default process.arch */
        arch?: string | undefined;
        /** @default `node-v${process.versions.modules}-${process.platform}-${process.arch}` */
        nodePreGyp?: string | undefined;
        /** @default process.versions.node */
        version?: string | undefined;
        /** @default 'bindings.node' */
        bindings?: string | undefined;
        /* @default exports.getRoot(exports.getFileName()) */
        module_root?: string | undefined;
        /* @default (build/|out/)?(Debug|Release|default) and others */
        try?: ReadonlyArray<readonly string[]> | undefined;
    }

    /**
     * Gets the filename of the JavaScript file that invokes this function.
     * Used to help find the root directory of a module.
     * Optionally accepts an filename argument to skip when searching for the invoking filename
     */
    function getFileName(calling_file?: string): string;

    /**
     * Gets the root directory of a module, given an arbitrary filename
     * somewhere in the module tree. The "root directory" is the directory
     * containing the `package.json` file.
     *
     *   In:  /home/nate/node-native-module/lib/index.js
     *   Out: /home/nate/node-native-module
     */
    function getRoot(file: string): string;
}

export = bindings;

Additional Details

  • Last updated: Mon, 20 Nov 2023 23:36:23 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Daniel Perez Alvarez, and ExE Boss.

FAQs

Package last updated on 20 Nov 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