forked from metabrainz/musicbrainz-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vars.js
187 lines (164 loc) · 4.99 KB
/
vars.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
/*
* @flow strict
* Copyright (C) 2019 MetaBrainz Foundation
*
* This file is part of MusicBrainz, the open internet music database,
* and is licensed under the GPL version 2, or (at your option) any
* later version: http://www.gnu.org/licenses/gpl-2.0.txt
*/
/*
* This file declares variables inserted by Webpack's ProvidePlugin.
* See /webpack/providePluginConfig.js.
*/
/* eslint-disable no-unused-vars */
declare var __webpack_public_path__: string;
declare var __DEV__: boolean;
declare var GLOBAL_JS_NAMESPACE: '__MB__';
declare var MUSICBRAINZ_RUNNING_TESTS: false;
declare var addColon: (variable: Expand2ReactInput) => Expand2ReactOutput;
declare var addColonText: (variable: StrOrNum) => string;
declare var addQuotes: (variable: Expand2ReactInput) => Expand2ReactOutput;
declare var addQuotesText: (variable: StrOrNum) => string;
declare var hasOwnProp: (
object: interface {},
prop: string,
) => boolean;
declare var hydrate: (
<
Config: {...},
SanitizedConfig = Config,
>(
containerSelector: string,
Component: React$AbstractComponent<Config | SanitizedConfig, mixed>,
mungeProps?: (Config) => SanitizedConfig,
) => React$AbstractComponent<Config, void>
);
declare var hyphenateTitle: (title: string, subtitle: string) => string;
declare var empty: <T>(value: ?T | '') => value is ?'';
declare var nonEmpty: <T>(value: ?T | '') => value is T;
declare var l: (key: string) => string;
declare var ln: (skey: string, pkey: string, val: number) => string;
declare var lp: (key: string, context: string) => string;
declare var N_l: (key: string) => () => string;
declare var N_ln: (skey: string, pkey: string) => (val: number) => string;
declare var N_lp: (key: string, context: string) => () => string;
declare var l_admin: typeof l;
declare var ln_admin: typeof ln;
declare var l_attributes: typeof l;
declare var ln_attributes: typeof ln;
declare var lp_attributes: typeof lp;
declare var l_countries: typeof l;
declare var ln_countries: typeof ln;
declare var lp_countries: typeof lp;
declare var l_instrument_descriptions: typeof l;
declare var ln_instrument_descriptions: typeof ln;
declare var lp_instrument_descriptions: typeof lp;
declare var l_instruments: typeof l;
declare var ln_instruments: typeof ln;
declare var lp_instruments: typeof lp;
declare var l_languages: typeof l;
declare var ln_languages: typeof ln;
declare var lp_languages: typeof lp;
declare var l_relationships: typeof l;
declare var ln_relationships: typeof ln;
declare var lp_relationships: typeof lp;
declare var l_scripts: typeof l;
declare var ln_scripts: typeof ln;
declare var lp_scripts: typeof lp;
declare var l_statistics: typeof l;
declare var ln_statistics: typeof ln;
declare var lp_statistics: typeof lp;
declare var N_l_statistics: typeof N_l;
declare var N_lp_statistics: typeof N_lp;
declare var exp: {
+l: (
key: string,
args?: ?{+[arg: string]: Expand2ReactInput, ...},
) => Expand2ReactOutput,
+l_admin: (
key: string,
args?: ?{+[arg: string]: Expand2ReactInput, ...},
) => Expand2ReactOutput,
+l_statistics: (
key: string,
args?: ?{+[arg: string]: Expand2ReactInput, ...},
) => Expand2ReactOutput,
+ln: (
skey: string,
pkey: string,
val: number,
args?: ?{+[arg: string]: Expand2ReactInput, ...},
) => Expand2ReactOutput,
+ln_admin: (
skey: string,
pkey: string,
val: number,
args?: ?{+[arg: string]: Expand2ReactInput, ...},
) => Expand2ReactOutput,
+ln_statistics: (
skey: string,
pkey: string,
val: number,
args?: ?{+[arg: string]: Expand2ReactInput, ...},
) => Expand2ReactOutput,
+lp: (
key: string,
context: string,
args?: ?{+[arg: string]: Expand2ReactInput},
) => Expand2ReactOutput,
+lp_statistics: (
key: string,
context: string,
args?: ?{+[arg: string]: Expand2ReactInput},
) => Expand2ReactOutput,
};
declare var texp: {
+l: (
key: string,
args: {+[arg: string]: StrOrNum, ...},
) => string,
+l_admin: (
key: string,
args: {+[arg: string]: StrOrNum, ...},
) => string,
+l_statistics: (
key: string,
args: {+[arg: string]: StrOrNum, ...},
) => string,
+ln: (
skey: string,
pkey: string,
val: number,
args: {+[arg: string]: StrOrNum, ...},
) => string,
+ln_admin: (
skey: string,
pkey: string,
val: number,
args: {+[arg: string]: StrOrNum, ...},
) => string,
+ln_statistics: (
skey: string,
pkey: string,
val: number,
args: {+[arg: string]: StrOrNum, ...},
) => string,
+lp: (
key: string,
context: string,
args: {+[arg: string]: StrOrNum, ...},
) => string,
+lp_statistics: (
key: string,
context: string,
args: {+[arg: string]: StrOrNum, ...},
) => string,
};
// https://flow.org/en/docs/tips/switch-statement-exhaustiveness/
declare var exhaustive: (action: empty) => void;
// root/utility/invariant.js
declare var invariant: (cond: mixed, msg?: string) => empty;
// https://github.com/facebook/flow/issues/7536
declare var globalThis: {
[globalName: string]: mixed,
};