@types/bindings
TypeScript definitions for bindings
Last updated 5 years ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @types/bindings 
SYNC missed versions from official npm registry.

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

// Type definitions for bindings 1.5
// Project: https://github.com/TooTallNate/node-bindings
// Definitions by: Daniel Perez Alvarez <https://github.com/unindented>
//                 ExE Boss <https://github.com/ExE-Boss>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <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;
        try?: ReadonlyArray<ReadonlyArray<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: Tue, 06 Jul 2021 18:05:42 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

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

Current Tags

  • 1.5.1                                ...           latest (5 years ago)
  • 1.3.0                                ...           ts2.0 (8 years ago)
  • 1.3.0                                ...           ts2.1 (8 years ago)
  • 1.3.0                                ...           ts2.2 (8 years ago)
  • 1.3.0                                ...           ts2.3 (8 years ago)
  • 1.3.0                                ...           ts2.4 (8 years ago)
  • 1.3.0                                ...           ts2.5 (8 years ago)
  • 1.3.0                                ...           ts2.6 (8 years ago)
  • 1.3.0                                ...           ts2.7 (8 years ago)
  • 1.3.0                                ...           ts2.8 (8 years ago)
  • 1.3.0                                ...           ts2.9 (8 years ago)
  • 1.3.0                                ...           ts3.0 (8 years ago)
  • 1.3.0                                ...           ts3.1 (8 years ago)
  • 1.3.0                                ...           ts3.2 (8 years ago)
  • 1.5.0                                ...           ts3.3 (5 years ago)
  • 1.5.0                                ...           ts3.4 (5 years ago)
  • 1.5.0                                ...           ts3.5 (5 years ago)
  • 1.5.1                                ...           ts3.6 (5 years ago)
  • 1.5.1                                ...           ts3.7 (5 years ago)
  • 1.5.1                                ...           ts3.8 (5 years ago)
  • 1.5.1                                ...           ts3.9 (5 years ago)
  • 1.5.1                                ...           ts4.0 (5 years ago)
  • 1.5.1                                ...           ts4.1 (5 years ago)
  • 1.5.1                                ...           ts4.2 (5 years ago)
  • 1.5.1                                ...           ts4.3 (5 years ago)
  • 1.5.1                                ...           ts4.4 (5 years ago)
  • 1.5.1                                ...           ts4.5 (5 years ago)
  • 1.5.1                                ...           ts4.6 (5 years ago)
  • 1.5.1                                ...           ts4.7 (5 years ago)
  • 1.5.1                                ...           ts4.8 (5 years ago)
  • 1.5.1                                ...           ts4.9 (5 years ago)

3 Versions

  • 1.5.1                                ...           5 years ago
  • 1.5.0                                ...           5 years ago
  • 1.3.0                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org | Home |