@formatjs/intl-relativetimeformat 6.2.0 → 6.2.4
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
// /home/longlho/.cache/bazel/_bazel_longlho/576c18efaac10246ec115c72af79fca6/sandbox/linux-sandbox/
|
|
2
|
+
// /home/longlho/.cache/bazel/_bazel_longlho/576c18efaac10246ec115c72af79fca6/sandbox/linux-sandbox/769/execroot/formatjs/node_modules/@bazel/typescript/internal/ts_project_options_validator.js checked attributes for //packages/intl-relativetimeformat:dist
|
|
3
3
|
// composite: false
|
|
4
4
|
// declaration: true
|
|
5
5
|
// declaration_map: true
|
package/index.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/intl-relativetimeformat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,sBAAsB,EAUtB,WAAW,EAGX,gBAAgB,EACjB,MAAM,sBAAsB,CAAC;AAE9B,oBAAY,IAAI,GACZ,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,KAAK,GACL,MAAM,GACN,OAAO,GACP,SAAS,GACT,MAAM,CAAC;AAEX,oBAAY,KAAK,GACb,SAAS,GACT,SAAS,GACT,OAAO,GACP,MAAM,GACN,OAAO,GACP,QAAQ,GACR,UAAU,GACV,OAAO,CAAC;AAEZ,oBAAY,eAAe,GAAG,IAAI,GAAG,KAAK,CAAC;AAE3C,MAAM,WAAW,6BAA6B;IAC5C;;;;;OAKG;IACH,aAAa,CAAC,EAAE,UAAU,GAAG,QAAQ,CAAC;IACtC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IAC5B;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;CACrC;AAED,MAAM,WAAW,qCACf,SAAQ,IAA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face FieldData {
|
|
3
|
+
'0'?: string;
|
|
4
|
+
'1'?: string;
|
|
5
|
+
'-1'?: string;
|
|
6
|
+
'2'?: string;
|
|
7
|
+
'-2'?: string;
|
|
8
|
+
'3'?: string;
|
|
9
|
+
'-3'?: string;
|
|
10
|
+
future: RelativeTimeData;
|
|
11
|
+
past: RelativeTimeData;
|
|
12
|
+
}
|
|
4
13
|
|
|
5
14
|
export declare type FormattableUnit = Unit | Units;
|
|
6
15
|
|
|
@@ -30,8 +39,34 @@ export declare interface IntlRelativeTimeFormatOptions {
|
|
|
30
39
|
style?: 'long' | 'short' | 'narrow';
|
|
31
40
|
}
|
|
32
41
|
|
|
42
|
+
declare type LDMLPluralRule = 'zero' | 'one' | 'two' | 'few' | 'many' | 'other';
|
|
43
|
+
|
|
44
|
+
declare interface LiteralPart {
|
|
45
|
+
type: 'literal';
|
|
46
|
+
value: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
declare type Locale = string;
|
|
50
|
+
|
|
51
|
+
declare interface LocaleData<T> {
|
|
52
|
+
data: Record<Locale, T>;
|
|
53
|
+
availableLocales: string[];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
declare type LocaleFieldsData = {
|
|
57
|
+
[f in RelativeTimeField]?: FieldData;
|
|
58
|
+
} & {
|
|
59
|
+
nu?: Array<string | null>;
|
|
60
|
+
};
|
|
61
|
+
|
|
33
62
|
export declare type Part = LiteralPart | RelativeTimeFormatNumberPart;
|
|
34
63
|
|
|
64
|
+
declare type RelativeTimeData = {
|
|
65
|
+
[u in LDMLPluralRule]?: string;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
declare type RelativeTimeField = 'second' | 'second-short' | 'second-narrow' | 'minute' | 'minute-short' | 'minute-narrow' | 'hour' | 'hour-short' | 'hour-narrow' | 'day' | 'day-short' | 'day-narrow' | 'week' | 'week-short' | 'week-narrow' | 'month' | 'month-short' | 'month-narrow' | 'quarter' | 'quarter-short' | 'quarter-narrow' | 'year' | 'year-short' | 'year-narrow';
|
|
69
|
+
|
|
35
70
|
declare class RelativeTimeFormat {
|
|
36
71
|
constructor(locales?: string | string[], options?: IntlRelativeTimeFormatOptions);
|
|
37
72
|
format(value: number, unit: FormattableUnit): string;
|
|
@@ -53,6 +88,8 @@ export declare interface RelativeTimeFormatNumberPart extends Intl.NumberFormatP
|
|
|
53
88
|
unit: Unit;
|
|
54
89
|
}
|
|
55
90
|
|
|
91
|
+
declare type RelativeTimeLocaleData = LocaleData<LocaleFieldsData>;
|
|
92
|
+
|
|
56
93
|
export declare interface ResolvedIntlRelativeTimeFormatOptions extends Pick<IntlRelativeTimeFormatOptions, 'style' | 'numeric'> {
|
|
57
94
|
/**
|
|
58
95
|
* The BCP 47 language tag for the locale actually used.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formatjs/intl-relativetimeformat",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.4",
|
|
4
4
|
"description": "Formats JavaScript dates to relative time strings.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"intl",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"url": "git@github.com:formatjs/formatjs.git"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@formatjs/intl-utils": "^3.8.
|
|
23
|
+
"@formatjs/intl-utils": "^3.8.1"
|
|
24
24
|
},
|
|
25
25
|
"main": "index.js",
|
|
26
26
|
"types": "intl-relativetimeformat.d.ts",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"polyfill-force.d.ts","sourceRoot":"","sources":["../../../../../packages/intl-relativetimeformat/polyfill-force.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"polyfill.d.ts","sourceRoot":"","sources":["../../../../../packages/intl-relativetimeformat/polyfill.ts"],"names":[],"mappings":""}
|