1.0.2 • Published 6 months ago

@types/parse-node-version v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

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

// Type definitions for parse-node-version 1.0
// Project: https://github.com/gulpjs/parse-node-version#readme
// Definitions by: Ivan Nikolić <https://github.com/niksy>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

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: Thu, 07 Oct 2021 18:01:31 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Ivan Nikolić.

1.0.2

6 months ago

1.0.1

7 months ago

1.0.0

3 years ago