Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/rc

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/rc

TypeScript definitions for rc

  • 1.2.0
  • ts3.6
  • ts3.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
21K
increased by52.92%
Maintainers
1
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 17 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc