env-smart
Version:
Zero-dependency library for loading .env files. Supports default values and type definitions.
11 lines (10 loc) • 569 B
TypeScript
/**
* Cast a value into the specified type
* @param {string} value A string representation of a variable
* @param {string} type The type the value should be. Either string, boolean, number, object or array.
* @param {object} [options] Additional options. Optional.
* @returns {string|boolean|number|object|Array} The value casted into the specified type.
*/
export declare function type(value: string, type: string, options?: {
verbose?: boolean;
}): unknown;