5.0.2 • Published 7 months ago

@types/cmd-shim v5.0.2

Weekly downloads
7,813
License
MIT
Repository
github
Last release
7 months ago

Installation

npm install --save @types/cmd-shim

Summary

This package contains type definitions for cmd-shim (https://github.com/npm/cmd-shim).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cmd-shim.

index.d.ts

// Type definitions for cmd-shim 5.0
// Project: https://github.com/npm/cmd-shim
// Definitions by: Andrew Bradley <https://github.com/cspotcode>
//                 Hiroki Osame <https://github.com/privatenumber>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/**
 * Create a cmd shim at `to` for the command line program at `from`. e.g.
 *
 * cmdShim(__dirname + '/cli.js', '/usr/bin/command-name');
 */
declare function cmdShim(from: string, to: string): Promise<void>;

declare namespace cmdShim {
    /**
     * Create a cmd shim at `to` for the command line program at `from`, but will just
     * continue if the file does not exist.
     *
     * cmdShim.ifExists(__dirname + '/cli.js', '/usr/bin/command-name');
     */
    function ifExists(from: string, to: string): Promise<void>;
}

export = cmdShim;

Additional Details

  • Last updated: Sat, 23 Apr 2022 04:31:35 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Andrew Bradley, and Hiroki Osame.