Tarikh

TypeScript

Strictly typed APIs and the mode/pattern contract.

TypeScript

Tarikh is fully typed with strict mode in mind. The package exports the primary option and helper types for advanced use.

import type {
  Locale,
  FormatMode,
  FormatOptions,
  DateInput,
  RelativeTimeOptions
} from "@coreify/tarikh";

import type { TarikhProps } from "@coreify/tarikh/react";

Contract Notes

  • format() accepts either mode or pattern
  • mode is intentionally disallowed when pattern is present
  • React exports are isolated under @coreify/tarikh/react

License

MIT

On this page