UNPKG

@raccoons-co/genera

Version:

Abstractions on top of Typescript 5.0.

27 lines (26 loc) 859 B
import { Method } from "@raccoons-co/genera"; /** * The user environment variable. */ export default class EnvironmentVariable { /** * Returns environment variable decorator factory instance. * * @param name - the name of the environment variable * @returns object - the decorator factory instance */ static of(name: string): EnvironmentVariableDecoratorFactory; } interface EnvironmentVariableDecoratorFactory { /** * Returns decorator that replaces initial field value with value of user environment variable if defined * otherwise keeps initialized value. */ orElseInitial(): Method; /** * Returns decorator that replaces initial field value with value of user environment variable if defined * otherwise throws `NullPointerException`. */ orElseThrow(): Method; } export {};