@naturalcycles/nodejs-lib
Version:
Standard library for Node.js
14 lines (13 loc) • 391 B
TypeScript
import type { ValuesOf } from '@naturalcycles/js-lib';
import 'dotenv/config';
/**
* @example
*
* const {a, b} = requreEnvKeys(['a', 'b'])
*
* Will throw if any of the passed keys is not defined.
*/
export declare function requireEnvKeys<T extends readonly string[]>(...keys: T): {
[k in ValuesOf<T>]: string;
};
export declare function requireFileToExist(filePath: string): void;