@types/bindings

  • Version 1.5.5
  • Published
  • 6.81 kB
  • 1 dependency
  • MIT license

Install

npm i @types/bindings
yarn add @types/bindings
pnpm add @types/bindings

Overview

TypeScript definitions for bindings

Index

Functions

function bindings

bindings: typeof bindings;
  • 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.

function getFileName

getFileName: (calling_file?: string) => string;
  • 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 getRoot

getRoot: (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

Interfaces

interface Options

interface Options {}

    property arch

    arch?: string | undefined;
    • process.arch

    property arrow

    arrow?: string | undefined;
    • process.env.NODE_BINDINGS_ARROW || ' → '

    property bindings

    bindings?: string | undefined;
    • 'bindings.node'

    property compiled

    compiled?: string | undefined;
    • process.env.NODE_BINDINGS_COMPILED_DIR || 'compiled'

    property module_root

    module_root?: string | undefined;

      property nodePreGyp

      nodePreGyp?: string | undefined;
      • node-v${process.versions.modules}-${process.platform}-${process.arch}

      property platform

      platform?: NodeJS.Platform | undefined;
      • process.platform

      property try

      try?: ReadonlyArray<readonly string[]> | undefined;

        property version

        version?: string | undefined;
        • process.versions.node

        Package Files (1)

        Dependencies (1)

        Dev Dependencies (0)

        No dev dependencies.

        Peer Dependencies (0)

        No peer dependencies.

        Badge

        To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

        You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/bindings.

        • Markdown
          [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/bindings)
        • HTML
          <a href="https://www.jsdocs.io/package/@types/bindings"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>