javascript-time-ago 2.5.5 → 2.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.d.ts +5 -1
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -2,7 +2,11 @@ export type DateInput = Date | number;
2
2
 
3
3
  export type Locale = string;
4
4
 
5
- export type LabelStyleName = 'long' | 'short' | 'narrow' | 'mini' | 'now';
5
+ // Users can add custom styles via `TimeAgo.addLabels(locale, styleName, labels)`.
6
+ export type CustomLabelStyleName = string;
7
+ // There're also "legacy" label styles like "time" or "long-time" that have been deprecated.
8
+ // Users can still use those by adding them manually via `TimeAgo.addLabels()`.
9
+ export type LabelStyleName = 'long' | 'short' | 'narrow' | 'mini' | 'now' | CustomLabelStyleName;
6
10
 
7
11
  export type Rounding = 'round' | 'floor';
8
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "javascript-time-ago",
3
- "version": "2.5.5",
3
+ "version": "2.5.6",
4
4
  "description": "Localized relative date/time formatting",
5
5
  "main": "index.cjs",
6
6
  "module": "index.js",