
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@types/bindings
Advanced tools
TypeScript definitions for bindings
npm install --save @types/bindings
This package contains type definitions for bindings (https://github.com/TooTallNate/node-bindings).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/bindings.
/// <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;
These definitions were written by Daniel Perez Alvarez, and ExE Boss.
FAQs
TypeScript definitions for bindings
The npm package @types/bindings receives a total of 38,205 weekly downloads. As such, @types/bindings popularity was classified as popular.
We found that @types/bindings demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.