UNPKG

nhb-toolbox

Version:

A versatile collection of smart, efficient, and reusable utility functions, classes and types for everyday development needs.

26 lines (25 loc) 1.26 kB
import type { $Chronos, GreetingConfigs } from '../types'; declare module '../Chronos' { interface Chronos { /** * @instance Returns a greeting message based on current instance of `Chronos` time or provided time in the `configs`. * * @remarks This method internally uses {@link https://toolbox.nazmul-nhb.dev/docs/utilities/date/getGreeting getGreeting} function. * * @param configs - Configuration options for greeting times and messages. * @returns The appropriate greeting message. */ getGreeting(configs?: GreetingConfigs): string; /** * @instance Returns a greeting message based on current instance of `Chronos` time or provided time in the `configs`. * * @remarks This method is an alias for {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/format#getgreeting getGreeting} method. * * @param configs - Configuration options for greeting times and messages. * @returns The appropriate greeting message. */ greet(configs?: GreetingConfigs): string; } } /** * Plugin to inject `getGreeting`/`greet` method */ export declare const greetingPlugin: ($Chronos: $Chronos) => void;