npm.io
1.0.2 • Published 2 years ago

@types/parse-node-version

Licence
MIT
Version
1.0.2
Deps
0
Size
4 kB
Vulns
0
Weekly
0
Stars
51.3K

Installation

npm install --save @types/parse-node-version

Summary

This package contains type definitions for parse-node-version (https://github.com/gulpjs/parse-node-version#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/parse-node-version.

index.d.ts

interface ParsedNodeVersion {
    /**
     * Major version
     */
    major: number;
    /**
     * Minor version
     */
    minor: number;
    /**
     * Patch version
     */
    patch: number;
    /**
     * Pre-release version
     */
    pre: string;
    /**
     * Build information
     */
    build: string;
}

/**
 * Takes a Node version string (usually `process.version`) and returns an object
 * with the `major`/`minor`/`patch` (which will all be numbers) and `pre`/`build`
 * keys (which will always be a string). If the version doesn't contain any
 * pre-release or build information, the properties will be returned
 * as empty string.
 *
 * @param nodeVersionString Node version string
 */
declare function parseNodeVersion(nodeVersionString: string): ParsedNodeVersion;

export = parseNodeVersion;

Additional Details

  • Last updated: Tue, 07 Nov 2023 0939 GMT
  • Dependencies: none

Credits

These definitions were written by Ivan Nikolić.