UNPKG

froge

Version:

Jump-start your NodeJS/Bun/... services with dependency & lifecycle management and handy helper methods

57 lines (56 loc) 1.51 kB
declare class EnvWrapper { private name; constructor(name: string); toString(): string; readonly s: typeof this.string; readonly n: typeof this.number; readonly i: typeof this.int; readonly b: typeof this.bool; string(defaultValue?: string): string; string(config?: { def?: string; nonEmpty?: boolean; }): string; match(regExp: RegExp, defaultValue?: string): string; path(defaultValue?: string): string; path(config?: { def?: string; file?: boolean; exist?: boolean; }): string; url(defaultValue?: string): URL; urls(defaultValue?: string): string; ip(defaultValue?: string): string; ipv4(defaultValue?: string): string; ipv6(defaultValue?: string): string; number(defaultValue?: number): number; number(config?: { def?: number; min?: number; max?: number; }): number; int(defaultValue?: number): number; int(config?: { def?: number; min?: number; max?: number; strict?: boolean; }): number; port(defaultValue?: number): number; port(config?: { def?: number; min?: number; max?: number; strict?: boolean; }): number; bool(defaultValue?: boolean): boolean; bool(config?: { def?: boolean; strict?: boolean; map?: Record<string, boolean>; }): boolean; } declare const envHelper: { [key: string]: EnvWrapper; }; export default envHelper;