ember-intl
Version:
Internationalization for Ember projects
19 lines (16 loc) • 390 B
text/typescript
import type { IntlShape } from '@formatjs/intl';
/**
* @deprecated
*/
export type FormatRelativeParameters = Parameters<
IntlShape<string>['formatRelativeTime']
>;
/**
* @deprecated
*/
export function formatRelative(
intlShape: IntlShape,
...[value, unit, formatOptions]: FormatRelativeParameters
): string {
return intlShape.formatRelativeTime(value, unit, formatOptions);
}