@types/envhandlebars
TypeScript icon, indicating that this package has built-in type declarations

1.4.7 • Public • Published

Installation

npm install --save @types/envhandlebars

Summary

This package contains type definitions for envhandlebars (https://github.com/cgmartin/envhandlebars#readme).

Details

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

index.d.ts

/// <reference types="node" />
import H = require("handlebars");

/**
 * A simple templating utility, akin to envsubst, but using Handlebars for more complex logic.
 */
declare function envhandlebars(opts?: envhandlebars.Options, cb?: envhandlebars.EnvHandlebarsCallback): void;
declare function envhandlebars(cb?: envhandlebars.EnvHandlebarsCallback): void;

declare namespace envhandlebars {
    interface Options {
        /** @default process.env */
        env?: typeof process.env | undefined;
        /** @default process.exit */
        exit?: typeof process.exit | undefined;
        /** @default process.stdin */
        stdin?: typeof process.stdin | undefined;
        /** @default process.stdout */
        stout?: typeof process.stdout | undefined;
        /** @default process.stderr */
        stderr?: typeof process.stderr | undefined;
        /** @default true */
        arraysEnabled?: boolean | undefined;
        /** @default false */
        arrayVarPrefix?: boolean | undefined;
        /**
         * Custom Mustache helpers and partials can be implemented by extending the envhandlebars module
         * with your own Node.js wrapper script
         */
        extendHandlebars?: ExtendHandlebarsFunc | undefined;
    }

    type ExtendHandlebarsFunc = (Handlebars: typeof H) => void;

    type EnvHandlebarsCallback = (err?: Error) => void;
}

export = envhandlebars;

Additional Details

Credits

These definitions were written by Piotr Błażejewicz.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/envhandlebars

Weekly Downloads

0

Version

1.4.7

License

MIT

Unpacked Size

5.57 kB

Total Files

5

Last publish

Collaborators

  • types