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

Installation

npm install --save @types/rc

Summary

This package contains type definitions for rc (https://github.com/dominictarr/rc).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rc.

index.d.ts

// Type definitions for rc 1.2
// Project: https://github.com/dominictarr/rc
// Definitions by: Daniel Rosenwasser <https://github.com/DanielRosenwasser>
//                 BendingBender <https://github.com/BendingBender>
//                 kusyka911 <https://github.com/kusyka911>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2

interface RcResultType<T> {
    /**
     * Contains all parsed configurations from different sources
     * like '/etc/${appname}rc', '/etc/${appname}/config', and other.
     */
    configs: T[];
    /**
     * same as RcResultType.configs[RcResultType.configs.length - 1]
     */
    config: T;
    /**
     * For compatibility with previous versions of '@types/rc'
     */
    [key: string]: any;
}

declare function rc<T extends object = { [key: string]: any }>(
    name: string,
    defaults?: T,
    /**
     * Parsed argv object. For example, if args is `--foo bar`, then this value should be `{foo: 'bar'}`
     * If `argv` is `null` or `undefined`, then `rc`'s default parser will parse `process.argv`.
     */
    argv?: T | null,
    /**
     * Custom config file parser.
     * This function will be passed the string contents of each
     * discovered configuration file should return a parsed object dictionary.
     */
    parse?: ((content: string) => { [key: string]: any }) | null
): T & RcResultType<T>;

export = rc;

Additional Details

  • Last updated: Tue, 17 Aug 2021 13:01:24 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Daniel Rosenwasser, BendingBender, and kusyka911.

Current Tags

  • 1.2.0                                ...           latest (5 years ago)
  • 0.0.2                                ...           ts2.0 (7 years ago)
  • 0.0.2                                ...           ts2.1 (7 years ago)
  • 1.1.0                                ...           ts2.2 (7 years ago)
  • 1.1.0                                ...           ts2.3 (7 years ago)
  • 1.1.0                                ...           ts2.4 (7 years ago)
  • 1.1.0                                ...           ts2.5 (7 years ago)
  • 1.1.0                                ...           ts2.6 (7 years ago)
  • 1.1.0                                ...           ts2.7 (7 years ago)
  • 1.1.0                                ...           ts2.8 (7 years ago)
  • 1.1.0                                ...           ts2.9 (7 years ago)
  • 1.1.0                                ...           ts3.0 (7 years ago)
  • 1.1.0                                ...           ts3.1 (7 years ago)
  • 1.1.0                                ...           ts3.2 (7 years ago)
  • 1.1.0                                ...           ts3.3 (7 years ago)
  • 1.1.0                                ...           ts3.4 (7 years ago)
  • 1.1.0                                ...           ts3.5 (7 years ago)
  • 1.2.0                                ...           ts3.6 (5 years ago)
  • 1.2.0                                ...           ts3.7 (5 years ago)
  • 1.2.0                                ...           ts3.8 (5 years ago)
  • 1.2.0                                ...           ts3.9 (5 years ago)
  • 1.2.0                                ...           ts4.0 (5 years ago)
  • 1.2.0                                ...           ts4.1 (5 years ago)
  • 1.2.0                                ...           ts4.2 (5 years ago)
  • 1.2.0                                ...           ts4.3 (5 years ago)
  • 1.2.0                                ...           ts4.4 (5 years ago)
  • 1.2.0                                ...           ts4.5 (5 years ago)
  • 1.2.0                                ...           ts4.6 (5 years ago)

4 Versions

  • 1.2.0                                ...           5 years ago
  • 1.1.0                                ...           7 years ago
  • 0.0.2                                ...           7 years ago
  • 0.0.1                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |