Skip to content

Instantly share code, notes, and snippets.

@rohmanhm
Created October 5, 2018 13:09
Show Gist options
  • Save rohmanhm/5d42de5fbdb5a37374b7fc9d656be252 to your computer and use it in GitHub Desktop.
Save rohmanhm/5d42de5fbdb5a37374b7fc9d656be252 to your computer and use it in GitHub Desktop.
Typescript definition for format-currency
declare module 'format-currency' {
interface Options {
format?: string; // %s => symbol, %v => value, %c => code
code?: string;
symbol?: string;
locale?: string;
minimumFractionDigits?: number;
maximumFractionDigits?: number;
nanZero?: boolean;
}
type FormatCurrencyFn = (value: any, options?: Options) => string
type FormatCurrencyExport = FormatCurrencyFn
const FormatCurrency: FormatCurrencyExport
export = FormatCurrency
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment