@putout/bundle 1.10.2 → 2.0.0
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.
- package/README.md +3 -3
- package/bundle/putout-iife.js +1 -1750
- package/bundle/putout.js +177185 -99652
- package/package.json +4 -5
- package/bundle/plugin-putout.js +0 -3432
package/bundle/plugin-putout.js
DELETED
|
@@ -1,3432 +0,0 @@
|
|
|
1
|
-
import require$$0$1 from '@putout/bundle';
|
|
2
|
-
|
|
3
|
-
function _mergeNamespaces(n, m) {
|
|
4
|
-
m.forEach(function (e) {
|
|
5
|
-
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
6
|
-
if (k !== 'default' && !(k in n)) {
|
|
7
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
8
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function () { return e[k]; }
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
return Object.freeze(n);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
var addArgs_1;
|
|
19
|
-
var hasRequiredAddArgs;
|
|
20
|
-
|
|
21
|
-
function requireAddArgs () {
|
|
22
|
-
if (hasRequiredAddArgs) return addArgs_1;
|
|
23
|
-
hasRequiredAddArgs = 1;
|
|
24
|
-
|
|
25
|
-
const {operator} = require$$0$1;
|
|
26
|
-
const {addArgs} = operator;
|
|
27
|
-
|
|
28
|
-
addArgs_1 = addArgs({
|
|
29
|
-
comparePlaces: ['{comparePlaces}', [
|
|
30
|
-
'test("__a", async (__args) => __body)',
|
|
31
|
-
'test.skip("__a", async (__args) => __body)',
|
|
32
|
-
'test.only("__a", async (__args) => __body)',
|
|
33
|
-
]],
|
|
34
|
-
process: ['{process}', [
|
|
35
|
-
'test("__a", async (__args) => __body)',
|
|
36
|
-
'test.skip("__a", async (__args) => __body)',
|
|
37
|
-
'test.only("__a", async (__args) => __body)',
|
|
38
|
-
]],
|
|
39
|
-
noProcess: ['{noProcess}', [
|
|
40
|
-
'test("__a", async (__args) => __body)',
|
|
41
|
-
'test.skip("__a", async (__args) => __body)',
|
|
42
|
-
'test.only("__a", async (__args) => __body)',
|
|
43
|
-
]],
|
|
44
|
-
});
|
|
45
|
-
return addArgs_1;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
var addPush = {};
|
|
49
|
-
|
|
50
|
-
var hasRequiredAddPush;
|
|
51
|
-
|
|
52
|
-
function requireAddPush () {
|
|
53
|
-
if (hasRequiredAddPush) return addPush;
|
|
54
|
-
hasRequiredAddPush = 1;
|
|
55
|
-
|
|
56
|
-
const {types, operator} = require$$0$1;
|
|
57
|
-
|
|
58
|
-
const {traverse} = operator;
|
|
59
|
-
|
|
60
|
-
const {
|
|
61
|
-
ObjectProperty,
|
|
62
|
-
ObjectPattern,
|
|
63
|
-
Identifier,
|
|
64
|
-
} = types;
|
|
65
|
-
|
|
66
|
-
addPush.report = () => `Add 'push' argument to 'traverse'`;
|
|
67
|
-
|
|
68
|
-
addPush.fix = (path) => {
|
|
69
|
-
const computed = false;
|
|
70
|
-
const shorthand = true;
|
|
71
|
-
const name = Identifier('push');
|
|
72
|
-
|
|
73
|
-
path.node.right.params.push(ObjectPattern([
|
|
74
|
-
ObjectProperty(name, name, computed, shorthand),
|
|
75
|
-
]));
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
addPush.traverse = ({push}) => ({
|
|
79
|
-
'module.exports.traverse = (__args) => __': (traversePath) => {
|
|
80
|
-
const paramsPaths = traversePath.get('right.params');
|
|
81
|
-
|
|
82
|
-
if (paramsPaths.length)
|
|
83
|
-
return;
|
|
84
|
-
|
|
85
|
-
traverse(traversePath, {
|
|
86
|
-
'push(__)': () => {
|
|
87
|
-
push(traversePath);
|
|
88
|
-
},
|
|
89
|
-
});
|
|
90
|
-
},
|
|
91
|
-
});
|
|
92
|
-
return addPush;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
var applyAsyncFormatter = {};
|
|
96
|
-
|
|
97
|
-
var hasRequiredApplyAsyncFormatter;
|
|
98
|
-
|
|
99
|
-
function requireApplyAsyncFormatter () {
|
|
100
|
-
if (hasRequiredApplyAsyncFormatter) return applyAsyncFormatter;
|
|
101
|
-
hasRequiredApplyAsyncFormatter = 1;
|
|
102
|
-
|
|
103
|
-
const {operator, types} = require$$0$1;
|
|
104
|
-
|
|
105
|
-
const computed = true;
|
|
106
|
-
const shorthand = true;
|
|
107
|
-
|
|
108
|
-
const {
|
|
109
|
-
Identifier,
|
|
110
|
-
ObjectPattern,
|
|
111
|
-
ObjectProperty,
|
|
112
|
-
} = types;
|
|
113
|
-
|
|
114
|
-
const {compare} = operator;
|
|
115
|
-
|
|
116
|
-
applyAsyncFormatter.report = () => 'Use Async API to test Formatter';
|
|
117
|
-
|
|
118
|
-
applyAsyncFormatter.replace = () => ({
|
|
119
|
-
't.format(__args)': create('format'),
|
|
120
|
-
't.noFormat(__args)': create('noFormat'),
|
|
121
|
-
't.formatMany(__args)': create('formatMany'),
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
const create = (name) => (vars, path) => {
|
|
125
|
-
const {block} = path.scope;
|
|
126
|
-
const {body} = block.body;
|
|
127
|
-
const n = body.length - 1;
|
|
128
|
-
const nameId = Identifier(name);
|
|
129
|
-
|
|
130
|
-
block.async = true;
|
|
131
|
-
|
|
132
|
-
block.params = [
|
|
133
|
-
ObjectPattern([
|
|
134
|
-
ObjectProperty(nameId, nameId, !computed, shorthand),
|
|
135
|
-
]),
|
|
136
|
-
];
|
|
137
|
-
|
|
138
|
-
if (compare(body[n], 't.end()')) {
|
|
139
|
-
body.pop();
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
return `await ${name}(__args)`;
|
|
143
|
-
};
|
|
144
|
-
return applyAsyncFormatter;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
var applyCreateTest = {};
|
|
148
|
-
|
|
149
|
-
var hasRequiredApplyCreateTest;
|
|
150
|
-
|
|
151
|
-
function requireApplyCreateTest () {
|
|
152
|
-
if (hasRequiredApplyCreateTest) return applyCreateTest;
|
|
153
|
-
hasRequiredApplyCreateTest = 1;
|
|
154
|
-
|
|
155
|
-
applyCreateTest.report = () => `Apply 'createTest'`;
|
|
156
|
-
|
|
157
|
-
applyCreateTest.replace = () => ({
|
|
158
|
-
'require("@putout/test")(__dirname, __a)': `createTest(__dirname, __a)`,
|
|
159
|
-
});
|
|
160
|
-
return applyCreateTest;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
var applyDeclare = {};
|
|
164
|
-
|
|
165
|
-
var hasRequiredApplyDeclare;
|
|
166
|
-
|
|
167
|
-
function requireApplyDeclare () {
|
|
168
|
-
if (hasRequiredApplyDeclare) return applyDeclare;
|
|
169
|
-
hasRequiredApplyDeclare = 1;
|
|
170
|
-
|
|
171
|
-
applyDeclare.report = () => `Use 'Declarator' instead of 'operator.declare()'`;
|
|
172
|
-
|
|
173
|
-
applyDeclare.replace = () => ({
|
|
174
|
-
'module.exports = declare(__a)': 'module.exports.declare = () => __a',
|
|
175
|
-
});
|
|
176
|
-
return applyDeclare;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
var applyProcessorsDestructuring = {};
|
|
180
|
-
|
|
181
|
-
var hasRequiredApplyProcessorsDestructuring;
|
|
182
|
-
|
|
183
|
-
function requireApplyProcessorsDestructuring () {
|
|
184
|
-
if (hasRequiredApplyProcessorsDestructuring) return applyProcessorsDestructuring;
|
|
185
|
-
hasRequiredApplyProcessorsDestructuring = 1;
|
|
186
|
-
|
|
187
|
-
applyProcessorsDestructuring.report = () => 'Test operator should be destructured';
|
|
188
|
-
|
|
189
|
-
applyProcessorsDestructuring.replace = () => ({
|
|
190
|
-
'async (t) => {await t.process(__args)}': 'async ({process}) => {await process(__args)}',
|
|
191
|
-
'async (t) => {await t.noProcess(__args)}': 'async ({noProcess}) => {await noProcess(__args)}',
|
|
192
|
-
'async (t) => {await t.comparePlaces(__args)}': 'async ({comparePlaces}) => {await comparePlaces(__args)}',
|
|
193
|
-
'async (t) => {await t.process(__args); t.end();}': 'async ({process}) => {await process(__args)}',
|
|
194
|
-
'async (t) => {await t.noProcess(__args); t.end();}': 'async ({noProcess}) => {await noProcess(__args)}',
|
|
195
|
-
'async (t) => {await t.comparePlaces(__args); t.end();}': 'async ({comparePlaces}) => {await comparePlaces(__args)}',
|
|
196
|
-
});
|
|
197
|
-
return applyProcessorsDestructuring;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
var applyRemove = {};
|
|
201
|
-
|
|
202
|
-
var hasRequiredApplyRemove;
|
|
203
|
-
|
|
204
|
-
function requireApplyRemove () {
|
|
205
|
-
if (hasRequiredApplyRemove) return applyRemove;
|
|
206
|
-
hasRequiredApplyRemove = 1;
|
|
207
|
-
|
|
208
|
-
applyRemove.report = () => `Use 'remove(path)' instead of 'path.remove()'`;
|
|
209
|
-
|
|
210
|
-
applyRemove.replace = () => ({
|
|
211
|
-
'path.remove()': 'remove(path)',
|
|
212
|
-
});
|
|
213
|
-
return applyRemove;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
var checkMatch = {};
|
|
217
|
-
|
|
218
|
-
var hasRequiredCheckMatch;
|
|
219
|
-
|
|
220
|
-
function requireCheckMatch () {
|
|
221
|
-
if (hasRequiredCheckMatch) return checkMatch;
|
|
222
|
-
hasRequiredCheckMatch = 1;
|
|
223
|
-
|
|
224
|
-
const {operator, types} = require$$0$1;
|
|
225
|
-
|
|
226
|
-
const {
|
|
227
|
-
getTemplateValues,
|
|
228
|
-
traverse,
|
|
229
|
-
} = operator;
|
|
230
|
-
|
|
231
|
-
const {isStringLiteral} = types;
|
|
232
|
-
|
|
233
|
-
const PATTERN_MATCH = 'module.exports.match = () => __object';
|
|
234
|
-
const PATTERN_REPLACE = 'module.exports.replace = () => __object';
|
|
235
|
-
|
|
236
|
-
checkMatch.report = () => `☝️ Looks like 'match()' template absent in 'replace()'`;
|
|
237
|
-
|
|
238
|
-
checkMatch.replace = () => ({
|
|
239
|
-
[PATTERN_MATCH]: PATTERN_MATCH,
|
|
240
|
-
});
|
|
241
|
-
|
|
242
|
-
checkMatch.match = () => ({
|
|
243
|
-
[PATTERN_MATCH]: ({__object}, path) => {
|
|
244
|
-
const namesMatch = [];
|
|
245
|
-
|
|
246
|
-
for (const prop of __object.properties) {
|
|
247
|
-
if (!isStringLiteral(prop.key))
|
|
248
|
-
continue;
|
|
249
|
-
|
|
250
|
-
namesMatch.push(prop.key.value);
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
const namesReplace = [];
|
|
254
|
-
|
|
255
|
-
traverse(path.parentPath.parentPath, {
|
|
256
|
-
[PATTERN_REPLACE]: (path) => {
|
|
257
|
-
const {__object} = getTemplateValues(path, PATTERN_REPLACE);
|
|
258
|
-
|
|
259
|
-
for (const prop of __object.properties) {
|
|
260
|
-
if (!isStringLiteral(prop.key))
|
|
261
|
-
continue;
|
|
262
|
-
|
|
263
|
-
namesReplace.push(prop.key.value);
|
|
264
|
-
}
|
|
265
|
-
},
|
|
266
|
-
});
|
|
267
|
-
|
|
268
|
-
for (const name of namesMatch) {
|
|
269
|
-
if (!namesReplace.includes(name)) {
|
|
270
|
-
return true;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
return false;
|
|
275
|
-
},
|
|
276
|
-
});
|
|
277
|
-
return checkMatch;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
var checkReplaceCode = {};
|
|
281
|
-
|
|
282
|
-
var tryCatch;
|
|
283
|
-
var hasRequiredTryCatch;
|
|
284
|
-
|
|
285
|
-
function requireTryCatch () {
|
|
286
|
-
if (hasRequiredTryCatch) return tryCatch;
|
|
287
|
-
hasRequiredTryCatch = 1;
|
|
288
|
-
|
|
289
|
-
tryCatch = (fn, ...args) => {
|
|
290
|
-
try {
|
|
291
|
-
return [null, fn(...args)];
|
|
292
|
-
} catch(e) {
|
|
293
|
-
return [e];
|
|
294
|
-
}
|
|
295
|
-
};
|
|
296
|
-
return tryCatch;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
var generateCode;
|
|
300
|
-
var hasRequiredGenerateCode;
|
|
301
|
-
|
|
302
|
-
function requireGenerateCode () {
|
|
303
|
-
if (hasRequiredGenerateCode) return generateCode;
|
|
304
|
-
hasRequiredGenerateCode = 1;
|
|
305
|
-
|
|
306
|
-
const putout = require$$0$1;
|
|
307
|
-
const tryCatch = requireTryCatch();
|
|
308
|
-
const noop = () => {};
|
|
309
|
-
|
|
310
|
-
const {types, operator} = putout;
|
|
311
|
-
const {replaceWith} = operator;
|
|
312
|
-
|
|
313
|
-
const {
|
|
314
|
-
ArrayPattern,
|
|
315
|
-
ObjectPattern,
|
|
316
|
-
BlockStatement,
|
|
317
|
-
ObjectExpression,
|
|
318
|
-
} = types;
|
|
319
|
-
|
|
320
|
-
generateCode = (rootPath, key) => {
|
|
321
|
-
const getVar = createVarStore(rootPath);
|
|
322
|
-
|
|
323
|
-
const [transformError, result] = tryCatch(putout, key, {
|
|
324
|
-
printer: 'putout',
|
|
325
|
-
fix: true,
|
|
326
|
-
isTS: true,
|
|
327
|
-
plugins: [
|
|
328
|
-
['generate', {
|
|
329
|
-
report: noop,
|
|
330
|
-
include: () => [
|
|
331
|
-
'Identifier',
|
|
332
|
-
'StringLiteral',
|
|
333
|
-
],
|
|
334
|
-
fix: (path) => {
|
|
335
|
-
const {node} = path;
|
|
336
|
-
|
|
337
|
-
const {value, name} = node;
|
|
338
|
-
|
|
339
|
-
if (path.isStringLiteral() && /^__[a-z]$/.test(value)) {
|
|
340
|
-
path.node.value = getVar(name);
|
|
341
|
-
return;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
if (/^__identifier__[a-z]$/.test(name)) {
|
|
345
|
-
path.node.name = getVar(name);
|
|
346
|
-
return;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
if (/^__[a-z]$/.test(name)) {
|
|
350
|
-
path.node.name = getVar(name);
|
|
351
|
-
return;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
if (/__args/.test(name)) {
|
|
355
|
-
path.node.name = getVar(name);
|
|
356
|
-
return;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
if (name === '__array') {
|
|
360
|
-
if (path.parentPath.isVariableDeclarator())
|
|
361
|
-
return replaceWith(path, ArrayPattern([]));
|
|
362
|
-
|
|
363
|
-
if (path.parentPath.isCallExpression())
|
|
364
|
-
return replaceWith(path, ArrayPattern([]));
|
|
365
|
-
|
|
366
|
-
if (path.parentPath.isFunction())
|
|
367
|
-
return replaceWith(path, ArrayPattern([]));
|
|
368
|
-
|
|
369
|
-
if (path.parentPath.isAssignmentExpression())
|
|
370
|
-
return replaceWith(path, ArrayPattern([]));
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
if (name === '__object') {
|
|
374
|
-
return objectify(path);
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
if (name === '__body') {
|
|
378
|
-
replaceWith(path, BlockStatement([]));
|
|
379
|
-
}
|
|
380
|
-
},
|
|
381
|
-
}],
|
|
382
|
-
],
|
|
383
|
-
});
|
|
384
|
-
|
|
385
|
-
return [
|
|
386
|
-
transformError,
|
|
387
|
-
result?.code,
|
|
388
|
-
];
|
|
389
|
-
};
|
|
390
|
-
|
|
391
|
-
function createVarStore(path) {
|
|
392
|
-
const store = {};
|
|
393
|
-
|
|
394
|
-
return (name) => {
|
|
395
|
-
if (store[name])
|
|
396
|
-
return store[name];
|
|
397
|
-
|
|
398
|
-
store[name] = path.scope.generateUid();
|
|
399
|
-
|
|
400
|
-
return store[name];
|
|
401
|
-
};
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
function objectify(path) {
|
|
405
|
-
const {parentPath} = path;
|
|
406
|
-
const isVar = parentPath.isVariableDeclarator();
|
|
407
|
-
const isAssign = parentPath.isAssignmentExpression();
|
|
408
|
-
|
|
409
|
-
if (isVar && parentPath.get('id') === path)
|
|
410
|
-
return replaceWith(path, ObjectPattern([]));
|
|
411
|
-
|
|
412
|
-
if (isAssign && parentPath.get('right') === path)
|
|
413
|
-
return replaceWith(path, ObjectExpression([]));
|
|
414
|
-
}
|
|
415
|
-
return generateCode;
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
var hasRequiredCheckReplaceCode;
|
|
419
|
-
|
|
420
|
-
function requireCheckReplaceCode () {
|
|
421
|
-
if (hasRequiredCheckReplaceCode) return checkReplaceCode;
|
|
422
|
-
hasRequiredCheckReplaceCode = 1;
|
|
423
|
-
|
|
424
|
-
const putout = require$$0$1;
|
|
425
|
-
const tryCatch = requireTryCatch();
|
|
426
|
-
const generateCode = requireGenerateCode();
|
|
427
|
-
const noop = () => {};
|
|
428
|
-
const {operator} = putout;
|
|
429
|
-
const {
|
|
430
|
-
compare,
|
|
431
|
-
extract,
|
|
432
|
-
compute,
|
|
433
|
-
} = operator;
|
|
434
|
-
|
|
435
|
-
const name = '__putout_plugin_check_replace_code';
|
|
436
|
-
const get = (path) => path[name];
|
|
437
|
-
const set = (path) => path[name] = true;
|
|
438
|
-
|
|
439
|
-
const rmSemi = (a) => {
|
|
440
|
-
a = a.replace(';;', ';');
|
|
441
|
-
a = a.replace(/;$/, '');
|
|
442
|
-
|
|
443
|
-
return a;
|
|
444
|
-
};
|
|
445
|
-
|
|
446
|
-
checkReplaceCode.report = ({path, code, error}) => {
|
|
447
|
-
if (error)
|
|
448
|
-
return error.message;
|
|
449
|
-
|
|
450
|
-
const [, key] = parseKey(path);
|
|
451
|
-
const value = extract(path.node.value);
|
|
452
|
-
|
|
453
|
-
return `transform mismatch: "${key}" -> "${value}" !== "${code}"`;
|
|
454
|
-
};
|
|
455
|
-
|
|
456
|
-
checkReplaceCode.fix = ({mainPath}) => {
|
|
457
|
-
set(mainPath);
|
|
458
|
-
};
|
|
459
|
-
|
|
460
|
-
checkReplaceCode.traverse = ({push}) => ({
|
|
461
|
-
'module.exports.replace = () => __a': (path) => {
|
|
462
|
-
if (get(path))
|
|
463
|
-
return;
|
|
464
|
-
|
|
465
|
-
if (hasMatch(path))
|
|
466
|
-
return;
|
|
467
|
-
|
|
468
|
-
for (const propertyPath of path.get('right.body.properties')) {
|
|
469
|
-
if (!propertyPath.get('value').isStringLiteral())
|
|
470
|
-
continue;
|
|
471
|
-
|
|
472
|
-
const {node} = propertyPath;
|
|
473
|
-
const [parseError, key] = parseKey(propertyPath);
|
|
474
|
-
|
|
475
|
-
if (parseError) {
|
|
476
|
-
push({
|
|
477
|
-
error: parseError,
|
|
478
|
-
mainPath: path,
|
|
479
|
-
path: propertyPath,
|
|
480
|
-
});
|
|
481
|
-
|
|
482
|
-
return;
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
const template = extract(node.value);
|
|
486
|
-
const [generateError, keyCode] = generateCode(path, key);
|
|
487
|
-
|
|
488
|
-
if (generateError) {
|
|
489
|
-
push({
|
|
490
|
-
error: generateError,
|
|
491
|
-
mainPath: path,
|
|
492
|
-
path: propertyPath,
|
|
493
|
-
});
|
|
494
|
-
|
|
495
|
-
return;
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
const [transformError, result] = tryCatch(putout, keyCode, {
|
|
499
|
-
printer: 'putout',
|
|
500
|
-
fix: true,
|
|
501
|
-
isTS: true,
|
|
502
|
-
plugins: [
|
|
503
|
-
['evaluate', {
|
|
504
|
-
report: noop,
|
|
505
|
-
replace: () => ({
|
|
506
|
-
[key]: template,
|
|
507
|
-
}),
|
|
508
|
-
}],
|
|
509
|
-
],
|
|
510
|
-
});
|
|
511
|
-
|
|
512
|
-
if (transformError) {
|
|
513
|
-
push({
|
|
514
|
-
error: transformError,
|
|
515
|
-
mainPath: path,
|
|
516
|
-
path: propertyPath,
|
|
517
|
-
});
|
|
518
|
-
|
|
519
|
-
return;
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
const code = result.code.slice(0, -1);
|
|
523
|
-
const [error, is] = tryCatch(compare, rmSemi(code), template);
|
|
524
|
-
|
|
525
|
-
if (error || !is)
|
|
526
|
-
push({
|
|
527
|
-
code,
|
|
528
|
-
mainPath: path,
|
|
529
|
-
path: propertyPath,
|
|
530
|
-
});
|
|
531
|
-
}
|
|
532
|
-
},
|
|
533
|
-
});
|
|
534
|
-
|
|
535
|
-
function parseKey(propertyPath) {
|
|
536
|
-
const keyPath = propertyPath.get('key');
|
|
537
|
-
const [isComputed, key] = compute(keyPath);
|
|
538
|
-
|
|
539
|
-
if (!isComputed)
|
|
540
|
-
return [
|
|
541
|
-
Error(`Replace key cannot be computed: '${keyPath.toString()}'`),
|
|
542
|
-
];
|
|
543
|
-
|
|
544
|
-
return [null, key];
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
function hasMatch(path) {
|
|
548
|
-
const {body} = path.scope.getProgramParent().path.node;
|
|
549
|
-
|
|
550
|
-
for (const current of body) {
|
|
551
|
-
if (compare(current, 'module.exports.match = __a'))
|
|
552
|
-
return true;
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
return false;
|
|
556
|
-
}
|
|
557
|
-
return checkReplaceCode;
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
var convertAddArgumentToAddArgs = {};
|
|
561
|
-
|
|
562
|
-
var hasRequiredConvertAddArgumentToAddArgs;
|
|
563
|
-
|
|
564
|
-
function requireConvertAddArgumentToAddArgs () {
|
|
565
|
-
if (hasRequiredConvertAddArgumentToAddArgs) return convertAddArgumentToAddArgs;
|
|
566
|
-
hasRequiredConvertAddArgumentToAddArgs = 1;
|
|
567
|
-
|
|
568
|
-
const {operator} = require$$0$1;
|
|
569
|
-
const {rename} = operator;
|
|
570
|
-
|
|
571
|
-
convertAddArgumentToAddArgs.report = () => 'Use addArgs instead of addArgument';
|
|
572
|
-
|
|
573
|
-
convertAddArgumentToAddArgs.replace = () => ({
|
|
574
|
-
'addArgument(__args)': (vars, path) => {
|
|
575
|
-
const program = path.scope.getProgramParent().path;
|
|
576
|
-
rename(program, 'addArgument', 'addArgs');
|
|
577
|
-
|
|
578
|
-
return path;
|
|
579
|
-
},
|
|
580
|
-
});
|
|
581
|
-
return convertAddArgumentToAddArgs;
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
var convertBabelTypes = {};
|
|
585
|
-
|
|
586
|
-
var hasRequiredConvertBabelTypes;
|
|
587
|
-
|
|
588
|
-
function requireConvertBabelTypes () {
|
|
589
|
-
if (hasRequiredConvertBabelTypes) return convertBabelTypes;
|
|
590
|
-
hasRequiredConvertBabelTypes = 1;
|
|
591
|
-
|
|
592
|
-
const {operator, template} = require$$0$1;
|
|
593
|
-
|
|
594
|
-
const {replaceWith} = operator;
|
|
595
|
-
|
|
596
|
-
const astRequire = template.ast(`
|
|
597
|
-
require('putout').types
|
|
598
|
-
`);
|
|
599
|
-
|
|
600
|
-
convertBabelTypes.report = () => {
|
|
601
|
-
return `"putout.types" should be used instead of "@babel/types"`;
|
|
602
|
-
};
|
|
603
|
-
|
|
604
|
-
function isRequire(path) {
|
|
605
|
-
return path
|
|
606
|
-
.get('callee')
|
|
607
|
-
.isIdentifier({
|
|
608
|
-
name: 'require',
|
|
609
|
-
});
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
function isBabelTypes(path) {
|
|
613
|
-
return path
|
|
614
|
-
.get('arguments.0')
|
|
615
|
-
.isStringLiteral({
|
|
616
|
-
value: '@babel/types',
|
|
617
|
-
});
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
convertBabelTypes.traverse = ({push}) => ({
|
|
621
|
-
CallExpression(path) {
|
|
622
|
-
if (!isRequire(path))
|
|
623
|
-
return;
|
|
624
|
-
|
|
625
|
-
if (!isBabelTypes(path))
|
|
626
|
-
return;
|
|
627
|
-
|
|
628
|
-
push(path);
|
|
629
|
-
},
|
|
630
|
-
});
|
|
631
|
-
|
|
632
|
-
convertBabelTypes.fix = (path) => {
|
|
633
|
-
replaceWith(path, astRequire);
|
|
634
|
-
};
|
|
635
|
-
return convertBabelTypes;
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
var convertDestructuringToIdentifier = {};
|
|
639
|
-
|
|
640
|
-
var hasRequiredConvertDestructuringToIdentifier;
|
|
641
|
-
|
|
642
|
-
function requireConvertDestructuringToIdentifier () {
|
|
643
|
-
if (hasRequiredConvertDestructuringToIdentifier) return convertDestructuringToIdentifier;
|
|
644
|
-
hasRequiredConvertDestructuringToIdentifier = 1;
|
|
645
|
-
|
|
646
|
-
const {compare} = require$$0$1.operator;
|
|
647
|
-
|
|
648
|
-
convertDestructuringToIdentifier.report = () => 'Identifier should be used instead of empty destructuring';
|
|
649
|
-
|
|
650
|
-
convertDestructuringToIdentifier.match = () => ({
|
|
651
|
-
'({}) => __body': (vars, path) => findUp(path, 'module.exports.__a = __'),
|
|
652
|
-
'({}, __a) => __body': (vars, path) => findUp(path, 'module.exports.__a = __'),
|
|
653
|
-
});
|
|
654
|
-
|
|
655
|
-
convertDestructuringToIdentifier.replace = () => ({
|
|
656
|
-
'({}) => __body': '(vars) => __body',
|
|
657
|
-
'({}, __a) => __body': '(vars, __a) => __body',
|
|
658
|
-
});
|
|
659
|
-
|
|
660
|
-
function findUp(path, str) {
|
|
661
|
-
while (!path.isProgram()) {
|
|
662
|
-
if (path.isAssignmentExpression()) {
|
|
663
|
-
return compare(path, str);
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
path = path.parentPath;
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
return false;
|
|
670
|
-
}
|
|
671
|
-
return convertDestructuringToIdentifier;
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
var convertDirnameToUrl = {};
|
|
675
|
-
|
|
676
|
-
var hasRequiredConvertDirnameToUrl;
|
|
677
|
-
|
|
678
|
-
function requireConvertDirnameToUrl () {
|
|
679
|
-
if (hasRequiredConvertDirnameToUrl) return convertDirnameToUrl;
|
|
680
|
-
hasRequiredConvertDirnameToUrl = 1;
|
|
681
|
-
|
|
682
|
-
const {operator} = require$$0$1;
|
|
683
|
-
const {isESM} = operator;
|
|
684
|
-
|
|
685
|
-
convertDirnameToUrl.report = () => `Use 'createTest(import.meta.url)' instead of 'createTest(__dirname)'`;
|
|
686
|
-
|
|
687
|
-
convertDirnameToUrl.match = () => ({
|
|
688
|
-
'createTest(__dirname, __a)': (vars, path) => isESM(path),
|
|
689
|
-
});
|
|
690
|
-
|
|
691
|
-
convertDirnameToUrl.replace = () => ({
|
|
692
|
-
'createTest(__dirname, __a)': 'createTest(import.meta.url, __a)',
|
|
693
|
-
});
|
|
694
|
-
return convertDirnameToUrl;
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
var convertFindToTraverse = {};
|
|
698
|
-
|
|
699
|
-
var hasRequiredConvertFindToTraverse;
|
|
700
|
-
|
|
701
|
-
function requireConvertFindToTraverse () {
|
|
702
|
-
if (hasRequiredConvertFindToTraverse) return convertFindToTraverse;
|
|
703
|
-
hasRequiredConvertFindToTraverse = 1;
|
|
704
|
-
|
|
705
|
-
const {types, operator} = require$$0$1;
|
|
706
|
-
|
|
707
|
-
const {replaceWith} = operator;
|
|
708
|
-
|
|
709
|
-
const {
|
|
710
|
-
ReturnStatement,
|
|
711
|
-
isCallExpression,
|
|
712
|
-
isIdentifier,
|
|
713
|
-
} = types;
|
|
714
|
-
|
|
715
|
-
const {entries} = Object;
|
|
716
|
-
|
|
717
|
-
convertFindToTraverse.report = () => '"traverse" should be used instead of "find"';
|
|
718
|
-
|
|
719
|
-
const fixType = (types) => (path) => {
|
|
720
|
-
for (const [is, fix] of entries(types)) {
|
|
721
|
-
if (path[is]())
|
|
722
|
-
fix(path);
|
|
723
|
-
}
|
|
724
|
-
};
|
|
725
|
-
|
|
726
|
-
convertFindToTraverse.fix = fixType({
|
|
727
|
-
isMemberExpression: (path) => {
|
|
728
|
-
path.get('property').node.name = 'traverse';
|
|
729
|
-
},
|
|
730
|
-
isFunction: (path) => {
|
|
731
|
-
path.node.params = [path.node.params[1]];
|
|
732
|
-
},
|
|
733
|
-
isCallExpression: (path) => {
|
|
734
|
-
replaceWith(path, ReturnStatement(path.node.arguments[1]));
|
|
735
|
-
},
|
|
736
|
-
});
|
|
737
|
-
|
|
738
|
-
convertFindToTraverse.traverse = ({push}) => ({
|
|
739
|
-
'module.exports.find = (__args) => __'(path) {
|
|
740
|
-
const leftPath = path.get('left');
|
|
741
|
-
const rightPath = path.get('right');
|
|
742
|
-
|
|
743
|
-
if (rightPath.node.params.length !== 2)
|
|
744
|
-
return;
|
|
745
|
-
|
|
746
|
-
if (!isTraverseLastExpression(rightPath.node.body.body))
|
|
747
|
-
return;
|
|
748
|
-
|
|
749
|
-
const traverseCallPath = getTraverseCall(rightPath);
|
|
750
|
-
push(traverseCallPath);
|
|
751
|
-
push(leftPath);
|
|
752
|
-
push(rightPath);
|
|
753
|
-
},
|
|
754
|
-
});
|
|
755
|
-
|
|
756
|
-
function isTraverseLastExpression(body) {
|
|
757
|
-
const n = body.length - 1;
|
|
758
|
-
const {expression} = body[n];
|
|
759
|
-
|
|
760
|
-
if (!isCallExpression(expression))
|
|
761
|
-
return false;
|
|
762
|
-
|
|
763
|
-
const {callee} = expression;
|
|
764
|
-
|
|
765
|
-
return isIdentifier(callee, {
|
|
766
|
-
name: 'traverse',
|
|
767
|
-
});
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
function getTraverseCall(path) {
|
|
771
|
-
let result;
|
|
772
|
-
|
|
773
|
-
path.traverse({
|
|
774
|
-
CallExpression(path) {
|
|
775
|
-
if (!path.get('callee').isIdentifier({name: 'traverse'}))
|
|
776
|
-
return;
|
|
777
|
-
|
|
778
|
-
result = path;
|
|
779
|
-
|
|
780
|
-
path.stop();
|
|
781
|
-
},
|
|
782
|
-
});
|
|
783
|
-
|
|
784
|
-
return result;
|
|
785
|
-
}
|
|
786
|
-
return convertFindToTraverse;
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
var convertMatchToFunction = {};
|
|
790
|
-
|
|
791
|
-
var hasRequiredConvertMatchToFunction;
|
|
792
|
-
|
|
793
|
-
function requireConvertMatchToFunction () {
|
|
794
|
-
if (hasRequiredConvertMatchToFunction) return convertMatchToFunction;
|
|
795
|
-
hasRequiredConvertMatchToFunction = 1;
|
|
796
|
-
|
|
797
|
-
convertMatchToFunction.report = () => `'match' should be a function`;
|
|
798
|
-
|
|
799
|
-
convertMatchToFunction.replace = () => ({
|
|
800
|
-
'module.exports.match= __object': 'module.exports.match = () => __object',
|
|
801
|
-
});
|
|
802
|
-
return convertMatchToFunction;
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
var convertMethodToProperty = {};
|
|
806
|
-
|
|
807
|
-
var hasRequiredConvertMethodToProperty;
|
|
808
|
-
|
|
809
|
-
function requireConvertMethodToProperty () {
|
|
810
|
-
if (hasRequiredConvertMethodToProperty) return convertMethodToProperty;
|
|
811
|
-
hasRequiredConvertMethodToProperty = 1;
|
|
812
|
-
|
|
813
|
-
const {types, operator} = require$$0$1;
|
|
814
|
-
|
|
815
|
-
const {replaceWith} = operator;
|
|
816
|
-
const {ObjectProperty} = types;
|
|
817
|
-
|
|
818
|
-
convertMethodToProperty.report = () => 'Object Property should be used instead of Method';
|
|
819
|
-
|
|
820
|
-
convertMethodToProperty.include = () => [
|
|
821
|
-
'ObjectMethod',
|
|
822
|
-
];
|
|
823
|
-
|
|
824
|
-
convertMethodToProperty.filter = (path) => {
|
|
825
|
-
if (!path.node.params.length)
|
|
826
|
-
return false;
|
|
827
|
-
|
|
828
|
-
const firstPath = path.get('params.0');
|
|
829
|
-
|
|
830
|
-
if (!firstPath.isObjectPattern())
|
|
831
|
-
return false;
|
|
832
|
-
|
|
833
|
-
return !firstPath.node.properties.length;
|
|
834
|
-
};
|
|
835
|
-
|
|
836
|
-
convertMethodToProperty.fix = (path) => {
|
|
837
|
-
const keyPath = path.get('key');
|
|
838
|
-
|
|
839
|
-
path.node.type = 'ArrowFunctionExpression';
|
|
840
|
-
path.node.id = null;
|
|
841
|
-
|
|
842
|
-
replaceWith(path, ObjectProperty(keyPath.node, path.node));
|
|
843
|
-
};
|
|
844
|
-
return convertMethodToProperty;
|
|
845
|
-
}
|
|
846
|
-
|
|
847
|
-
var convertNodeToPathInGetTemplateValues = {};
|
|
848
|
-
|
|
849
|
-
var hasRequiredConvertNodeToPathInGetTemplateValues;
|
|
850
|
-
|
|
851
|
-
function requireConvertNodeToPathInGetTemplateValues () {
|
|
852
|
-
if (hasRequiredConvertNodeToPathInGetTemplateValues) return convertNodeToPathInGetTemplateValues;
|
|
853
|
-
hasRequiredConvertNodeToPathInGetTemplateValues = 1;
|
|
854
|
-
|
|
855
|
-
const {types, operator} = require$$0$1;
|
|
856
|
-
|
|
857
|
-
const {
|
|
858
|
-
compare,
|
|
859
|
-
replaceWith,
|
|
860
|
-
getTemplateValues,
|
|
861
|
-
} = operator;
|
|
862
|
-
|
|
863
|
-
const {
|
|
864
|
-
isVariableDeclarator,
|
|
865
|
-
isArrayPattern,
|
|
866
|
-
} = types;
|
|
867
|
-
|
|
868
|
-
convertNodeToPathInGetTemplateValues.report = () => '"path" should be used instead of "node" in getTemplateValues';
|
|
869
|
-
|
|
870
|
-
const GET_TEMPLATE_VALUES_NODE = 'getTemplateValues(__a.node, __b)';
|
|
871
|
-
|
|
872
|
-
convertNodeToPathInGetTemplateValues.fix = ({path, __aPath, init}) => {
|
|
873
|
-
if (compare(path, GET_TEMPLATE_VALUES_NODE)) {
|
|
874
|
-
const {__a} = getTemplateValues(path, GET_TEMPLATE_VALUES_NODE);
|
|
875
|
-
replaceWith(__aPath, __a);
|
|
876
|
-
|
|
877
|
-
return;
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
replaceWith(__aPath, init);
|
|
881
|
-
};
|
|
882
|
-
|
|
883
|
-
convertNodeToPathInGetTemplateValues.traverse = ({push}) => ({
|
|
884
|
-
'getTemplateValues(__a, __b)': (path) => {
|
|
885
|
-
const {scope} = path;
|
|
886
|
-
const {bindings} = scope;
|
|
887
|
-
const __aPath = path.get('arguments.0');
|
|
888
|
-
|
|
889
|
-
if (__aPath.isMemberExpression()) {
|
|
890
|
-
push({
|
|
891
|
-
path,
|
|
892
|
-
__aPath,
|
|
893
|
-
});
|
|
894
|
-
|
|
895
|
-
return;
|
|
896
|
-
}
|
|
897
|
-
|
|
898
|
-
const {name} = __aPath.node;
|
|
899
|
-
const binding = bindings[name];
|
|
900
|
-
|
|
901
|
-
if (!binding)
|
|
902
|
-
return;
|
|
903
|
-
|
|
904
|
-
const bindingNode = binding.path.node;
|
|
905
|
-
|
|
906
|
-
if (!isVariableDeclarator(bindingNode))
|
|
907
|
-
return;
|
|
908
|
-
|
|
909
|
-
if (isArrayPattern(bindingNode.id))
|
|
910
|
-
return;
|
|
911
|
-
|
|
912
|
-
const {init} = bindingNode;
|
|
913
|
-
|
|
914
|
-
push({
|
|
915
|
-
init,
|
|
916
|
-
path,
|
|
917
|
-
__aPath,
|
|
918
|
-
});
|
|
919
|
-
},
|
|
920
|
-
});
|
|
921
|
-
return convertNodeToPathInGetTemplateValues;
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
var convertNumberToNumeric = {};
|
|
925
|
-
|
|
926
|
-
var hasRequiredConvertNumberToNumeric;
|
|
927
|
-
|
|
928
|
-
function requireConvertNumberToNumeric () {
|
|
929
|
-
if (hasRequiredConvertNumberToNumeric) return convertNumberToNumeric;
|
|
930
|
-
hasRequiredConvertNumberToNumeric = 1;
|
|
931
|
-
|
|
932
|
-
const {operator} = require$$0$1;
|
|
933
|
-
const {rename} = operator;
|
|
934
|
-
|
|
935
|
-
convertNumberToNumeric.report = () => `Use 'isNumericLiteral()' instead of 'isNumberLiteral()'`;
|
|
936
|
-
|
|
937
|
-
convertNumberToNumeric.fix = (path) => {
|
|
938
|
-
const bindings = path.scope.getAllBindings();
|
|
939
|
-
const {name} = path.node.callee;
|
|
940
|
-
const program = path.scope.getProgramParent().path;
|
|
941
|
-
|
|
942
|
-
if (!bindings.isNumericLiteral)
|
|
943
|
-
rename(program, 'isNumberLiteral', 'isNumericLiteral');
|
|
944
|
-
|
|
945
|
-
if (!bindings.NumericLiteral)
|
|
946
|
-
rename(program, 'NumberLiteral', 'NumericLiteral');
|
|
947
|
-
|
|
948
|
-
path.node.callee.name = name.replace('Number', 'Numeric');
|
|
949
|
-
};
|
|
950
|
-
|
|
951
|
-
convertNumberToNumeric.include = () => [
|
|
952
|
-
'isNumberLiteral(__a)',
|
|
953
|
-
'NumberLiteral(__a)',
|
|
954
|
-
];
|
|
955
|
-
return convertNumberToNumeric;
|
|
956
|
-
}
|
|
957
|
-
|
|
958
|
-
var convertProcessToFind = {};
|
|
959
|
-
|
|
960
|
-
var hasRequiredConvertProcessToFind;
|
|
961
|
-
|
|
962
|
-
function requireConvertProcessToFind () {
|
|
963
|
-
if (hasRequiredConvertProcessToFind) return convertProcessToFind;
|
|
964
|
-
hasRequiredConvertProcessToFind = 1;
|
|
965
|
-
|
|
966
|
-
const {replaceWith} = require$$0$1.operator;
|
|
967
|
-
|
|
968
|
-
convertProcessToFind.report = () => 'Use find instead of process';
|
|
969
|
-
|
|
970
|
-
convertProcessToFind.replace = () => ({
|
|
971
|
-
'module.exports.preProcess = __a': 'module.exports.branch = __a',
|
|
972
|
-
'module.exports.postProcess = __a ': 'module.exports.merge = __a',
|
|
973
|
-
'module.exports.process = __a': (vars, path) => {
|
|
974
|
-
const fnPath = path.get('right');
|
|
975
|
-
const {params} = fnPath.node;
|
|
976
|
-
|
|
977
|
-
if (params.length > 1)
|
|
978
|
-
params.pop();
|
|
979
|
-
|
|
980
|
-
fnPath.traverse({
|
|
981
|
-
ReturnStatement: (path) => {
|
|
982
|
-
const argPath = path.get('argument');
|
|
983
|
-
|
|
984
|
-
if (argPath.isArrayExpression()) {
|
|
985
|
-
const [, places] = argPath.node.elements;
|
|
986
|
-
replaceWith(argPath, places);
|
|
987
|
-
}
|
|
988
|
-
},
|
|
989
|
-
});
|
|
990
|
-
|
|
991
|
-
return 'module.exports.find = __a';
|
|
992
|
-
},
|
|
993
|
-
});
|
|
994
|
-
return convertProcessToFind;
|
|
995
|
-
}
|
|
996
|
-
|
|
997
|
-
var convertPutoutTestToCreateTest = {};
|
|
998
|
-
|
|
999
|
-
var hasRequiredConvertPutoutTestToCreateTest;
|
|
1000
|
-
|
|
1001
|
-
function requireConvertPutoutTestToCreateTest () {
|
|
1002
|
-
if (hasRequiredConvertPutoutTestToCreateTest) return convertPutoutTestToCreateTest;
|
|
1003
|
-
hasRequiredConvertPutoutTestToCreateTest = 1;
|
|
1004
|
-
|
|
1005
|
-
const {assign} = Object;
|
|
1006
|
-
|
|
1007
|
-
convertPutoutTestToCreateTest.report = () => `Use 'createTest' instead of 'putoutTest'`;
|
|
1008
|
-
convertPutoutTestToCreateTest.filter = ({scope}) => !scope.bindings.createTest;
|
|
1009
|
-
|
|
1010
|
-
convertPutoutTestToCreateTest.include = () => [
|
|
1011
|
-
'import putoutTest from "@putout/test"',
|
|
1012
|
-
];
|
|
1013
|
-
|
|
1014
|
-
convertPutoutTestToCreateTest.fix = (path) => {
|
|
1015
|
-
const [first] = path.node.specifiers;
|
|
1016
|
-
|
|
1017
|
-
assign(first, {
|
|
1018
|
-
type: 'ImportSpecifier',
|
|
1019
|
-
kind: 'value',
|
|
1020
|
-
imported: first.local,
|
|
1021
|
-
});
|
|
1022
|
-
|
|
1023
|
-
path.scope.rename('putoutTest', 'createTest');
|
|
1024
|
-
};
|
|
1025
|
-
return convertPutoutTestToCreateTest;
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
|
-
var convertReplaceToFunction = {};
|
|
1029
|
-
|
|
1030
|
-
var hasRequiredConvertReplaceToFunction;
|
|
1031
|
-
|
|
1032
|
-
function requireConvertReplaceToFunction () {
|
|
1033
|
-
if (hasRequiredConvertReplaceToFunction) return convertReplaceToFunction;
|
|
1034
|
-
hasRequiredConvertReplaceToFunction = 1;
|
|
1035
|
-
|
|
1036
|
-
convertReplaceToFunction.report = () => `'replace' should be a function`;
|
|
1037
|
-
|
|
1038
|
-
convertReplaceToFunction.replace = () => ({
|
|
1039
|
-
'module.exports.replace = __object': 'module.exports.replace = () => __object',
|
|
1040
|
-
});
|
|
1041
|
-
return convertReplaceToFunction;
|
|
1042
|
-
}
|
|
1043
|
-
|
|
1044
|
-
var convertReplaceWith = {};
|
|
1045
|
-
|
|
1046
|
-
var fullstore;
|
|
1047
|
-
var hasRequiredFullstore;
|
|
1048
|
-
|
|
1049
|
-
function requireFullstore () {
|
|
1050
|
-
if (hasRequiredFullstore) return fullstore;
|
|
1051
|
-
hasRequiredFullstore = 1;
|
|
1052
|
-
|
|
1053
|
-
fullstore = (value) => {
|
|
1054
|
-
const data = {
|
|
1055
|
-
value,
|
|
1056
|
-
};
|
|
1057
|
-
|
|
1058
|
-
return (...args) => {
|
|
1059
|
-
const [value] = args;
|
|
1060
|
-
|
|
1061
|
-
if (!args.length)
|
|
1062
|
-
return data.value;
|
|
1063
|
-
|
|
1064
|
-
data.value = value;
|
|
1065
|
-
|
|
1066
|
-
return value;
|
|
1067
|
-
};
|
|
1068
|
-
};
|
|
1069
|
-
return fullstore;
|
|
1070
|
-
}
|
|
1071
|
-
|
|
1072
|
-
var hasRequiredConvertReplaceWith;
|
|
1073
|
-
|
|
1074
|
-
function requireConvertReplaceWith () {
|
|
1075
|
-
if (hasRequiredConvertReplaceWith) return convertReplaceWith;
|
|
1076
|
-
hasRequiredConvertReplaceWith = 1;
|
|
1077
|
-
|
|
1078
|
-
const {
|
|
1079
|
-
operator,
|
|
1080
|
-
template,
|
|
1081
|
-
types,
|
|
1082
|
-
} = require$$0$1;
|
|
1083
|
-
|
|
1084
|
-
const fullstore = requireFullstore();
|
|
1085
|
-
|
|
1086
|
-
const {Identifier, ObjectProperty} = types;
|
|
1087
|
-
const {replaceWith, insertAfter} = operator;
|
|
1088
|
-
|
|
1089
|
-
const isRecast = (program) => program.get('body.0.expression').isStringLiteral({
|
|
1090
|
-
value: 'use strict',
|
|
1091
|
-
});
|
|
1092
|
-
|
|
1093
|
-
convertReplaceWith.report = () => {
|
|
1094
|
-
return `"operator.replaceWith" should be called instead of "path.replaceWith"`;
|
|
1095
|
-
};
|
|
1096
|
-
|
|
1097
|
-
convertReplaceWith.fix = ({path, calleePath, property, object, program, isInserted}) => {
|
|
1098
|
-
replaceWith(calleePath, property);
|
|
1099
|
-
const {bindings} = program.scope;
|
|
1100
|
-
|
|
1101
|
-
path.node.arguments.unshift(object);
|
|
1102
|
-
|
|
1103
|
-
if (bindings.replaceWith || isInserted())
|
|
1104
|
-
return;
|
|
1105
|
-
|
|
1106
|
-
if (!bindings.replaceWithMultiple && !bindings.insertAfter && !isInserted()) {
|
|
1107
|
-
const replaceWithAST = template.ast.fresh(`
|
|
1108
|
-
const {replaceWith} = require('putout').operator;
|
|
1109
|
-
`);
|
|
1110
|
-
|
|
1111
|
-
const {types} = bindings;
|
|
1112
|
-
const first = program.get('body.0');
|
|
1113
|
-
const pathToInsert = types ? types.path.parentPath : first;
|
|
1114
|
-
|
|
1115
|
-
if (isRecast(program))
|
|
1116
|
-
insertAfter(pathToInsert, replaceWithAST);
|
|
1117
|
-
else if (types)
|
|
1118
|
-
insertAfter(pathToInsert, replaceWithAST);
|
|
1119
|
-
else
|
|
1120
|
-
pathToInsert.insertBefore(replaceWithAST);
|
|
1121
|
-
|
|
1122
|
-
isInserted(true);
|
|
1123
|
-
|
|
1124
|
-
return;
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
|
-
const id = Identifier('replaceWith');
|
|
1128
|
-
const varPath = getVarPath(bindings);
|
|
1129
|
-
|
|
1130
|
-
varPath.node.id.properties.unshift(ObjectProperty(id, id, false, true));
|
|
1131
|
-
};
|
|
1132
|
-
|
|
1133
|
-
function getVarPath(bindings) {
|
|
1134
|
-
const {
|
|
1135
|
-
replaceWithMultiple,
|
|
1136
|
-
insertAfter,
|
|
1137
|
-
} = bindings;
|
|
1138
|
-
|
|
1139
|
-
if (replaceWithMultiple)
|
|
1140
|
-
return replaceWithMultiple.path;
|
|
1141
|
-
|
|
1142
|
-
return insertAfter.path;
|
|
1143
|
-
}
|
|
1144
|
-
|
|
1145
|
-
convertReplaceWith.traverse = ({push}) => {
|
|
1146
|
-
const isInserted = fullstore();
|
|
1147
|
-
|
|
1148
|
-
return {
|
|
1149
|
-
CallExpression(path) {
|
|
1150
|
-
const calleePath = path.get('callee');
|
|
1151
|
-
|
|
1152
|
-
if (!calleePath.isMemberExpression())
|
|
1153
|
-
return;
|
|
1154
|
-
|
|
1155
|
-
const {object, property} = calleePath.node;
|
|
1156
|
-
|
|
1157
|
-
if (property.name !== 'replaceWith')
|
|
1158
|
-
return;
|
|
1159
|
-
|
|
1160
|
-
const program = path.scope.getProgramParent().path;
|
|
1161
|
-
|
|
1162
|
-
push({
|
|
1163
|
-
isInserted,
|
|
1164
|
-
path,
|
|
1165
|
-
object,
|
|
1166
|
-
program,
|
|
1167
|
-
property,
|
|
1168
|
-
calleePath,
|
|
1169
|
-
});
|
|
1170
|
-
},
|
|
1171
|
-
};
|
|
1172
|
-
};
|
|
1173
|
-
return convertReplaceWith;
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1176
|
-
var convertReplaceWithMultiple = {};
|
|
1177
|
-
|
|
1178
|
-
var hasRequiredConvertReplaceWithMultiple;
|
|
1179
|
-
|
|
1180
|
-
function requireConvertReplaceWithMultiple () {
|
|
1181
|
-
if (hasRequiredConvertReplaceWithMultiple) return convertReplaceWithMultiple;
|
|
1182
|
-
hasRequiredConvertReplaceWithMultiple = 1;
|
|
1183
|
-
|
|
1184
|
-
const {
|
|
1185
|
-
operator,
|
|
1186
|
-
template,
|
|
1187
|
-
types,
|
|
1188
|
-
} = require$$0$1;
|
|
1189
|
-
|
|
1190
|
-
const {insertAfter, replaceWith} = operator;
|
|
1191
|
-
const {Identifier, ObjectProperty} = types;
|
|
1192
|
-
|
|
1193
|
-
const isRecast = (program) => program.get('body.0').get('expression')
|
|
1194
|
-
.isStringLiteral({
|
|
1195
|
-
value: 'use strict',
|
|
1196
|
-
});
|
|
1197
|
-
|
|
1198
|
-
convertReplaceWithMultiple.report = () => {
|
|
1199
|
-
return `"operate.replaceWithMultiple" should be called instead of "path.replaceWithMultiple"`;
|
|
1200
|
-
};
|
|
1201
|
-
|
|
1202
|
-
const replaceWithAST = template.ast(`
|
|
1203
|
-
const {replaceWithMultiple} = require('putout').operate;
|
|
1204
|
-
`);
|
|
1205
|
-
|
|
1206
|
-
convertReplaceWithMultiple.fix = ({path, calleePath, property, object, program}) => {
|
|
1207
|
-
const first = program.get('body.0');
|
|
1208
|
-
const {bindings} = program.scope;
|
|
1209
|
-
|
|
1210
|
-
replaceWith(calleePath, property);
|
|
1211
|
-
path.node.arguments.unshift(object);
|
|
1212
|
-
|
|
1213
|
-
if (bindings.replaceWithMultiple)
|
|
1214
|
-
return;
|
|
1215
|
-
|
|
1216
|
-
if (!bindings.replaceWith && !bindings.insertAfter) {
|
|
1217
|
-
if (isRecast(program))
|
|
1218
|
-
return insertAfter(first, replaceWithAST);
|
|
1219
|
-
|
|
1220
|
-
return first.insertBefore(replaceWithAST);
|
|
1221
|
-
}
|
|
1222
|
-
|
|
1223
|
-
const id = Identifier('replaceWithMultiple');
|
|
1224
|
-
const varPath = getVarPath(bindings);
|
|
1225
|
-
|
|
1226
|
-
varPath.node.id.properties.push(ObjectProperty(id, id, false, true));
|
|
1227
|
-
};
|
|
1228
|
-
|
|
1229
|
-
function getVarPath(bindings) {
|
|
1230
|
-
const {replaceWith, insertAfter} = bindings;
|
|
1231
|
-
|
|
1232
|
-
if (replaceWith)
|
|
1233
|
-
return replaceWith.path;
|
|
1234
|
-
|
|
1235
|
-
return insertAfter.path;
|
|
1236
|
-
}
|
|
1237
|
-
|
|
1238
|
-
convertReplaceWithMultiple.traverse = ({push}) => ({
|
|
1239
|
-
CallExpression(path) {
|
|
1240
|
-
const calleePath = path.get('callee');
|
|
1241
|
-
|
|
1242
|
-
if (!calleePath.isMemberExpression())
|
|
1243
|
-
return;
|
|
1244
|
-
|
|
1245
|
-
const {object, property} = calleePath.node;
|
|
1246
|
-
|
|
1247
|
-
if (property.name !== 'replaceWithMultiple')
|
|
1248
|
-
return;
|
|
1249
|
-
|
|
1250
|
-
const program = path.scope.getProgramParent().path;
|
|
1251
|
-
|
|
1252
|
-
push({
|
|
1253
|
-
path,
|
|
1254
|
-
object,
|
|
1255
|
-
program,
|
|
1256
|
-
calleePath,
|
|
1257
|
-
property,
|
|
1258
|
-
});
|
|
1259
|
-
},
|
|
1260
|
-
});
|
|
1261
|
-
return convertReplaceWithMultiple;
|
|
1262
|
-
}
|
|
1263
|
-
|
|
1264
|
-
var convertReportToFunction = {};
|
|
1265
|
-
|
|
1266
|
-
var hasRequiredConvertReportToFunction;
|
|
1267
|
-
|
|
1268
|
-
function requireConvertReportToFunction () {
|
|
1269
|
-
if (hasRequiredConvertReportToFunction) return convertReportToFunction;
|
|
1270
|
-
hasRequiredConvertReportToFunction = 1;
|
|
1271
|
-
|
|
1272
|
-
const {types} = require$$0$1;
|
|
1273
|
-
const {
|
|
1274
|
-
isStringLiteral,
|
|
1275
|
-
isTemplateLiteral,
|
|
1276
|
-
} = types;
|
|
1277
|
-
|
|
1278
|
-
convertReportToFunction.report = () => `Typeof 'report' should be a 'function'`;
|
|
1279
|
-
|
|
1280
|
-
convertReportToFunction.match = () => ({
|
|
1281
|
-
'module.exports.report = __a': ({__a}) => isStringLiteral(__a) || isTemplateLiteral(__a),
|
|
1282
|
-
});
|
|
1283
|
-
|
|
1284
|
-
convertReportToFunction.replace = () => ({
|
|
1285
|
-
'module.exports.report = __a': 'module.exports.report = () => __a',
|
|
1286
|
-
});
|
|
1287
|
-
return convertReportToFunction;
|
|
1288
|
-
}
|
|
1289
|
-
|
|
1290
|
-
var convertToNoTransformCode = {};
|
|
1291
|
-
|
|
1292
|
-
var hasRequiredConvertToNoTransformCode;
|
|
1293
|
-
|
|
1294
|
-
function requireConvertToNoTransformCode () {
|
|
1295
|
-
if (hasRequiredConvertToNoTransformCode) return convertToNoTransformCode;
|
|
1296
|
-
hasRequiredConvertToNoTransformCode = 1;
|
|
1297
|
-
|
|
1298
|
-
const {isIdentifier, Identifier} = require$$0$1.types;
|
|
1299
|
-
|
|
1300
|
-
convertToNoTransformCode.report = () => {
|
|
1301
|
-
return `"noTransformCode" should be called instead of using same arguments twice in "transformCode"`;
|
|
1302
|
-
};
|
|
1303
|
-
|
|
1304
|
-
convertToNoTransformCode.traverse = ({push}) => ({
|
|
1305
|
-
CallExpression(path) {
|
|
1306
|
-
const calleePath = path.get('callee');
|
|
1307
|
-
|
|
1308
|
-
if (!calleePath.isMemberExpression())
|
|
1309
|
-
return;
|
|
1310
|
-
|
|
1311
|
-
const {object, property} = calleePath.node;
|
|
1312
|
-
|
|
1313
|
-
if (object.name !== 't' || property.name !== 'transformCode')
|
|
1314
|
-
return;
|
|
1315
|
-
|
|
1316
|
-
const [a, b] = path.node.arguments;
|
|
1317
|
-
|
|
1318
|
-
if (!isIdentifier(a) || !isIdentifier(b))
|
|
1319
|
-
return;
|
|
1320
|
-
|
|
1321
|
-
if (a.name !== b.name)
|
|
1322
|
-
return;
|
|
1323
|
-
|
|
1324
|
-
push({
|
|
1325
|
-
path,
|
|
1326
|
-
calleePath,
|
|
1327
|
-
});
|
|
1328
|
-
},
|
|
1329
|
-
});
|
|
1330
|
-
|
|
1331
|
-
convertToNoTransformCode.fix = ({path, calleePath}) => {
|
|
1332
|
-
calleePath.node.property = Identifier('noTransformCode');
|
|
1333
|
-
path.node.arguments.pop();
|
|
1334
|
-
};
|
|
1335
|
-
return convertToNoTransformCode;
|
|
1336
|
-
}
|
|
1337
|
-
|
|
1338
|
-
var convertTraverseToInclude = {};
|
|
1339
|
-
|
|
1340
|
-
var hasRequiredConvertTraverseToInclude;
|
|
1341
|
-
|
|
1342
|
-
function requireConvertTraverseToInclude () {
|
|
1343
|
-
if (hasRequiredConvertTraverseToInclude) return convertTraverseToInclude;
|
|
1344
|
-
hasRequiredConvertTraverseToInclude = 1;
|
|
1345
|
-
|
|
1346
|
-
const {
|
|
1347
|
-
types,
|
|
1348
|
-
template,
|
|
1349
|
-
operator,
|
|
1350
|
-
} = require$$0$1;
|
|
1351
|
-
|
|
1352
|
-
const {StringLiteral} = types;
|
|
1353
|
-
const {compare} = operator;
|
|
1354
|
-
|
|
1355
|
-
const isPush = (path) => path.get('value').isIdentifier({
|
|
1356
|
-
name: 'push',
|
|
1357
|
-
});
|
|
1358
|
-
|
|
1359
|
-
convertTraverseToInclude.report = () => 'Includer should be used instead of Traverser';
|
|
1360
|
-
|
|
1361
|
-
convertTraverseToInclude.match = () => ({
|
|
1362
|
-
'module.exports.traverse = __a': (vars, path) => {
|
|
1363
|
-
const __aPath = path.get('right.body');
|
|
1364
|
-
|
|
1365
|
-
if (__aPath.isBlockStatement())
|
|
1366
|
-
return false;
|
|
1367
|
-
|
|
1368
|
-
for (const propertyPath of __aPath.get('properties')) {
|
|
1369
|
-
if (isPush(propertyPath) || isBlock(propertyPath)) {
|
|
1370
|
-
return true;
|
|
1371
|
-
}
|
|
1372
|
-
}
|
|
1373
|
-
|
|
1374
|
-
return false;
|
|
1375
|
-
},
|
|
1376
|
-
});
|
|
1377
|
-
|
|
1378
|
-
convertTraverseToInclude.replace = () => ({
|
|
1379
|
-
'module.exports.traverse = __a': (vars, path) => {
|
|
1380
|
-
const node = template.ast.fresh('module.exports.include = () => []');
|
|
1381
|
-
const __aPath = path.get('right.body');
|
|
1382
|
-
|
|
1383
|
-
for (const propertyPath of __aPath.get('properties')) {
|
|
1384
|
-
const name = getName(propertyPath);
|
|
1385
|
-
|
|
1386
|
-
if (isPush(propertyPath) || isBlock(propertyPath)) {
|
|
1387
|
-
node.right.body.elements.push(StringLiteral(name));
|
|
1388
|
-
propertyPath.remove();
|
|
1389
|
-
}
|
|
1390
|
-
}
|
|
1391
|
-
|
|
1392
|
-
return node;
|
|
1393
|
-
},
|
|
1394
|
-
});
|
|
1395
|
-
|
|
1396
|
-
function getName(propertyPath) {
|
|
1397
|
-
const keyPath = propertyPath.get('key');
|
|
1398
|
-
const {node} = keyPath;
|
|
1399
|
-
|
|
1400
|
-
if (keyPath.isIdentifier())
|
|
1401
|
-
return node.name;
|
|
1402
|
-
|
|
1403
|
-
return node.value;
|
|
1404
|
-
}
|
|
1405
|
-
|
|
1406
|
-
function isBlock(path) {
|
|
1407
|
-
const bodyPath = path.get('body');
|
|
1408
|
-
|
|
1409
|
-
if (!bodyPath.isBlockStatement() || bodyPath.node.body.length !== 1)
|
|
1410
|
-
return false;
|
|
1411
|
-
|
|
1412
|
-
const [node] = bodyPath.node.body;
|
|
1413
|
-
|
|
1414
|
-
return compare(node, 'push(path)');
|
|
1415
|
-
}
|
|
1416
|
-
return convertTraverseToInclude;
|
|
1417
|
-
}
|
|
1418
|
-
|
|
1419
|
-
var convertTraverseToReplace = {};
|
|
1420
|
-
|
|
1421
|
-
var hasRequiredConvertTraverseToReplace;
|
|
1422
|
-
|
|
1423
|
-
function requireConvertTraverseToReplace () {
|
|
1424
|
-
if (hasRequiredConvertTraverseToReplace) return convertTraverseToReplace;
|
|
1425
|
-
hasRequiredConvertTraverseToReplace = 1;
|
|
1426
|
-
|
|
1427
|
-
const {operator} = require$$0$1;
|
|
1428
|
-
const {contains, traverse} = operator;
|
|
1429
|
-
|
|
1430
|
-
convertTraverseToReplace.report = () => 'Replacer should be used instead of Traverser (https://git.io/JqcMn)';
|
|
1431
|
-
|
|
1432
|
-
convertTraverseToReplace.match = () => ({
|
|
1433
|
-
'module.exports.traverse = (__args) => __a': ({__args}, path) => {
|
|
1434
|
-
const program = path.scope.getProgramParent().path;
|
|
1435
|
-
|
|
1436
|
-
const withFix = contains(program, ['module.exports.fix = __a']);
|
|
1437
|
-
|
|
1438
|
-
if (withFix)
|
|
1439
|
-
return false;
|
|
1440
|
-
|
|
1441
|
-
if (check(path))
|
|
1442
|
-
return false;
|
|
1443
|
-
|
|
1444
|
-
if (!__args.length)
|
|
1445
|
-
return true;
|
|
1446
|
-
|
|
1447
|
-
const withPush = contains(__args[0], ['push']);
|
|
1448
|
-
|
|
1449
|
-
if (withPush)
|
|
1450
|
-
return false;
|
|
1451
|
-
|
|
1452
|
-
return !withPush;
|
|
1453
|
-
},
|
|
1454
|
-
});
|
|
1455
|
-
|
|
1456
|
-
convertTraverseToReplace.replace = () => ({
|
|
1457
|
-
'module.exports.traverse = (__args) => __a': 'module.exports.replace = (__args) => __a',
|
|
1458
|
-
});
|
|
1459
|
-
|
|
1460
|
-
function check(path) {
|
|
1461
|
-
let hasPushCall = false;
|
|
1462
|
-
let hasTraverseMethod = false;
|
|
1463
|
-
|
|
1464
|
-
traverse(path, {
|
|
1465
|
-
'ObjectMethod|ObjectProperty': (path) => {
|
|
1466
|
-
const keyPath = path.get('key');
|
|
1467
|
-
|
|
1468
|
-
if (!path.parentPath.isObjectExpression())
|
|
1469
|
-
return;
|
|
1470
|
-
|
|
1471
|
-
if (!keyPath.isIdentifier())
|
|
1472
|
-
return;
|
|
1473
|
-
|
|
1474
|
-
hasTraverseMethod = true;
|
|
1475
|
-
|
|
1476
|
-
path.stop();
|
|
1477
|
-
},
|
|
1478
|
-
'push(__a)': (path) => {
|
|
1479
|
-
hasPushCall = true;
|
|
1480
|
-
path.stop();
|
|
1481
|
-
},
|
|
1482
|
-
});
|
|
1483
|
-
|
|
1484
|
-
return hasPushCall || hasTraverseMethod;
|
|
1485
|
-
}
|
|
1486
|
-
return convertTraverseToReplace;
|
|
1487
|
-
}
|
|
1488
|
-
|
|
1489
|
-
var convertUrlToDirname = {};
|
|
1490
|
-
|
|
1491
|
-
var hasRequiredConvertUrlToDirname;
|
|
1492
|
-
|
|
1493
|
-
function requireConvertUrlToDirname () {
|
|
1494
|
-
if (hasRequiredConvertUrlToDirname) return convertUrlToDirname;
|
|
1495
|
-
hasRequiredConvertUrlToDirname = 1;
|
|
1496
|
-
|
|
1497
|
-
const {operator} = require$$0$1;
|
|
1498
|
-
const {isESM} = operator;
|
|
1499
|
-
|
|
1500
|
-
convertUrlToDirname.report = () => `Use 'createTest(__dirname)' instead of 'createTest(import.meta.url)' in CommonJS'`;
|
|
1501
|
-
|
|
1502
|
-
convertUrlToDirname.match = () => ({
|
|
1503
|
-
'createTest(import.meta.url, __a)': (vars, path) => !isESM(path),
|
|
1504
|
-
});
|
|
1505
|
-
|
|
1506
|
-
convertUrlToDirname.replace = () => ({
|
|
1507
|
-
'createTest(import.meta.url, __a)': 'createTest(__dirname, __a)',
|
|
1508
|
-
});
|
|
1509
|
-
return convertUrlToDirname;
|
|
1510
|
-
}
|
|
1511
|
-
|
|
1512
|
-
var createTest = {};
|
|
1513
|
-
|
|
1514
|
-
var hasRequiredCreateTest;
|
|
1515
|
-
|
|
1516
|
-
function requireCreateTest () {
|
|
1517
|
-
if (hasRequiredCreateTest) return createTest;
|
|
1518
|
-
hasRequiredCreateTest = 1;
|
|
1519
|
-
|
|
1520
|
-
const {operator, types} = require$$0$1;
|
|
1521
|
-
|
|
1522
|
-
const {
|
|
1523
|
-
StringLiteral,
|
|
1524
|
-
ArrayExpression,
|
|
1525
|
-
Identifier,
|
|
1526
|
-
ObjectProperty,
|
|
1527
|
-
ObjectExpression,
|
|
1528
|
-
isIdentifier,
|
|
1529
|
-
} = types;
|
|
1530
|
-
|
|
1531
|
-
const {replaceWith, getProperty} = operator;
|
|
1532
|
-
|
|
1533
|
-
createTest.report = () => `Apply modifications to 'createTest()' options`;
|
|
1534
|
-
|
|
1535
|
-
createTest.include = () => [
|
|
1536
|
-
'createTest(__dirname, __object)',
|
|
1537
|
-
'createTest(import.meta.url, __object)',
|
|
1538
|
-
];
|
|
1539
|
-
|
|
1540
|
-
createTest.fix = (path, {options}) => {
|
|
1541
|
-
const objectPath = path.get('arguments.1');
|
|
1542
|
-
|
|
1543
|
-
if (!getProperty(objectPath, 'plugins'))
|
|
1544
|
-
convert(objectPath);
|
|
1545
|
-
|
|
1546
|
-
for (const [name, value] of options.add) {
|
|
1547
|
-
if (getProperty(objectPath, name))
|
|
1548
|
-
continue;
|
|
1549
|
-
|
|
1550
|
-
const property = ObjectProperty(Identifier(name), StringLiteral(value));
|
|
1551
|
-
objectPath.node.properties.unshift(property);
|
|
1552
|
-
}
|
|
1553
|
-
};
|
|
1554
|
-
|
|
1555
|
-
createTest.filter = (path, {options}) => {
|
|
1556
|
-
if (!options.add)
|
|
1557
|
-
return false;
|
|
1558
|
-
|
|
1559
|
-
const objectPath = path.get('arguments.1');
|
|
1560
|
-
|
|
1561
|
-
for (const [name] of options.add) {
|
|
1562
|
-
if (!getProperty(objectPath, name))
|
|
1563
|
-
return true;
|
|
1564
|
-
}
|
|
1565
|
-
|
|
1566
|
-
return false;
|
|
1567
|
-
};
|
|
1568
|
-
|
|
1569
|
-
const maybeLiteral = (a) => {
|
|
1570
|
-
if (isIdentifier(a))
|
|
1571
|
-
return StringLiteral(a.name);
|
|
1572
|
-
|
|
1573
|
-
return a;
|
|
1574
|
-
};
|
|
1575
|
-
|
|
1576
|
-
function convert(objectPath) {
|
|
1577
|
-
const {key, value} = objectPath.node.properties[0];
|
|
1578
|
-
|
|
1579
|
-
replaceWith(objectPath, ObjectExpression([
|
|
1580
|
-
ObjectProperty(Identifier('plugins'), ArrayExpression([
|
|
1581
|
-
ArrayExpression([
|
|
1582
|
-
maybeLiteral(key),
|
|
1583
|
-
value,
|
|
1584
|
-
]),
|
|
1585
|
-
])),
|
|
1586
|
-
]));
|
|
1587
|
-
}
|
|
1588
|
-
return createTest;
|
|
1589
|
-
}
|
|
1590
|
-
|
|
1591
|
-
var declare = {};
|
|
1592
|
-
|
|
1593
|
-
var types = "import {types} from 'putout'";
|
|
1594
|
-
var is = "const {is} = types";
|
|
1595
|
-
var isBinding = "const {isBinding} = types";
|
|
1596
|
-
var isBlockScoped = "const {isBlockScoped} = types";
|
|
1597
|
-
var isImmutable = "const {isImmutable} = types";
|
|
1598
|
-
var isLet = "const {isLet} = types";
|
|
1599
|
-
var isNode = "const {isNode} = types";
|
|
1600
|
-
var isNodesEquivalent = "const {isNodesEquivalent} = types";
|
|
1601
|
-
var isPlaceholderType = "const {isPlaceholderType} = types";
|
|
1602
|
-
var isReferenced = "const {isReferenced} = types";
|
|
1603
|
-
var isScope = "const {isScope} = types";
|
|
1604
|
-
var isSpecifierDefault = "const {isSpecifierDefault} = types";
|
|
1605
|
-
var isType = "const {isType} = types";
|
|
1606
|
-
var isValidES3Identifier = "const {isValidES3Identifier} = types";
|
|
1607
|
-
var isValidIdentifier = "const {isValidIdentifier} = types";
|
|
1608
|
-
var isVar = "const {isVar} = types";
|
|
1609
|
-
var ArrayExpression = "const {ArrayExpression} = types";
|
|
1610
|
-
var AssignmentExpression = "const {AssignmentExpression} = types";
|
|
1611
|
-
var BinaryExpression = "const {BinaryExpression} = types";
|
|
1612
|
-
var InterpreterDirective = "const {InterpreterDirective} = types";
|
|
1613
|
-
var Directive = "const {Directive} = types";
|
|
1614
|
-
var DirectiveLiteral = "const {DirectiveLiteral} = types";
|
|
1615
|
-
var BlockStatement = "const {BlockStatement} = types";
|
|
1616
|
-
var BreakStatement = "const {BreakStatement} = types";
|
|
1617
|
-
var CallExpression = "const {CallExpression} = types";
|
|
1618
|
-
var CatchClause = "const {CatchClause} = types";
|
|
1619
|
-
var ConditionalExpression = "const {ConditionalExpression} = types";
|
|
1620
|
-
var ContinueStatement = "const {ContinueStatement} = types";
|
|
1621
|
-
var DebuggerStatement = "const {DebuggerStatement} = types";
|
|
1622
|
-
var DoWhileStatement = "const {DoWhileStatement} = types";
|
|
1623
|
-
var EmptyStatement = "const {EmptyStatement} = types";
|
|
1624
|
-
var ExpressionStatement = "const {ExpressionStatement} = types";
|
|
1625
|
-
var File = "const {File} = types";
|
|
1626
|
-
var ForInStatement = "const {ForInStatement} = types";
|
|
1627
|
-
var ForStatement = "const {ForStatement} = types";
|
|
1628
|
-
var FunctionDeclaration = "const {FunctionDeclaration} = types";
|
|
1629
|
-
var FunctionExpression = "const {FunctionExpression} = types";
|
|
1630
|
-
var Identifier = "const {Identifier} = types";
|
|
1631
|
-
var IfStatement = "const {IfStatement} = types";
|
|
1632
|
-
var LabeledStatement = "const {LabeledStatement} = types";
|
|
1633
|
-
var StringLiteral = "const {StringLiteral} = types";
|
|
1634
|
-
var NumericLiteral = "const {NumericLiteral} = types";
|
|
1635
|
-
var NullLiteral = "const {NullLiteral} = types";
|
|
1636
|
-
var BooleanLiteral = "const {BooleanLiteral} = types";
|
|
1637
|
-
var RegExpLiteral = "const {RegExpLiteral} = types";
|
|
1638
|
-
var LogicalExpression = "const {LogicalExpression} = types";
|
|
1639
|
-
var MemberExpression = "const {MemberExpression} = types";
|
|
1640
|
-
var NewExpression = "const {NewExpression} = types";
|
|
1641
|
-
var Program = "const {Program} = types";
|
|
1642
|
-
var ObjectExpression = "const {ObjectExpression} = types";
|
|
1643
|
-
var ObjectMethod = "const {ObjectMethod} = types";
|
|
1644
|
-
var ObjectProperty = "const {ObjectProperty} = types";
|
|
1645
|
-
var RestElement = "const {RestElement} = types";
|
|
1646
|
-
var ReturnStatement = "const {ReturnStatement} = types";
|
|
1647
|
-
var SequenceExpression = "const {SequenceExpression} = types";
|
|
1648
|
-
var ParenthesizedExpression = "const {ParenthesizedExpression} = types";
|
|
1649
|
-
var SwitchCase = "const {SwitchCase} = types";
|
|
1650
|
-
var SwitchStatement = "const {SwitchStatement} = types";
|
|
1651
|
-
var ThisExpression = "const {ThisExpression} = types";
|
|
1652
|
-
var ThrowStatement = "const {ThrowStatement} = types";
|
|
1653
|
-
var TryStatement = "const {TryStatement} = types";
|
|
1654
|
-
var UnaryExpression = "const {UnaryExpression} = types";
|
|
1655
|
-
var UpdateExpression = "const {UpdateExpression} = types";
|
|
1656
|
-
var VariableDeclaration = "const {VariableDeclaration} = types";
|
|
1657
|
-
var VariableDeclarator = "const {VariableDeclarator} = types";
|
|
1658
|
-
var WhileStatement = "const {WhileStatement} = types";
|
|
1659
|
-
var WithStatement = "const {WithStatement} = types";
|
|
1660
|
-
var AssignmentPattern = "const {AssignmentPattern} = types";
|
|
1661
|
-
var ArrayPattern = "const {ArrayPattern} = types";
|
|
1662
|
-
var ArrowFunctionExpression = "const {ArrowFunctionExpression} = types";
|
|
1663
|
-
var ClassBody = "const {ClassBody} = types";
|
|
1664
|
-
var ClassExpression = "const {ClassExpression} = types";
|
|
1665
|
-
var ClassDeclaration = "const {ClassDeclaration} = types";
|
|
1666
|
-
var ExportAllDeclaration = "const {ExportAllDeclaration} = types";
|
|
1667
|
-
var ExportDefaultDeclaration = "const {ExportDefaultDeclaration} = types";
|
|
1668
|
-
var ExportNamedDeclaration = "const {ExportNamedDeclaration} = types";
|
|
1669
|
-
var ExportSpecifier = "const {ExportSpecifier} = types";
|
|
1670
|
-
var ForOfStatement = "const {ForOfStatement} = types";
|
|
1671
|
-
var ImportDeclaration = "const {ImportDeclaration} = types";
|
|
1672
|
-
var ImportDefaultSpecifier = "const {ImportDefaultSpecifier} = types";
|
|
1673
|
-
var ImportNamespaceSpecifier = "const {ImportNamespaceSpecifier} = types";
|
|
1674
|
-
var ImportSpecifier = "const {ImportSpecifier} = types";
|
|
1675
|
-
var MetaProperty = "const {MetaProperty} = types";
|
|
1676
|
-
var ClassMethod = "const {ClassMethod} = types";
|
|
1677
|
-
var ObjectPattern = "const {ObjectPattern} = types";
|
|
1678
|
-
var SpreadElement = "const {SpreadElement} = types";
|
|
1679
|
-
var Super = "const {Super} = types";
|
|
1680
|
-
var TaggedTemplateExpression = "const {TaggedTemplateExpression} = types";
|
|
1681
|
-
var TemplateElement = "const {TemplateElement} = types";
|
|
1682
|
-
var TemplateLiteral = "const {TemplateLiteral} = types";
|
|
1683
|
-
var YieldExpression = "const {YieldExpression} = types";
|
|
1684
|
-
var AwaitExpression = "const {AwaitExpression} = types";
|
|
1685
|
-
var Import = "const {Import} = types";
|
|
1686
|
-
var BigIntLiteral = "const {BigIntLiteral} = types";
|
|
1687
|
-
var ExportNamespaceSpecifier = "const {ExportNamespaceSpecifier} = types";
|
|
1688
|
-
var OptionalMemberExpression = "const {OptionalMemberExpression} = types";
|
|
1689
|
-
var OptionalCallExpression = "const {OptionalCallExpression} = types";
|
|
1690
|
-
var ClassProperty = "const {ClassProperty} = types";
|
|
1691
|
-
var ClassPrivateProperty = "const {ClassPrivateProperty} = types";
|
|
1692
|
-
var ClassPrivateMethod = "const {ClassPrivateMethod} = types";
|
|
1693
|
-
var PrivateName = "const {PrivateName} = types";
|
|
1694
|
-
var AnyTypeAnnotation = "const {AnyTypeAnnotation} = types";
|
|
1695
|
-
var ArrayTypeAnnotation = "const {ArrayTypeAnnotation} = types";
|
|
1696
|
-
var BooleanTypeAnnotation = "const {BooleanTypeAnnotation} = types";
|
|
1697
|
-
var BooleanLiteralTypeAnnotation = "const {BooleanLiteralTypeAnnotation} = types";
|
|
1698
|
-
var NullLiteralTypeAnnotation = "const {NullLiteralTypeAnnotation} = types";
|
|
1699
|
-
var ClassImplements = "const {ClassImplements} = types";
|
|
1700
|
-
var DeclareClass = "const {DeclareClass} = types";
|
|
1701
|
-
var DeclareFunction = "const {DeclareFunction} = types";
|
|
1702
|
-
var DeclareInterface = "const {DeclareInterface} = types";
|
|
1703
|
-
var DeclareModule = "const {DeclareModule} = types";
|
|
1704
|
-
var DeclareModuleExports = "const {DeclareModuleExports} = types";
|
|
1705
|
-
var DeclareTypeAlias = "const {DeclareTypeAlias} = types";
|
|
1706
|
-
var DeclareOpaqueType = "const {DeclareOpaqueType} = types";
|
|
1707
|
-
var DeclareVariable = "const {DeclareVariable} = types";
|
|
1708
|
-
var DeclareExportDeclaration = "const {DeclareExportDeclaration} = types";
|
|
1709
|
-
var DeclareExportAllDeclaration = "const {DeclareExportAllDeclaration} = types";
|
|
1710
|
-
var DeclaredPredicate = "const {DeclaredPredicate} = types";
|
|
1711
|
-
var ExistsTypeAnnotation = "const {ExistsTypeAnnotation} = types";
|
|
1712
|
-
var FunctionTypeAnnotation = "const {FunctionTypeAnnotation} = types";
|
|
1713
|
-
var FunctionTypeParam = "const {FunctionTypeParam} = types";
|
|
1714
|
-
var GenericTypeAnnotation = "const {GenericTypeAnnotation} = types";
|
|
1715
|
-
var InferredPredicate = "const {InferredPredicate} = types";
|
|
1716
|
-
var InterfaceExtends = "const {InterfaceExtends} = types";
|
|
1717
|
-
var InterfaceDeclaration = "const {InterfaceDeclaration} = types";
|
|
1718
|
-
var InterfaceTypeAnnotation = "const {InterfaceTypeAnnotation} = types";
|
|
1719
|
-
var IntersectionTypeAnnotation = "const {IntersectionTypeAnnotation} = types";
|
|
1720
|
-
var MixedTypeAnnotation = "const {MixedTypeAnnotation} = types";
|
|
1721
|
-
var EmptyTypeAnnotation = "const {EmptyTypeAnnotation} = types";
|
|
1722
|
-
var NullableTypeAnnotation = "const {NullableTypeAnnotation} = types";
|
|
1723
|
-
var NumberLiteralTypeAnnotation = "const {NumberLiteralTypeAnnotation} = types";
|
|
1724
|
-
var NumberTypeAnnotation = "const {NumberTypeAnnotation} = types";
|
|
1725
|
-
var ObjectTypeAnnotation = "const {ObjectTypeAnnotation} = types";
|
|
1726
|
-
var ObjectTypeInternalSlot = "const {ObjectTypeInternalSlot} = types";
|
|
1727
|
-
var ObjectTypeCallProperty = "const {ObjectTypeCallProperty} = types";
|
|
1728
|
-
var ObjectTypeIndexer = "const {ObjectTypeIndexer} = types";
|
|
1729
|
-
var ObjectTypeProperty = "const {ObjectTypeProperty} = types";
|
|
1730
|
-
var ObjectTypeSpreadProperty = "const {ObjectTypeSpreadProperty} = types";
|
|
1731
|
-
var OpaqueType = "const {OpaqueType} = types";
|
|
1732
|
-
var QualifiedTypeIdentifier = "const {QualifiedTypeIdentifier} = types";
|
|
1733
|
-
var StringLiteralTypeAnnotation = "const {StringLiteralTypeAnnotation} = types";
|
|
1734
|
-
var StringTypeAnnotation = "const {StringTypeAnnotation} = types";
|
|
1735
|
-
var SymbolTypeAnnotation = "const {SymbolTypeAnnotation} = types";
|
|
1736
|
-
var ThisTypeAnnotation = "const {ThisTypeAnnotation} = types";
|
|
1737
|
-
var TupleTypeAnnotation = "const {TupleTypeAnnotation} = types";
|
|
1738
|
-
var TypeofTypeAnnotation = "const {TypeofTypeAnnotation} = types";
|
|
1739
|
-
var TypeAlias = "const {TypeAlias} = types";
|
|
1740
|
-
var TypeAnnotation = "const {TypeAnnotation} = types";
|
|
1741
|
-
var TypeCastExpression = "const {TypeCastExpression} = types";
|
|
1742
|
-
var TypeParameter = "const {TypeParameter} = types";
|
|
1743
|
-
var TypeParameterDeclaration = "const {TypeParameterDeclaration} = types";
|
|
1744
|
-
var TypeParameterInstantiation = "const {TypeParameterInstantiation} = types";
|
|
1745
|
-
var UnionTypeAnnotation = "const {UnionTypeAnnotation} = types";
|
|
1746
|
-
var Variance = "const {Variance} = types";
|
|
1747
|
-
var VoidTypeAnnotation = "const {VoidTypeAnnotation} = types";
|
|
1748
|
-
var EnumDeclaration = "const {EnumDeclaration} = types";
|
|
1749
|
-
var EnumBooleanBody = "const {EnumBooleanBody} = types";
|
|
1750
|
-
var EnumNumberBody = "const {EnumNumberBody} = types";
|
|
1751
|
-
var EnumStringBody = "const {EnumStringBody} = types";
|
|
1752
|
-
var EnumSymbolBody = "const {EnumSymbolBody} = types";
|
|
1753
|
-
var EnumBooleanMember = "const {EnumBooleanMember} = types";
|
|
1754
|
-
var EnumNumberMember = "const {EnumNumberMember} = types";
|
|
1755
|
-
var EnumStringMember = "const {EnumStringMember} = types";
|
|
1756
|
-
var EnumDefaultedMember = "const {EnumDefaultedMember} = types";
|
|
1757
|
-
var IndexedAccessType = "const {IndexedAccessType} = types";
|
|
1758
|
-
var OptionalIndexedAccessType = "const {OptionalIndexedAccessType} = types";
|
|
1759
|
-
var JSXAttribute = "const {JSXAttribute} = types";
|
|
1760
|
-
var JSXClosingElement = "const {JSXClosingElement} = types";
|
|
1761
|
-
var JSXElement = "const {JSXElement} = types";
|
|
1762
|
-
var JSXEmptyExpression = "const {JSXEmptyExpression} = types";
|
|
1763
|
-
var JSXExpressionContainer = "const {JSXExpressionContainer} = types";
|
|
1764
|
-
var JSXSpreadChild = "const {JSXSpreadChild} = types";
|
|
1765
|
-
var JSXIdentifier = "const {JSXIdentifier} = types";
|
|
1766
|
-
var JSXMemberExpression = "const {JSXMemberExpression} = types";
|
|
1767
|
-
var JSXNamespacedName = "const {JSXNamespacedName} = types";
|
|
1768
|
-
var JSXOpeningElement = "const {JSXOpeningElement} = types";
|
|
1769
|
-
var JSXSpreadAttribute = "const {JSXSpreadAttribute} = types";
|
|
1770
|
-
var JSXText = "const {JSXText} = types";
|
|
1771
|
-
var JSXFragment = "const {JSXFragment} = types";
|
|
1772
|
-
var JSXOpeningFragment = "const {JSXOpeningFragment} = types";
|
|
1773
|
-
var JSXClosingFragment = "const {JSXClosingFragment} = types";
|
|
1774
|
-
var Noop = "const {Noop} = types";
|
|
1775
|
-
var Placeholder = "const {Placeholder} = types";
|
|
1776
|
-
var V8IntrinsicIdentifier = "const {V8IntrinsicIdentifier} = types";
|
|
1777
|
-
var ArgumentPlaceholder = "const {ArgumentPlaceholder} = types";
|
|
1778
|
-
var BindExpression = "const {BindExpression} = types";
|
|
1779
|
-
var ImportAttribute = "const {ImportAttribute} = types";
|
|
1780
|
-
var Decorator = "const {Decorator} = types";
|
|
1781
|
-
var DoExpression = "const {DoExpression} = types";
|
|
1782
|
-
var ExportDefaultSpecifier = "const {ExportDefaultSpecifier} = types";
|
|
1783
|
-
var RecordExpression = "const {RecordExpression} = types";
|
|
1784
|
-
var TupleExpression = "const {TupleExpression} = types";
|
|
1785
|
-
var DecimalLiteral = "const {DecimalLiteral} = types";
|
|
1786
|
-
var StaticBlock = "const {StaticBlock} = types";
|
|
1787
|
-
var ModuleExpression = "const {ModuleExpression} = types";
|
|
1788
|
-
var TopicReference = "const {TopicReference} = types";
|
|
1789
|
-
var PipelineTopicExpression = "const {PipelineTopicExpression} = types";
|
|
1790
|
-
var PipelineBareFunction = "const {PipelineBareFunction} = types";
|
|
1791
|
-
var PipelinePrimaryTopicReference = "const {PipelinePrimaryTopicReference} = types";
|
|
1792
|
-
var TSParameterProperty = "const {TSParameterProperty} = types";
|
|
1793
|
-
var TSDeclareFunction = "const {TSDeclareFunction} = types";
|
|
1794
|
-
var TSDeclareMethod = "const {TSDeclareMethod} = types";
|
|
1795
|
-
var TSQualifiedName = "const {TSQualifiedName} = types";
|
|
1796
|
-
var TSCallSignatureDeclaration = "const {TSCallSignatureDeclaration} = types";
|
|
1797
|
-
var TSConstructSignatureDeclaration = "const {TSConstructSignatureDeclaration} = types";
|
|
1798
|
-
var TSPropertySignature = "const {TSPropertySignature} = types";
|
|
1799
|
-
var TSMethodSignature = "const {TSMethodSignature} = types";
|
|
1800
|
-
var TSIndexSignature = "const {TSIndexSignature} = types";
|
|
1801
|
-
var TSAnyKeyword = "const {TSAnyKeyword} = types";
|
|
1802
|
-
var TSBooleanKeyword = "const {TSBooleanKeyword} = types";
|
|
1803
|
-
var TSBigIntKeyword = "const {TSBigIntKeyword} = types";
|
|
1804
|
-
var TSIntrinsicKeyword = "const {TSIntrinsicKeyword} = types";
|
|
1805
|
-
var TSNeverKeyword = "const {TSNeverKeyword} = types";
|
|
1806
|
-
var TSNullKeyword = "const {TSNullKeyword} = types";
|
|
1807
|
-
var TSNumberKeyword = "const {TSNumberKeyword} = types";
|
|
1808
|
-
var TSObjectKeyword = "const {TSObjectKeyword} = types";
|
|
1809
|
-
var TSStringKeyword = "const {TSStringKeyword} = types";
|
|
1810
|
-
var TSSymbolKeyword = "const {TSSymbolKeyword} = types";
|
|
1811
|
-
var TSUndefinedKeyword = "const {TSUndefinedKeyword} = types";
|
|
1812
|
-
var TSUnknownKeyword = "const {TSUnknownKeyword} = types";
|
|
1813
|
-
var TSVoidKeyword = "const {TSVoidKeyword} = types";
|
|
1814
|
-
var TSThisType = "const {TSThisType} = types";
|
|
1815
|
-
var TSFunctionType = "const {TSFunctionType} = types";
|
|
1816
|
-
var TSConstructorType = "const {TSConstructorType} = types";
|
|
1817
|
-
var TSTypeReference = "const {TSTypeReference} = types";
|
|
1818
|
-
var TSTypePredicate = "const {TSTypePredicate} = types";
|
|
1819
|
-
var TSTypeQuery = "const {TSTypeQuery} = types";
|
|
1820
|
-
var TSTypeLiteral = "const {TSTypeLiteral} = types";
|
|
1821
|
-
var TSArrayType = "const {TSArrayType} = types";
|
|
1822
|
-
var TSTupleType = "const {TSTupleType} = types";
|
|
1823
|
-
var TSOptionalType = "const {TSOptionalType} = types";
|
|
1824
|
-
var TSRestType = "const {TSRestType} = types";
|
|
1825
|
-
var TSNamedTupleMember = "const {TSNamedTupleMember} = types";
|
|
1826
|
-
var TSUnionType = "const {TSUnionType} = types";
|
|
1827
|
-
var TSIntersectionType = "const {TSIntersectionType} = types";
|
|
1828
|
-
var TSConditionalType = "const {TSConditionalType} = types";
|
|
1829
|
-
var TSInferType = "const {TSInferType} = types";
|
|
1830
|
-
var TSParenthesizedType = "const {TSParenthesizedType} = types";
|
|
1831
|
-
var TSTypeOperator = "const {TSTypeOperator} = types";
|
|
1832
|
-
var TSIndexedAccessType = "const {TSIndexedAccessType} = types";
|
|
1833
|
-
var TSMappedType = "const {TSMappedType} = types";
|
|
1834
|
-
var TSLiteralType = "const {TSLiteralType} = types";
|
|
1835
|
-
var TSExpressionWithTypeArguments = "const {TSExpressionWithTypeArguments} = types";
|
|
1836
|
-
var TSInterfaceDeclaration = "const {TSInterfaceDeclaration} = types";
|
|
1837
|
-
var TSInterfaceBody = "const {TSInterfaceBody} = types";
|
|
1838
|
-
var TSTypeAliasDeclaration = "const {TSTypeAliasDeclaration} = types";
|
|
1839
|
-
var TSAsExpression = "const {TSAsExpression} = types";
|
|
1840
|
-
var TSTypeAssertion = "const {TSTypeAssertion} = types";
|
|
1841
|
-
var TSEnumDeclaration = "const {TSEnumDeclaration} = types";
|
|
1842
|
-
var TSEnumMember = "const {TSEnumMember} = types";
|
|
1843
|
-
var TSModuleDeclaration = "const {TSModuleDeclaration} = types";
|
|
1844
|
-
var TSModuleBlock = "const {TSModuleBlock} = types";
|
|
1845
|
-
var TSImportType = "const {TSImportType} = types";
|
|
1846
|
-
var TSImportEqualsDeclaration = "const {TSImportEqualsDeclaration} = types";
|
|
1847
|
-
var TSExternalModuleReference = "const {TSExternalModuleReference} = types";
|
|
1848
|
-
var TSNonNullExpression = "const {TSNonNullExpression} = types";
|
|
1849
|
-
var TSExportAssignment = "const {TSExportAssignment} = types";
|
|
1850
|
-
var TSNamespaceExportDeclaration = "const {TSNamespaceExportDeclaration} = types";
|
|
1851
|
-
var TSTypeAnnotation = "const {TSTypeAnnotation} = types";
|
|
1852
|
-
var TSTypeParameterInstantiation = "const {TSTypeParameterInstantiation} = types";
|
|
1853
|
-
var TSTypeParameterDeclaration = "const {TSTypeParameterDeclaration} = types";
|
|
1854
|
-
var TSTypeParameter = "const {TSTypeParameter} = types";
|
|
1855
|
-
var NumberLiteral = "const {NumberLiteral} = types";
|
|
1856
|
-
var RegexLiteral = "const {RegexLiteral} = types";
|
|
1857
|
-
var RestProperty = "const {RestProperty} = types";
|
|
1858
|
-
var SpreadProperty = "const {SpreadProperty} = types";
|
|
1859
|
-
var EXPRESSION_TYPES = "const {EXPRESSION_TYPES} = types";
|
|
1860
|
-
var BINARY_TYPES = "const {BINARY_TYPES} = types";
|
|
1861
|
-
var SCOPABLE_TYPES = "const {SCOPABLE_TYPES} = types";
|
|
1862
|
-
var BLOCKPARENT_TYPES = "const {BLOCKPARENT_TYPES} = types";
|
|
1863
|
-
var BLOCK_TYPES = "const {BLOCK_TYPES} = types";
|
|
1864
|
-
var STATEMENT_TYPES = "const {STATEMENT_TYPES} = types";
|
|
1865
|
-
var TERMINATORLESS_TYPES = "const {TERMINATORLESS_TYPES} = types";
|
|
1866
|
-
var COMPLETIONSTATEMENT_TYPES = "const {COMPLETIONSTATEMENT_TYPES} = types";
|
|
1867
|
-
var CONDITIONAL_TYPES = "const {CONDITIONAL_TYPES} = types";
|
|
1868
|
-
var LOOP_TYPES = "const {LOOP_TYPES} = types";
|
|
1869
|
-
var WHILE_TYPES = "const {WHILE_TYPES} = types";
|
|
1870
|
-
var EXPRESSIONWRAPPER_TYPES = "const {EXPRESSIONWRAPPER_TYPES} = types";
|
|
1871
|
-
var FOR_TYPES = "const {FOR_TYPES} = types";
|
|
1872
|
-
var FORXSTATEMENT_TYPES = "const {FORXSTATEMENT_TYPES} = types";
|
|
1873
|
-
var FUNCTION_TYPES = "const {FUNCTION_TYPES} = types";
|
|
1874
|
-
var FUNCTIONPARENT_TYPES = "const {FUNCTIONPARENT_TYPES} = types";
|
|
1875
|
-
var PUREISH_TYPES = "const {PUREISH_TYPES} = types";
|
|
1876
|
-
var DECLARATION_TYPES = "const {DECLARATION_TYPES} = types";
|
|
1877
|
-
var PATTERNLIKE_TYPES = "const {PATTERNLIKE_TYPES} = types";
|
|
1878
|
-
var LVAL_TYPES = "const {LVAL_TYPES} = types";
|
|
1879
|
-
var TSENTITYNAME_TYPES = "const {TSENTITYNAME_TYPES} = types";
|
|
1880
|
-
var LITERAL_TYPES = "const {LITERAL_TYPES} = types";
|
|
1881
|
-
var IMMUTABLE_TYPES = "const {IMMUTABLE_TYPES} = types";
|
|
1882
|
-
var USERWHITESPACABLE_TYPES = "const {USERWHITESPACABLE_TYPES} = types";
|
|
1883
|
-
var METHOD_TYPES = "const {METHOD_TYPES} = types";
|
|
1884
|
-
var OBJECTMEMBER_TYPES = "const {OBJECTMEMBER_TYPES} = types";
|
|
1885
|
-
var PROPERTY_TYPES = "const {PROPERTY_TYPES} = types";
|
|
1886
|
-
var UNARYLIKE_TYPES = "const {UNARYLIKE_TYPES} = types";
|
|
1887
|
-
var PATTERN_TYPES = "const {PATTERN_TYPES} = types";
|
|
1888
|
-
var CLASS_TYPES = "const {CLASS_TYPES} = types";
|
|
1889
|
-
var MODULEDECLARATION_TYPES = "const {MODULEDECLARATION_TYPES} = types";
|
|
1890
|
-
var EXPORTDECLARATION_TYPES = "const {EXPORTDECLARATION_TYPES} = types";
|
|
1891
|
-
var MODULESPECIFIER_TYPES = "const {MODULESPECIFIER_TYPES} = types";
|
|
1892
|
-
var PRIVATE_TYPES = "const {PRIVATE_TYPES} = types";
|
|
1893
|
-
var FLOW_TYPES = "const {FLOW_TYPES} = types";
|
|
1894
|
-
var FLOWTYPE_TYPES = "const {FLOWTYPE_TYPES} = types";
|
|
1895
|
-
var FLOWBASEANNOTATION_TYPES = "const {FLOWBASEANNOTATION_TYPES} = types";
|
|
1896
|
-
var FLOWDECLARATION_TYPES = "const {FLOWDECLARATION_TYPES} = types";
|
|
1897
|
-
var FLOWPREDICATE_TYPES = "const {FLOWPREDICATE_TYPES} = types";
|
|
1898
|
-
var ENUMBODY_TYPES = "const {ENUMBODY_TYPES} = types";
|
|
1899
|
-
var ENUMMEMBER_TYPES = "const {ENUMMEMBER_TYPES} = types";
|
|
1900
|
-
var JSX_TYPES = "const {JSX_TYPES} = types";
|
|
1901
|
-
var TSTYPEELEMENT_TYPES = "const {TSTYPEELEMENT_TYPES} = types";
|
|
1902
|
-
var TSTYPE_TYPES = "const {TSTYPE_TYPES} = types";
|
|
1903
|
-
var TSBASETYPE_TYPES = "const {TSBASETYPE_TYPES} = types";
|
|
1904
|
-
var STATEMENT_OR_BLOCK_KEYS = "const {STATEMENT_OR_BLOCK_KEYS} = types";
|
|
1905
|
-
var FLATTENABLE_KEYS = "const {FLATTENABLE_KEYS} = types";
|
|
1906
|
-
var FOR_INIT_KEYS = "const {FOR_INIT_KEYS} = types";
|
|
1907
|
-
var COMMENT_KEYS = "const {COMMENT_KEYS} = types";
|
|
1908
|
-
var LOGICAL_OPERATORS = "const {LOGICAL_OPERATORS} = types";
|
|
1909
|
-
var UPDATE_OPERATORS = "const {UPDATE_OPERATORS} = types";
|
|
1910
|
-
var BOOLEAN_NUMBER_BINARY_OPERATORS = "const {BOOLEAN_NUMBER_BINARY_OPERATORS} = types";
|
|
1911
|
-
var EQUALITY_BINARY_OPERATORS = "const {EQUALITY_BINARY_OPERATORS} = types";
|
|
1912
|
-
var COMPARISON_BINARY_OPERATORS = "const {COMPARISON_BINARY_OPERATORS} = types";
|
|
1913
|
-
var BOOLEAN_BINARY_OPERATORS = "const {BOOLEAN_BINARY_OPERATORS} = types";
|
|
1914
|
-
var NUMBER_BINARY_OPERATORS = "const {NUMBER_BINARY_OPERATORS} = types";
|
|
1915
|
-
var BINARY_OPERATORS = "const {BINARY_OPERATORS} = types";
|
|
1916
|
-
var ASSIGNMENT_OPERATORS = "const {ASSIGNMENT_OPERATORS} = types";
|
|
1917
|
-
var BOOLEAN_UNARY_OPERATORS = "const {BOOLEAN_UNARY_OPERATORS} = types";
|
|
1918
|
-
var NUMBER_UNARY_OPERATORS = "const {NUMBER_UNARY_OPERATORS} = types";
|
|
1919
|
-
var STRING_UNARY_OPERATORS = "const {STRING_UNARY_OPERATORS} = types";
|
|
1920
|
-
var UNARY_OPERATORS = "const {UNARY_OPERATORS} = types";
|
|
1921
|
-
var INHERIT_KEYS = "const {INHERIT_KEYS} = types";
|
|
1922
|
-
var BLOCK_SCOPED_SYMBOL = "const {BLOCK_SCOPED_SYMBOL} = types";
|
|
1923
|
-
var NOT_LOCAL_BINDING = "const {NOT_LOCAL_BINDING} = types";
|
|
1924
|
-
var VISITOR_KEYS = "const {VISITOR_KEYS} = types";
|
|
1925
|
-
var ALIAS_KEYS = "const {ALIAS_KEYS} = types";
|
|
1926
|
-
var FLIPPED_ALIAS_KEYS = "const {FLIPPED_ALIAS_KEYS} = types";
|
|
1927
|
-
var NODE_FIELDS = "const {NODE_FIELDS} = types";
|
|
1928
|
-
var BUILDER_KEYS = "const {BUILDER_KEYS} = types";
|
|
1929
|
-
var DEPRECATED_KEYS = "const {DEPRECATED_KEYS} = types";
|
|
1930
|
-
var NODE_PARENT_VALIDATIONS = "const {NODE_PARENT_VALIDATIONS} = types";
|
|
1931
|
-
var PLACEHOLDERS = "const {PLACEHOLDERS} = types";
|
|
1932
|
-
var PLACEHOLDERS_ALIAS = "const {PLACEHOLDERS_ALIAS} = types";
|
|
1933
|
-
var PLACEHOLDERS_FLIPPED_ALIAS = "const {PLACEHOLDERS_FLIPPED_ALIAS} = types";
|
|
1934
|
-
var TYPES = "const {TYPES} = types";
|
|
1935
|
-
var isArrayExpression = "const {isArrayExpression} = types";
|
|
1936
|
-
var isAssignmentExpression = "const {isAssignmentExpression} = types";
|
|
1937
|
-
var isBinaryExpression = "const {isBinaryExpression} = types";
|
|
1938
|
-
var isInterpreterDirective = "const {isInterpreterDirective} = types";
|
|
1939
|
-
var isDirective = "const {isDirective} = types";
|
|
1940
|
-
var isDirectiveLiteral = "const {isDirectiveLiteral} = types";
|
|
1941
|
-
var isBlockStatement = "const {isBlockStatement} = types";
|
|
1942
|
-
var isBreakStatement = "const {isBreakStatement} = types";
|
|
1943
|
-
var isCallExpression = "const {isCallExpression} = types";
|
|
1944
|
-
var isCatchClause = "const {isCatchClause} = types";
|
|
1945
|
-
var isConditionalExpression = "const {isConditionalExpression} = types";
|
|
1946
|
-
var isContinueStatement = "const {isContinueStatement} = types";
|
|
1947
|
-
var isDebuggerStatement = "const {isDebuggerStatement} = types";
|
|
1948
|
-
var isDoWhileStatement = "const {isDoWhileStatement} = types";
|
|
1949
|
-
var isEmptyStatement = "const {isEmptyStatement} = types";
|
|
1950
|
-
var isExpressionStatement = "const {isExpressionStatement} = types";
|
|
1951
|
-
var isFile = "const {isFile} = types";
|
|
1952
|
-
var isForInStatement = "const {isForInStatement} = types";
|
|
1953
|
-
var isForStatement = "const {isForStatement} = types";
|
|
1954
|
-
var isFunctionDeclaration = "const {isFunctionDeclaration} = types";
|
|
1955
|
-
var isFunctionExpression = "const {isFunctionExpression} = types";
|
|
1956
|
-
var isIdentifier = "const {isIdentifier} = types";
|
|
1957
|
-
var isIfStatement = "const {isIfStatement} = types";
|
|
1958
|
-
var isLabeledStatement = "const {isLabeledStatement} = types";
|
|
1959
|
-
var isStringLiteral = "const {isStringLiteral} = types";
|
|
1960
|
-
var isNumericLiteral = "const {isNumericLiteral} = types";
|
|
1961
|
-
var isNullLiteral = "const {isNullLiteral} = types";
|
|
1962
|
-
var isBooleanLiteral = "const {isBooleanLiteral} = types";
|
|
1963
|
-
var isRegExpLiteral = "const {isRegExpLiteral} = types";
|
|
1964
|
-
var isLogicalExpression = "const {isLogicalExpression} = types";
|
|
1965
|
-
var isMemberExpression = "const {isMemberExpression} = types";
|
|
1966
|
-
var isNewExpression = "const {isNewExpression} = types";
|
|
1967
|
-
var isProgram = "const {isProgram} = types";
|
|
1968
|
-
var isObjectExpression = "const {isObjectExpression} = types";
|
|
1969
|
-
var isObjectMethod = "const {isObjectMethod} = types";
|
|
1970
|
-
var isObjectProperty = "const {isObjectProperty} = types";
|
|
1971
|
-
var isRestElement = "const {isRestElement} = types";
|
|
1972
|
-
var isReturnStatement = "const {isReturnStatement} = types";
|
|
1973
|
-
var isSequenceExpression = "const {isSequenceExpression} = types";
|
|
1974
|
-
var isParenthesizedExpression = "const {isParenthesizedExpression} = types";
|
|
1975
|
-
var isSwitchCase = "const {isSwitchCase} = types";
|
|
1976
|
-
var isSwitchStatement = "const {isSwitchStatement} = types";
|
|
1977
|
-
var isThisExpression = "const {isThisExpression} = types";
|
|
1978
|
-
var isThrowStatement = "const {isThrowStatement} = types";
|
|
1979
|
-
var isTryStatement = "const {isTryStatement} = types";
|
|
1980
|
-
var isUnaryExpression = "const {isUnaryExpression} = types";
|
|
1981
|
-
var isUpdateExpression = "const {isUpdateExpression} = types";
|
|
1982
|
-
var isVariableDeclaration = "const {isVariableDeclaration} = types";
|
|
1983
|
-
var isVariableDeclarator = "const {isVariableDeclarator} = types";
|
|
1984
|
-
var isWhileStatement = "const {isWhileStatement} = types";
|
|
1985
|
-
var isWithStatement = "const {isWithStatement} = types";
|
|
1986
|
-
var isAssignmentPattern = "const {isAssignmentPattern} = types";
|
|
1987
|
-
var isArrayPattern = "const {isArrayPattern} = types";
|
|
1988
|
-
var isArrowFunctionExpression = "const {isArrowFunctionExpression} = types";
|
|
1989
|
-
var isClassBody = "const {isClassBody} = types";
|
|
1990
|
-
var isClassExpression = "const {isClassExpression} = types";
|
|
1991
|
-
var isClassDeclaration = "const {isClassDeclaration} = types";
|
|
1992
|
-
var isExportAllDeclaration = "const {isExportAllDeclaration} = types";
|
|
1993
|
-
var isExportDefaultDeclaration = "const {isExportDefaultDeclaration} = types";
|
|
1994
|
-
var isExportNamedDeclaration = "const {isExportNamedDeclaration} = types";
|
|
1995
|
-
var isExportSpecifier = "const {isExportSpecifier} = types";
|
|
1996
|
-
var isForOfStatement = "const {isForOfStatement} = types";
|
|
1997
|
-
var isImportDeclaration = "const {isImportDeclaration} = types";
|
|
1998
|
-
var isImportDefaultSpecifier = "const {isImportDefaultSpecifier} = types";
|
|
1999
|
-
var isImportNamespaceSpecifier = "const {isImportNamespaceSpecifier} = types";
|
|
2000
|
-
var isImportSpecifier = "const {isImportSpecifier} = types";
|
|
2001
|
-
var isMetaProperty = "const {isMetaProperty} = types";
|
|
2002
|
-
var isClassMethod = "const {isClassMethod} = types";
|
|
2003
|
-
var isObjectPattern = "const {isObjectPattern} = types";
|
|
2004
|
-
var isSpreadElement = "const {isSpreadElement} = types";
|
|
2005
|
-
var isSuper = "const {isSuper} = types";
|
|
2006
|
-
var isTaggedTemplateExpression = "const {isTaggedTemplateExpression} = types";
|
|
2007
|
-
var isTemplateElement = "const {isTemplateElement} = types";
|
|
2008
|
-
var isTemplateLiteral = "const {isTemplateLiteral} = types";
|
|
2009
|
-
var isYieldExpression = "const {isYieldExpression} = types";
|
|
2010
|
-
var isAwaitExpression = "const {isAwaitExpression} = types";
|
|
2011
|
-
var isImport = "const {isImport} = types";
|
|
2012
|
-
var isBigIntLiteral = "const {isBigIntLiteral} = types";
|
|
2013
|
-
var isExportNamespaceSpecifier = "const {isExportNamespaceSpecifier} = types";
|
|
2014
|
-
var isOptionalMemberExpression = "const {isOptionalMemberExpression} = types";
|
|
2015
|
-
var isOptionalCallExpression = "const {isOptionalCallExpression} = types";
|
|
2016
|
-
var isClassProperty = "const {isClassProperty} = types";
|
|
2017
|
-
var isClassPrivateProperty = "const {isClassPrivateProperty} = types";
|
|
2018
|
-
var isClassPrivateMethod = "const {isClassPrivateMethod} = types";
|
|
2019
|
-
var isPrivateName = "const {isPrivateName} = types";
|
|
2020
|
-
var isAnyTypeAnnotation = "const {isAnyTypeAnnotation} = types";
|
|
2021
|
-
var isArrayTypeAnnotation = "const {isArrayTypeAnnotation} = types";
|
|
2022
|
-
var isBooleanTypeAnnotation = "const {isBooleanTypeAnnotation} = types";
|
|
2023
|
-
var isBooleanLiteralTypeAnnotation = "const {isBooleanLiteralTypeAnnotation} = types";
|
|
2024
|
-
var isNullLiteralTypeAnnotation = "const {isNullLiteralTypeAnnotation} = types";
|
|
2025
|
-
var isClassImplements = "const {isClassImplements} = types";
|
|
2026
|
-
var isDeclareClass = "const {isDeclareClass} = types";
|
|
2027
|
-
var isDeclareFunction = "const {isDeclareFunction} = types";
|
|
2028
|
-
var isDeclareInterface = "const {isDeclareInterface} = types";
|
|
2029
|
-
var isDeclareModule = "const {isDeclareModule} = types";
|
|
2030
|
-
var isDeclareModuleExports = "const {isDeclareModuleExports} = types";
|
|
2031
|
-
var isDeclareTypeAlias = "const {isDeclareTypeAlias} = types";
|
|
2032
|
-
var isDeclareOpaqueType = "const {isDeclareOpaqueType} = types";
|
|
2033
|
-
var isDeclareVariable = "const {isDeclareVariable} = types";
|
|
2034
|
-
var isDeclareExportDeclaration = "const {isDeclareExportDeclaration} = types";
|
|
2035
|
-
var isDeclareExportAllDeclaration = "const {isDeclareExportAllDeclaration} = types";
|
|
2036
|
-
var isDeclaredPredicate = "const {isDeclaredPredicate} = types";
|
|
2037
|
-
var isExistsTypeAnnotation = "const {isExistsTypeAnnotation} = types";
|
|
2038
|
-
var isFunctionTypeAnnotation = "const {isFunctionTypeAnnotation} = types";
|
|
2039
|
-
var isFunctionTypeParam = "const {isFunctionTypeParam} = types";
|
|
2040
|
-
var isGenericTypeAnnotation = "const {isGenericTypeAnnotation} = types";
|
|
2041
|
-
var isInferredPredicate = "const {isInferredPredicate} = types";
|
|
2042
|
-
var isInterfaceExtends = "const {isInterfaceExtends} = types";
|
|
2043
|
-
var isInterfaceDeclaration = "const {isInterfaceDeclaration} = types";
|
|
2044
|
-
var isInterfaceTypeAnnotation = "const {isInterfaceTypeAnnotation} = types";
|
|
2045
|
-
var isIntersectionTypeAnnotation = "const {isIntersectionTypeAnnotation} = types";
|
|
2046
|
-
var isMixedTypeAnnotation = "const {isMixedTypeAnnotation} = types";
|
|
2047
|
-
var isEmptyTypeAnnotation = "const {isEmptyTypeAnnotation} = types";
|
|
2048
|
-
var isNullableTypeAnnotation = "const {isNullableTypeAnnotation} = types";
|
|
2049
|
-
var isNumberLiteralTypeAnnotation = "const {isNumberLiteralTypeAnnotation} = types";
|
|
2050
|
-
var isNumberTypeAnnotation = "const {isNumberTypeAnnotation} = types";
|
|
2051
|
-
var isObjectTypeAnnotation = "const {isObjectTypeAnnotation} = types";
|
|
2052
|
-
var isObjectTypeInternalSlot = "const {isObjectTypeInternalSlot} = types";
|
|
2053
|
-
var isObjectTypeCallProperty = "const {isObjectTypeCallProperty} = types";
|
|
2054
|
-
var isObjectTypeIndexer = "const {isObjectTypeIndexer} = types";
|
|
2055
|
-
var isObjectTypeProperty = "const {isObjectTypeProperty} = types";
|
|
2056
|
-
var isObjectTypeSpreadProperty = "const {isObjectTypeSpreadProperty} = types";
|
|
2057
|
-
var isOpaqueType = "const {isOpaqueType} = types";
|
|
2058
|
-
var isQualifiedTypeIdentifier = "const {isQualifiedTypeIdentifier} = types";
|
|
2059
|
-
var isStringLiteralTypeAnnotation = "const {isStringLiteralTypeAnnotation} = types";
|
|
2060
|
-
var isStringTypeAnnotation = "const {isStringTypeAnnotation} = types";
|
|
2061
|
-
var isSymbolTypeAnnotation = "const {isSymbolTypeAnnotation} = types";
|
|
2062
|
-
var isThisTypeAnnotation = "const {isThisTypeAnnotation} = types";
|
|
2063
|
-
var isTupleTypeAnnotation = "const {isTupleTypeAnnotation} = types";
|
|
2064
|
-
var isTypeofTypeAnnotation = "const {isTypeofTypeAnnotation} = types";
|
|
2065
|
-
var isTypeAlias = "const {isTypeAlias} = types";
|
|
2066
|
-
var isTypeAnnotation = "const {isTypeAnnotation} = types";
|
|
2067
|
-
var isTypeCastExpression = "const {isTypeCastExpression} = types";
|
|
2068
|
-
var isTypeParameter = "const {isTypeParameter} = types";
|
|
2069
|
-
var isTypeParameterDeclaration = "const {isTypeParameterDeclaration} = types";
|
|
2070
|
-
var isTypeParameterInstantiation = "const {isTypeParameterInstantiation} = types";
|
|
2071
|
-
var isUnionTypeAnnotation = "const {isUnionTypeAnnotation} = types";
|
|
2072
|
-
var isVariance = "const {isVariance} = types";
|
|
2073
|
-
var isVoidTypeAnnotation = "const {isVoidTypeAnnotation} = types";
|
|
2074
|
-
var isEnumDeclaration = "const {isEnumDeclaration} = types";
|
|
2075
|
-
var isEnumBooleanBody = "const {isEnumBooleanBody} = types";
|
|
2076
|
-
var isEnumNumberBody = "const {isEnumNumberBody} = types";
|
|
2077
|
-
var isEnumStringBody = "const {isEnumStringBody} = types";
|
|
2078
|
-
var isEnumSymbolBody = "const {isEnumSymbolBody} = types";
|
|
2079
|
-
var isEnumBooleanMember = "const {isEnumBooleanMember} = types";
|
|
2080
|
-
var isEnumNumberMember = "const {isEnumNumberMember} = types";
|
|
2081
|
-
var isEnumStringMember = "const {isEnumStringMember} = types";
|
|
2082
|
-
var isEnumDefaultedMember = "const {isEnumDefaultedMember} = types";
|
|
2083
|
-
var isIndexedAccessType = "const {isIndexedAccessType} = types";
|
|
2084
|
-
var isOptionalIndexedAccessType = "const {isOptionalIndexedAccessType} = types";
|
|
2085
|
-
var isJSXAttribute = "const {isJSXAttribute} = types";
|
|
2086
|
-
var isJSXClosingElement = "const {isJSXClosingElement} = types";
|
|
2087
|
-
var isJSXElement = "const {isJSXElement} = types";
|
|
2088
|
-
var isJSXEmptyExpression = "const {isJSXEmptyExpression} = types";
|
|
2089
|
-
var isJSXExpressionContainer = "const {isJSXExpressionContainer} = types";
|
|
2090
|
-
var isJSXSpreadChild = "const {isJSXSpreadChild} = types";
|
|
2091
|
-
var isJSXIdentifier = "const {isJSXIdentifier} = types";
|
|
2092
|
-
var isJSXMemberExpression = "const {isJSXMemberExpression} = types";
|
|
2093
|
-
var isJSXNamespacedName = "const {isJSXNamespacedName} = types";
|
|
2094
|
-
var isJSXOpeningElement = "const {isJSXOpeningElement} = types";
|
|
2095
|
-
var isJSXSpreadAttribute = "const {isJSXSpreadAttribute} = types";
|
|
2096
|
-
var isJSXText = "const {isJSXText} = types";
|
|
2097
|
-
var isJSXFragment = "const {isJSXFragment} = types";
|
|
2098
|
-
var isJSXOpeningFragment = "const {isJSXOpeningFragment} = types";
|
|
2099
|
-
var isJSXClosingFragment = "const {isJSXClosingFragment} = types";
|
|
2100
|
-
var isNoop = "const {isNoop} = types";
|
|
2101
|
-
var isPlaceholder = "const {isPlaceholder} = types";
|
|
2102
|
-
var isV8IntrinsicIdentifier = "const {isV8IntrinsicIdentifier} = types";
|
|
2103
|
-
var isArgumentPlaceholder = "const {isArgumentPlaceholder} = types";
|
|
2104
|
-
var isBindExpression = "const {isBindExpression} = types";
|
|
2105
|
-
var isImportAttribute = "const {isImportAttribute} = types";
|
|
2106
|
-
var isDecorator = "const {isDecorator} = types";
|
|
2107
|
-
var isDoExpression = "const {isDoExpression} = types";
|
|
2108
|
-
var isExportDefaultSpecifier = "const {isExportDefaultSpecifier} = types";
|
|
2109
|
-
var isRecordExpression = "const {isRecordExpression} = types";
|
|
2110
|
-
var isTupleExpression = "const {isTupleExpression} = types";
|
|
2111
|
-
var isDecimalLiteral = "const {isDecimalLiteral} = types";
|
|
2112
|
-
var isStaticBlock = "const {isStaticBlock} = types";
|
|
2113
|
-
var isModuleExpression = "const {isModuleExpression} = types";
|
|
2114
|
-
var isTopicReference = "const {isTopicReference} = types";
|
|
2115
|
-
var isPipelineTopicExpression = "const {isPipelineTopicExpression} = types";
|
|
2116
|
-
var isPipelineBareFunction = "const {isPipelineBareFunction} = types";
|
|
2117
|
-
var isPipelinePrimaryTopicReference = "const {isPipelinePrimaryTopicReference} = types";
|
|
2118
|
-
var isTSParameterProperty = "const {isTSParameterProperty} = types";
|
|
2119
|
-
var isTSDeclareFunction = "const {isTSDeclareFunction} = types";
|
|
2120
|
-
var isTSDeclareMethod = "const {isTSDeclareMethod} = types";
|
|
2121
|
-
var isTSQualifiedName = "const {isTSQualifiedName} = types";
|
|
2122
|
-
var isTSCallSignatureDeclaration = "const {isTSCallSignatureDeclaration} = types";
|
|
2123
|
-
var isTSConstructSignatureDeclaration = "const {isTSConstructSignatureDeclaration} = types";
|
|
2124
|
-
var isTSPropertySignature = "const {isTSPropertySignature} = types";
|
|
2125
|
-
var isTSMethodSignature = "const {isTSMethodSignature} = types";
|
|
2126
|
-
var isTSIndexSignature = "const {isTSIndexSignature} = types";
|
|
2127
|
-
var isTSAnyKeyword = "const {isTSAnyKeyword} = types";
|
|
2128
|
-
var isTSBooleanKeyword = "const {isTSBooleanKeyword} = types";
|
|
2129
|
-
var isTSBigIntKeyword = "const {isTSBigIntKeyword} = types";
|
|
2130
|
-
var isTSIntrinsicKeyword = "const {isTSIntrinsicKeyword} = types";
|
|
2131
|
-
var isTSNeverKeyword = "const {isTSNeverKeyword} = types";
|
|
2132
|
-
var isTSNullKeyword = "const {isTSNullKeyword} = types";
|
|
2133
|
-
var isTSNumberKeyword = "const {isTSNumberKeyword} = types";
|
|
2134
|
-
var isTSObjectKeyword = "const {isTSObjectKeyword} = types";
|
|
2135
|
-
var isTSStringKeyword = "const {isTSStringKeyword} = types";
|
|
2136
|
-
var isTSSymbolKeyword = "const {isTSSymbolKeyword} = types";
|
|
2137
|
-
var isTSUndefinedKeyword = "const {isTSUndefinedKeyword} = types";
|
|
2138
|
-
var isTSUnknownKeyword = "const {isTSUnknownKeyword} = types";
|
|
2139
|
-
var isTSVoidKeyword = "const {isTSVoidKeyword} = types";
|
|
2140
|
-
var isTSThisType = "const {isTSThisType} = types";
|
|
2141
|
-
var isTSFunctionType = "const {isTSFunctionType} = types";
|
|
2142
|
-
var isTSConstructorType = "const {isTSConstructorType} = types";
|
|
2143
|
-
var isTSTypeReference = "const {isTSTypeReference} = types";
|
|
2144
|
-
var isTSTypePredicate = "const {isTSTypePredicate} = types";
|
|
2145
|
-
var isTSTypeQuery = "const {isTSTypeQuery} = types";
|
|
2146
|
-
var isTSTypeLiteral = "const {isTSTypeLiteral} = types";
|
|
2147
|
-
var isTSArrayType = "const {isTSArrayType} = types";
|
|
2148
|
-
var isTSTupleType = "const {isTSTupleType} = types";
|
|
2149
|
-
var isTSOptionalType = "const {isTSOptionalType} = types";
|
|
2150
|
-
var isTSRestType = "const {isTSRestType} = types";
|
|
2151
|
-
var isTSNamedTupleMember = "const {isTSNamedTupleMember} = types";
|
|
2152
|
-
var isTSUnionType = "const {isTSUnionType} = types";
|
|
2153
|
-
var isTSIntersectionType = "const {isTSIntersectionType} = types";
|
|
2154
|
-
var isTSConditionalType = "const {isTSConditionalType} = types";
|
|
2155
|
-
var isTSInferType = "const {isTSInferType} = types";
|
|
2156
|
-
var isTSParenthesizedType = "const {isTSParenthesizedType} = types";
|
|
2157
|
-
var isTSTypeOperator = "const {isTSTypeOperator} = types";
|
|
2158
|
-
var isTSIndexedAccessType = "const {isTSIndexedAccessType} = types";
|
|
2159
|
-
var isTSMappedType = "const {isTSMappedType} = types";
|
|
2160
|
-
var isTSLiteralType = "const {isTSLiteralType} = types";
|
|
2161
|
-
var isTSExpressionWithTypeArguments = "const {isTSExpressionWithTypeArguments} = types";
|
|
2162
|
-
var isTSInterfaceDeclaration = "const {isTSInterfaceDeclaration} = types";
|
|
2163
|
-
var isTSInterfaceBody = "const {isTSInterfaceBody} = types";
|
|
2164
|
-
var isTSTypeAliasDeclaration = "const {isTSTypeAliasDeclaration} = types";
|
|
2165
|
-
var isTSAsExpression = "const {isTSAsExpression} = types";
|
|
2166
|
-
var isTSTypeAssertion = "const {isTSTypeAssertion} = types";
|
|
2167
|
-
var isTSEnumDeclaration = "const {isTSEnumDeclaration} = types";
|
|
2168
|
-
var isTSEnumMember = "const {isTSEnumMember} = types";
|
|
2169
|
-
var isTSModuleDeclaration = "const {isTSModuleDeclaration} = types";
|
|
2170
|
-
var isTSModuleBlock = "const {isTSModuleBlock} = types";
|
|
2171
|
-
var isTSImportType = "const {isTSImportType} = types";
|
|
2172
|
-
var isTSImportEqualsDeclaration = "const {isTSImportEqualsDeclaration} = types";
|
|
2173
|
-
var isTSExternalModuleReference = "const {isTSExternalModuleReference} = types";
|
|
2174
|
-
var isTSNonNullExpression = "const {isTSNonNullExpression} = types";
|
|
2175
|
-
var isTSExportAssignment = "const {isTSExportAssignment} = types";
|
|
2176
|
-
var isTSNamespaceExportDeclaration = "const {isTSNamespaceExportDeclaration} = types";
|
|
2177
|
-
var isTSTypeAnnotation = "const {isTSTypeAnnotation} = types";
|
|
2178
|
-
var isTSTypeParameterInstantiation = "const {isTSTypeParameterInstantiation} = types";
|
|
2179
|
-
var isTSTypeParameterDeclaration = "const {isTSTypeParameterDeclaration} = types";
|
|
2180
|
-
var isTSTypeParameter = "const {isTSTypeParameter} = types";
|
|
2181
|
-
var isExpression = "const {isExpression} = types";
|
|
2182
|
-
var isBinary = "const {isBinary} = types";
|
|
2183
|
-
var isScopable = "const {isScopable} = types";
|
|
2184
|
-
var isBlockParent = "const {isBlockParent} = types";
|
|
2185
|
-
var isBlock = "const {isBlock} = types";
|
|
2186
|
-
var isStatement = "const {isStatement} = types";
|
|
2187
|
-
var isTerminatorless = "const {isTerminatorless} = types";
|
|
2188
|
-
var isCompletionStatement = "const {isCompletionStatement} = types";
|
|
2189
|
-
var isConditional = "const {isConditional} = types";
|
|
2190
|
-
var isLoop = "const {isLoop} = types";
|
|
2191
|
-
var isWhile = "const {isWhile} = types";
|
|
2192
|
-
var isExpressionWrapper = "const {isExpressionWrapper} = types";
|
|
2193
|
-
var isFor = "const {isFor} = types";
|
|
2194
|
-
var isForXStatement = "const {isForXStatement} = types";
|
|
2195
|
-
var isFunction = "const {isFunction} = types";
|
|
2196
|
-
var isFunctionParent = "const {isFunctionParent} = types";
|
|
2197
|
-
var isPureish = "const {isPureish} = types";
|
|
2198
|
-
var isDeclaration = "const {isDeclaration} = types";
|
|
2199
|
-
var isPatternLike = "const {isPatternLike} = types";
|
|
2200
|
-
var isLVal = "const {isLVal} = types";
|
|
2201
|
-
var isTSEntityName = "const {isTSEntityName} = types";
|
|
2202
|
-
var isLiteral = "const {isLiteral} = types";
|
|
2203
|
-
var isUserWhitespacable = "const {isUserWhitespacable} = types";
|
|
2204
|
-
var isMethod = "const {isMethod} = types";
|
|
2205
|
-
var isObjectMember = "const {isObjectMember} = types";
|
|
2206
|
-
var isProperty = "const {isProperty} = types";
|
|
2207
|
-
var isUnaryLike = "const {isUnaryLike} = types";
|
|
2208
|
-
var isPattern = "const {isPattern} = types";
|
|
2209
|
-
var isClass = "const {isClass} = types";
|
|
2210
|
-
var isModuleDeclaration = "const {isModuleDeclaration} = types";
|
|
2211
|
-
var isExportDeclaration = "const {isExportDeclaration} = types";
|
|
2212
|
-
var isModuleSpecifier = "const {isModuleSpecifier} = types";
|
|
2213
|
-
var isPrivate = "const {isPrivate} = types";
|
|
2214
|
-
var isFlow = "const {isFlow} = types";
|
|
2215
|
-
var isFlowType = "const {isFlowType} = types";
|
|
2216
|
-
var isFlowBaseAnnotation = "const {isFlowBaseAnnotation} = types";
|
|
2217
|
-
var isFlowDeclaration = "const {isFlowDeclaration} = types";
|
|
2218
|
-
var isFlowPredicate = "const {isFlowPredicate} = types";
|
|
2219
|
-
var isEnumBody = "const {isEnumBody} = types";
|
|
2220
|
-
var isEnumMember = "const {isEnumMember} = types";
|
|
2221
|
-
var isJSX = "const {isJSX} = types";
|
|
2222
|
-
var isTSTypeElement = "const {isTSTypeElement} = types";
|
|
2223
|
-
var isTSType = "const {isTSType} = types";
|
|
2224
|
-
var isTSBaseType = "const {isTSBaseType} = types";
|
|
2225
|
-
var isNumberLiteral = "const {isNumberLiteral} = types";
|
|
2226
|
-
var isRegexLiteral = "const {isRegexLiteral} = types";
|
|
2227
|
-
var isRestProperty = "const {isRestProperty} = types";
|
|
2228
|
-
var isSpreadProperty = "const {isSpreadProperty} = types";
|
|
2229
|
-
var require$$0 = {
|
|
2230
|
-
types: types,
|
|
2231
|
-
is: is,
|
|
2232
|
-
isBinding: isBinding,
|
|
2233
|
-
isBlockScoped: isBlockScoped,
|
|
2234
|
-
isImmutable: isImmutable,
|
|
2235
|
-
isLet: isLet,
|
|
2236
|
-
isNode: isNode,
|
|
2237
|
-
isNodesEquivalent: isNodesEquivalent,
|
|
2238
|
-
isPlaceholderType: isPlaceholderType,
|
|
2239
|
-
isReferenced: isReferenced,
|
|
2240
|
-
isScope: isScope,
|
|
2241
|
-
isSpecifierDefault: isSpecifierDefault,
|
|
2242
|
-
isType: isType,
|
|
2243
|
-
isValidES3Identifier: isValidES3Identifier,
|
|
2244
|
-
isValidIdentifier: isValidIdentifier,
|
|
2245
|
-
isVar: isVar,
|
|
2246
|
-
ArrayExpression: ArrayExpression,
|
|
2247
|
-
AssignmentExpression: AssignmentExpression,
|
|
2248
|
-
BinaryExpression: BinaryExpression,
|
|
2249
|
-
InterpreterDirective: InterpreterDirective,
|
|
2250
|
-
Directive: Directive,
|
|
2251
|
-
DirectiveLiteral: DirectiveLiteral,
|
|
2252
|
-
BlockStatement: BlockStatement,
|
|
2253
|
-
BreakStatement: BreakStatement,
|
|
2254
|
-
CallExpression: CallExpression,
|
|
2255
|
-
CatchClause: CatchClause,
|
|
2256
|
-
ConditionalExpression: ConditionalExpression,
|
|
2257
|
-
ContinueStatement: ContinueStatement,
|
|
2258
|
-
DebuggerStatement: DebuggerStatement,
|
|
2259
|
-
DoWhileStatement: DoWhileStatement,
|
|
2260
|
-
EmptyStatement: EmptyStatement,
|
|
2261
|
-
ExpressionStatement: ExpressionStatement,
|
|
2262
|
-
File: File,
|
|
2263
|
-
ForInStatement: ForInStatement,
|
|
2264
|
-
ForStatement: ForStatement,
|
|
2265
|
-
FunctionDeclaration: FunctionDeclaration,
|
|
2266
|
-
FunctionExpression: FunctionExpression,
|
|
2267
|
-
Identifier: Identifier,
|
|
2268
|
-
IfStatement: IfStatement,
|
|
2269
|
-
LabeledStatement: LabeledStatement,
|
|
2270
|
-
StringLiteral: StringLiteral,
|
|
2271
|
-
NumericLiteral: NumericLiteral,
|
|
2272
|
-
NullLiteral: NullLiteral,
|
|
2273
|
-
BooleanLiteral: BooleanLiteral,
|
|
2274
|
-
RegExpLiteral: RegExpLiteral,
|
|
2275
|
-
LogicalExpression: LogicalExpression,
|
|
2276
|
-
MemberExpression: MemberExpression,
|
|
2277
|
-
NewExpression: NewExpression,
|
|
2278
|
-
Program: Program,
|
|
2279
|
-
ObjectExpression: ObjectExpression,
|
|
2280
|
-
ObjectMethod: ObjectMethod,
|
|
2281
|
-
ObjectProperty: ObjectProperty,
|
|
2282
|
-
RestElement: RestElement,
|
|
2283
|
-
ReturnStatement: ReturnStatement,
|
|
2284
|
-
SequenceExpression: SequenceExpression,
|
|
2285
|
-
ParenthesizedExpression: ParenthesizedExpression,
|
|
2286
|
-
SwitchCase: SwitchCase,
|
|
2287
|
-
SwitchStatement: SwitchStatement,
|
|
2288
|
-
ThisExpression: ThisExpression,
|
|
2289
|
-
ThrowStatement: ThrowStatement,
|
|
2290
|
-
TryStatement: TryStatement,
|
|
2291
|
-
UnaryExpression: UnaryExpression,
|
|
2292
|
-
UpdateExpression: UpdateExpression,
|
|
2293
|
-
VariableDeclaration: VariableDeclaration,
|
|
2294
|
-
VariableDeclarator: VariableDeclarator,
|
|
2295
|
-
WhileStatement: WhileStatement,
|
|
2296
|
-
WithStatement: WithStatement,
|
|
2297
|
-
AssignmentPattern: AssignmentPattern,
|
|
2298
|
-
ArrayPattern: ArrayPattern,
|
|
2299
|
-
ArrowFunctionExpression: ArrowFunctionExpression,
|
|
2300
|
-
ClassBody: ClassBody,
|
|
2301
|
-
ClassExpression: ClassExpression,
|
|
2302
|
-
ClassDeclaration: ClassDeclaration,
|
|
2303
|
-
ExportAllDeclaration: ExportAllDeclaration,
|
|
2304
|
-
ExportDefaultDeclaration: ExportDefaultDeclaration,
|
|
2305
|
-
ExportNamedDeclaration: ExportNamedDeclaration,
|
|
2306
|
-
ExportSpecifier: ExportSpecifier,
|
|
2307
|
-
ForOfStatement: ForOfStatement,
|
|
2308
|
-
ImportDeclaration: ImportDeclaration,
|
|
2309
|
-
ImportDefaultSpecifier: ImportDefaultSpecifier,
|
|
2310
|
-
ImportNamespaceSpecifier: ImportNamespaceSpecifier,
|
|
2311
|
-
ImportSpecifier: ImportSpecifier,
|
|
2312
|
-
MetaProperty: MetaProperty,
|
|
2313
|
-
ClassMethod: ClassMethod,
|
|
2314
|
-
ObjectPattern: ObjectPattern,
|
|
2315
|
-
SpreadElement: SpreadElement,
|
|
2316
|
-
Super: Super,
|
|
2317
|
-
TaggedTemplateExpression: TaggedTemplateExpression,
|
|
2318
|
-
TemplateElement: TemplateElement,
|
|
2319
|
-
TemplateLiteral: TemplateLiteral,
|
|
2320
|
-
YieldExpression: YieldExpression,
|
|
2321
|
-
AwaitExpression: AwaitExpression,
|
|
2322
|
-
Import: Import,
|
|
2323
|
-
BigIntLiteral: BigIntLiteral,
|
|
2324
|
-
ExportNamespaceSpecifier: ExportNamespaceSpecifier,
|
|
2325
|
-
OptionalMemberExpression: OptionalMemberExpression,
|
|
2326
|
-
OptionalCallExpression: OptionalCallExpression,
|
|
2327
|
-
ClassProperty: ClassProperty,
|
|
2328
|
-
ClassPrivateProperty: ClassPrivateProperty,
|
|
2329
|
-
ClassPrivateMethod: ClassPrivateMethod,
|
|
2330
|
-
PrivateName: PrivateName,
|
|
2331
|
-
AnyTypeAnnotation: AnyTypeAnnotation,
|
|
2332
|
-
ArrayTypeAnnotation: ArrayTypeAnnotation,
|
|
2333
|
-
BooleanTypeAnnotation: BooleanTypeAnnotation,
|
|
2334
|
-
BooleanLiteralTypeAnnotation: BooleanLiteralTypeAnnotation,
|
|
2335
|
-
NullLiteralTypeAnnotation: NullLiteralTypeAnnotation,
|
|
2336
|
-
ClassImplements: ClassImplements,
|
|
2337
|
-
DeclareClass: DeclareClass,
|
|
2338
|
-
DeclareFunction: DeclareFunction,
|
|
2339
|
-
DeclareInterface: DeclareInterface,
|
|
2340
|
-
DeclareModule: DeclareModule,
|
|
2341
|
-
DeclareModuleExports: DeclareModuleExports,
|
|
2342
|
-
DeclareTypeAlias: DeclareTypeAlias,
|
|
2343
|
-
DeclareOpaqueType: DeclareOpaqueType,
|
|
2344
|
-
DeclareVariable: DeclareVariable,
|
|
2345
|
-
DeclareExportDeclaration: DeclareExportDeclaration,
|
|
2346
|
-
DeclareExportAllDeclaration: DeclareExportAllDeclaration,
|
|
2347
|
-
DeclaredPredicate: DeclaredPredicate,
|
|
2348
|
-
ExistsTypeAnnotation: ExistsTypeAnnotation,
|
|
2349
|
-
FunctionTypeAnnotation: FunctionTypeAnnotation,
|
|
2350
|
-
FunctionTypeParam: FunctionTypeParam,
|
|
2351
|
-
GenericTypeAnnotation: GenericTypeAnnotation,
|
|
2352
|
-
InferredPredicate: InferredPredicate,
|
|
2353
|
-
InterfaceExtends: InterfaceExtends,
|
|
2354
|
-
InterfaceDeclaration: InterfaceDeclaration,
|
|
2355
|
-
InterfaceTypeAnnotation: InterfaceTypeAnnotation,
|
|
2356
|
-
IntersectionTypeAnnotation: IntersectionTypeAnnotation,
|
|
2357
|
-
MixedTypeAnnotation: MixedTypeAnnotation,
|
|
2358
|
-
EmptyTypeAnnotation: EmptyTypeAnnotation,
|
|
2359
|
-
NullableTypeAnnotation: NullableTypeAnnotation,
|
|
2360
|
-
NumberLiteralTypeAnnotation: NumberLiteralTypeAnnotation,
|
|
2361
|
-
NumberTypeAnnotation: NumberTypeAnnotation,
|
|
2362
|
-
ObjectTypeAnnotation: ObjectTypeAnnotation,
|
|
2363
|
-
ObjectTypeInternalSlot: ObjectTypeInternalSlot,
|
|
2364
|
-
ObjectTypeCallProperty: ObjectTypeCallProperty,
|
|
2365
|
-
ObjectTypeIndexer: ObjectTypeIndexer,
|
|
2366
|
-
ObjectTypeProperty: ObjectTypeProperty,
|
|
2367
|
-
ObjectTypeSpreadProperty: ObjectTypeSpreadProperty,
|
|
2368
|
-
OpaqueType: OpaqueType,
|
|
2369
|
-
QualifiedTypeIdentifier: QualifiedTypeIdentifier,
|
|
2370
|
-
StringLiteralTypeAnnotation: StringLiteralTypeAnnotation,
|
|
2371
|
-
StringTypeAnnotation: StringTypeAnnotation,
|
|
2372
|
-
SymbolTypeAnnotation: SymbolTypeAnnotation,
|
|
2373
|
-
ThisTypeAnnotation: ThisTypeAnnotation,
|
|
2374
|
-
TupleTypeAnnotation: TupleTypeAnnotation,
|
|
2375
|
-
TypeofTypeAnnotation: TypeofTypeAnnotation,
|
|
2376
|
-
TypeAlias: TypeAlias,
|
|
2377
|
-
TypeAnnotation: TypeAnnotation,
|
|
2378
|
-
TypeCastExpression: TypeCastExpression,
|
|
2379
|
-
TypeParameter: TypeParameter,
|
|
2380
|
-
TypeParameterDeclaration: TypeParameterDeclaration,
|
|
2381
|
-
TypeParameterInstantiation: TypeParameterInstantiation,
|
|
2382
|
-
UnionTypeAnnotation: UnionTypeAnnotation,
|
|
2383
|
-
Variance: Variance,
|
|
2384
|
-
VoidTypeAnnotation: VoidTypeAnnotation,
|
|
2385
|
-
EnumDeclaration: EnumDeclaration,
|
|
2386
|
-
EnumBooleanBody: EnumBooleanBody,
|
|
2387
|
-
EnumNumberBody: EnumNumberBody,
|
|
2388
|
-
EnumStringBody: EnumStringBody,
|
|
2389
|
-
EnumSymbolBody: EnumSymbolBody,
|
|
2390
|
-
EnumBooleanMember: EnumBooleanMember,
|
|
2391
|
-
EnumNumberMember: EnumNumberMember,
|
|
2392
|
-
EnumStringMember: EnumStringMember,
|
|
2393
|
-
EnumDefaultedMember: EnumDefaultedMember,
|
|
2394
|
-
IndexedAccessType: IndexedAccessType,
|
|
2395
|
-
OptionalIndexedAccessType: OptionalIndexedAccessType,
|
|
2396
|
-
JSXAttribute: JSXAttribute,
|
|
2397
|
-
JSXClosingElement: JSXClosingElement,
|
|
2398
|
-
JSXElement: JSXElement,
|
|
2399
|
-
JSXEmptyExpression: JSXEmptyExpression,
|
|
2400
|
-
JSXExpressionContainer: JSXExpressionContainer,
|
|
2401
|
-
JSXSpreadChild: JSXSpreadChild,
|
|
2402
|
-
JSXIdentifier: JSXIdentifier,
|
|
2403
|
-
JSXMemberExpression: JSXMemberExpression,
|
|
2404
|
-
JSXNamespacedName: JSXNamespacedName,
|
|
2405
|
-
JSXOpeningElement: JSXOpeningElement,
|
|
2406
|
-
JSXSpreadAttribute: JSXSpreadAttribute,
|
|
2407
|
-
JSXText: JSXText,
|
|
2408
|
-
JSXFragment: JSXFragment,
|
|
2409
|
-
JSXOpeningFragment: JSXOpeningFragment,
|
|
2410
|
-
JSXClosingFragment: JSXClosingFragment,
|
|
2411
|
-
Noop: Noop,
|
|
2412
|
-
Placeholder: Placeholder,
|
|
2413
|
-
V8IntrinsicIdentifier: V8IntrinsicIdentifier,
|
|
2414
|
-
ArgumentPlaceholder: ArgumentPlaceholder,
|
|
2415
|
-
BindExpression: BindExpression,
|
|
2416
|
-
ImportAttribute: ImportAttribute,
|
|
2417
|
-
Decorator: Decorator,
|
|
2418
|
-
DoExpression: DoExpression,
|
|
2419
|
-
ExportDefaultSpecifier: ExportDefaultSpecifier,
|
|
2420
|
-
RecordExpression: RecordExpression,
|
|
2421
|
-
TupleExpression: TupleExpression,
|
|
2422
|
-
DecimalLiteral: DecimalLiteral,
|
|
2423
|
-
StaticBlock: StaticBlock,
|
|
2424
|
-
ModuleExpression: ModuleExpression,
|
|
2425
|
-
TopicReference: TopicReference,
|
|
2426
|
-
PipelineTopicExpression: PipelineTopicExpression,
|
|
2427
|
-
PipelineBareFunction: PipelineBareFunction,
|
|
2428
|
-
PipelinePrimaryTopicReference: PipelinePrimaryTopicReference,
|
|
2429
|
-
TSParameterProperty: TSParameterProperty,
|
|
2430
|
-
TSDeclareFunction: TSDeclareFunction,
|
|
2431
|
-
TSDeclareMethod: TSDeclareMethod,
|
|
2432
|
-
TSQualifiedName: TSQualifiedName,
|
|
2433
|
-
TSCallSignatureDeclaration: TSCallSignatureDeclaration,
|
|
2434
|
-
TSConstructSignatureDeclaration: TSConstructSignatureDeclaration,
|
|
2435
|
-
TSPropertySignature: TSPropertySignature,
|
|
2436
|
-
TSMethodSignature: TSMethodSignature,
|
|
2437
|
-
TSIndexSignature: TSIndexSignature,
|
|
2438
|
-
TSAnyKeyword: TSAnyKeyword,
|
|
2439
|
-
TSBooleanKeyword: TSBooleanKeyword,
|
|
2440
|
-
TSBigIntKeyword: TSBigIntKeyword,
|
|
2441
|
-
TSIntrinsicKeyword: TSIntrinsicKeyword,
|
|
2442
|
-
TSNeverKeyword: TSNeverKeyword,
|
|
2443
|
-
TSNullKeyword: TSNullKeyword,
|
|
2444
|
-
TSNumberKeyword: TSNumberKeyword,
|
|
2445
|
-
TSObjectKeyword: TSObjectKeyword,
|
|
2446
|
-
TSStringKeyword: TSStringKeyword,
|
|
2447
|
-
TSSymbolKeyword: TSSymbolKeyword,
|
|
2448
|
-
TSUndefinedKeyword: TSUndefinedKeyword,
|
|
2449
|
-
TSUnknownKeyword: TSUnknownKeyword,
|
|
2450
|
-
TSVoidKeyword: TSVoidKeyword,
|
|
2451
|
-
TSThisType: TSThisType,
|
|
2452
|
-
TSFunctionType: TSFunctionType,
|
|
2453
|
-
TSConstructorType: TSConstructorType,
|
|
2454
|
-
TSTypeReference: TSTypeReference,
|
|
2455
|
-
TSTypePredicate: TSTypePredicate,
|
|
2456
|
-
TSTypeQuery: TSTypeQuery,
|
|
2457
|
-
TSTypeLiteral: TSTypeLiteral,
|
|
2458
|
-
TSArrayType: TSArrayType,
|
|
2459
|
-
TSTupleType: TSTupleType,
|
|
2460
|
-
TSOptionalType: TSOptionalType,
|
|
2461
|
-
TSRestType: TSRestType,
|
|
2462
|
-
TSNamedTupleMember: TSNamedTupleMember,
|
|
2463
|
-
TSUnionType: TSUnionType,
|
|
2464
|
-
TSIntersectionType: TSIntersectionType,
|
|
2465
|
-
TSConditionalType: TSConditionalType,
|
|
2466
|
-
TSInferType: TSInferType,
|
|
2467
|
-
TSParenthesizedType: TSParenthesizedType,
|
|
2468
|
-
TSTypeOperator: TSTypeOperator,
|
|
2469
|
-
TSIndexedAccessType: TSIndexedAccessType,
|
|
2470
|
-
TSMappedType: TSMappedType,
|
|
2471
|
-
TSLiteralType: TSLiteralType,
|
|
2472
|
-
TSExpressionWithTypeArguments: TSExpressionWithTypeArguments,
|
|
2473
|
-
TSInterfaceDeclaration: TSInterfaceDeclaration,
|
|
2474
|
-
TSInterfaceBody: TSInterfaceBody,
|
|
2475
|
-
TSTypeAliasDeclaration: TSTypeAliasDeclaration,
|
|
2476
|
-
TSAsExpression: TSAsExpression,
|
|
2477
|
-
TSTypeAssertion: TSTypeAssertion,
|
|
2478
|
-
TSEnumDeclaration: TSEnumDeclaration,
|
|
2479
|
-
TSEnumMember: TSEnumMember,
|
|
2480
|
-
TSModuleDeclaration: TSModuleDeclaration,
|
|
2481
|
-
TSModuleBlock: TSModuleBlock,
|
|
2482
|
-
TSImportType: TSImportType,
|
|
2483
|
-
TSImportEqualsDeclaration: TSImportEqualsDeclaration,
|
|
2484
|
-
TSExternalModuleReference: TSExternalModuleReference,
|
|
2485
|
-
TSNonNullExpression: TSNonNullExpression,
|
|
2486
|
-
TSExportAssignment: TSExportAssignment,
|
|
2487
|
-
TSNamespaceExportDeclaration: TSNamespaceExportDeclaration,
|
|
2488
|
-
TSTypeAnnotation: TSTypeAnnotation,
|
|
2489
|
-
TSTypeParameterInstantiation: TSTypeParameterInstantiation,
|
|
2490
|
-
TSTypeParameterDeclaration: TSTypeParameterDeclaration,
|
|
2491
|
-
TSTypeParameter: TSTypeParameter,
|
|
2492
|
-
NumberLiteral: NumberLiteral,
|
|
2493
|
-
RegexLiteral: RegexLiteral,
|
|
2494
|
-
RestProperty: RestProperty,
|
|
2495
|
-
SpreadProperty: SpreadProperty,
|
|
2496
|
-
EXPRESSION_TYPES: EXPRESSION_TYPES,
|
|
2497
|
-
BINARY_TYPES: BINARY_TYPES,
|
|
2498
|
-
SCOPABLE_TYPES: SCOPABLE_TYPES,
|
|
2499
|
-
BLOCKPARENT_TYPES: BLOCKPARENT_TYPES,
|
|
2500
|
-
BLOCK_TYPES: BLOCK_TYPES,
|
|
2501
|
-
STATEMENT_TYPES: STATEMENT_TYPES,
|
|
2502
|
-
TERMINATORLESS_TYPES: TERMINATORLESS_TYPES,
|
|
2503
|
-
COMPLETIONSTATEMENT_TYPES: COMPLETIONSTATEMENT_TYPES,
|
|
2504
|
-
CONDITIONAL_TYPES: CONDITIONAL_TYPES,
|
|
2505
|
-
LOOP_TYPES: LOOP_TYPES,
|
|
2506
|
-
WHILE_TYPES: WHILE_TYPES,
|
|
2507
|
-
EXPRESSIONWRAPPER_TYPES: EXPRESSIONWRAPPER_TYPES,
|
|
2508
|
-
FOR_TYPES: FOR_TYPES,
|
|
2509
|
-
FORXSTATEMENT_TYPES: FORXSTATEMENT_TYPES,
|
|
2510
|
-
FUNCTION_TYPES: FUNCTION_TYPES,
|
|
2511
|
-
FUNCTIONPARENT_TYPES: FUNCTIONPARENT_TYPES,
|
|
2512
|
-
PUREISH_TYPES: PUREISH_TYPES,
|
|
2513
|
-
DECLARATION_TYPES: DECLARATION_TYPES,
|
|
2514
|
-
PATTERNLIKE_TYPES: PATTERNLIKE_TYPES,
|
|
2515
|
-
LVAL_TYPES: LVAL_TYPES,
|
|
2516
|
-
TSENTITYNAME_TYPES: TSENTITYNAME_TYPES,
|
|
2517
|
-
LITERAL_TYPES: LITERAL_TYPES,
|
|
2518
|
-
IMMUTABLE_TYPES: IMMUTABLE_TYPES,
|
|
2519
|
-
USERWHITESPACABLE_TYPES: USERWHITESPACABLE_TYPES,
|
|
2520
|
-
METHOD_TYPES: METHOD_TYPES,
|
|
2521
|
-
OBJECTMEMBER_TYPES: OBJECTMEMBER_TYPES,
|
|
2522
|
-
PROPERTY_TYPES: PROPERTY_TYPES,
|
|
2523
|
-
UNARYLIKE_TYPES: UNARYLIKE_TYPES,
|
|
2524
|
-
PATTERN_TYPES: PATTERN_TYPES,
|
|
2525
|
-
CLASS_TYPES: CLASS_TYPES,
|
|
2526
|
-
MODULEDECLARATION_TYPES: MODULEDECLARATION_TYPES,
|
|
2527
|
-
EXPORTDECLARATION_TYPES: EXPORTDECLARATION_TYPES,
|
|
2528
|
-
MODULESPECIFIER_TYPES: MODULESPECIFIER_TYPES,
|
|
2529
|
-
PRIVATE_TYPES: PRIVATE_TYPES,
|
|
2530
|
-
FLOW_TYPES: FLOW_TYPES,
|
|
2531
|
-
FLOWTYPE_TYPES: FLOWTYPE_TYPES,
|
|
2532
|
-
FLOWBASEANNOTATION_TYPES: FLOWBASEANNOTATION_TYPES,
|
|
2533
|
-
FLOWDECLARATION_TYPES: FLOWDECLARATION_TYPES,
|
|
2534
|
-
FLOWPREDICATE_TYPES: FLOWPREDICATE_TYPES,
|
|
2535
|
-
ENUMBODY_TYPES: ENUMBODY_TYPES,
|
|
2536
|
-
ENUMMEMBER_TYPES: ENUMMEMBER_TYPES,
|
|
2537
|
-
JSX_TYPES: JSX_TYPES,
|
|
2538
|
-
TSTYPEELEMENT_TYPES: TSTYPEELEMENT_TYPES,
|
|
2539
|
-
TSTYPE_TYPES: TSTYPE_TYPES,
|
|
2540
|
-
TSBASETYPE_TYPES: TSBASETYPE_TYPES,
|
|
2541
|
-
STATEMENT_OR_BLOCK_KEYS: STATEMENT_OR_BLOCK_KEYS,
|
|
2542
|
-
FLATTENABLE_KEYS: FLATTENABLE_KEYS,
|
|
2543
|
-
FOR_INIT_KEYS: FOR_INIT_KEYS,
|
|
2544
|
-
COMMENT_KEYS: COMMENT_KEYS,
|
|
2545
|
-
LOGICAL_OPERATORS: LOGICAL_OPERATORS,
|
|
2546
|
-
UPDATE_OPERATORS: UPDATE_OPERATORS,
|
|
2547
|
-
BOOLEAN_NUMBER_BINARY_OPERATORS: BOOLEAN_NUMBER_BINARY_OPERATORS,
|
|
2548
|
-
EQUALITY_BINARY_OPERATORS: EQUALITY_BINARY_OPERATORS,
|
|
2549
|
-
COMPARISON_BINARY_OPERATORS: COMPARISON_BINARY_OPERATORS,
|
|
2550
|
-
BOOLEAN_BINARY_OPERATORS: BOOLEAN_BINARY_OPERATORS,
|
|
2551
|
-
NUMBER_BINARY_OPERATORS: NUMBER_BINARY_OPERATORS,
|
|
2552
|
-
BINARY_OPERATORS: BINARY_OPERATORS,
|
|
2553
|
-
ASSIGNMENT_OPERATORS: ASSIGNMENT_OPERATORS,
|
|
2554
|
-
BOOLEAN_UNARY_OPERATORS: BOOLEAN_UNARY_OPERATORS,
|
|
2555
|
-
NUMBER_UNARY_OPERATORS: NUMBER_UNARY_OPERATORS,
|
|
2556
|
-
STRING_UNARY_OPERATORS: STRING_UNARY_OPERATORS,
|
|
2557
|
-
UNARY_OPERATORS: UNARY_OPERATORS,
|
|
2558
|
-
INHERIT_KEYS: INHERIT_KEYS,
|
|
2559
|
-
BLOCK_SCOPED_SYMBOL: BLOCK_SCOPED_SYMBOL,
|
|
2560
|
-
NOT_LOCAL_BINDING: NOT_LOCAL_BINDING,
|
|
2561
|
-
VISITOR_KEYS: VISITOR_KEYS,
|
|
2562
|
-
ALIAS_KEYS: ALIAS_KEYS,
|
|
2563
|
-
FLIPPED_ALIAS_KEYS: FLIPPED_ALIAS_KEYS,
|
|
2564
|
-
NODE_FIELDS: NODE_FIELDS,
|
|
2565
|
-
BUILDER_KEYS: BUILDER_KEYS,
|
|
2566
|
-
DEPRECATED_KEYS: DEPRECATED_KEYS,
|
|
2567
|
-
NODE_PARENT_VALIDATIONS: NODE_PARENT_VALIDATIONS,
|
|
2568
|
-
PLACEHOLDERS: PLACEHOLDERS,
|
|
2569
|
-
PLACEHOLDERS_ALIAS: PLACEHOLDERS_ALIAS,
|
|
2570
|
-
PLACEHOLDERS_FLIPPED_ALIAS: PLACEHOLDERS_FLIPPED_ALIAS,
|
|
2571
|
-
TYPES: TYPES,
|
|
2572
|
-
isArrayExpression: isArrayExpression,
|
|
2573
|
-
isAssignmentExpression: isAssignmentExpression,
|
|
2574
|
-
isBinaryExpression: isBinaryExpression,
|
|
2575
|
-
isInterpreterDirective: isInterpreterDirective,
|
|
2576
|
-
isDirective: isDirective,
|
|
2577
|
-
isDirectiveLiteral: isDirectiveLiteral,
|
|
2578
|
-
isBlockStatement: isBlockStatement,
|
|
2579
|
-
isBreakStatement: isBreakStatement,
|
|
2580
|
-
isCallExpression: isCallExpression,
|
|
2581
|
-
isCatchClause: isCatchClause,
|
|
2582
|
-
isConditionalExpression: isConditionalExpression,
|
|
2583
|
-
isContinueStatement: isContinueStatement,
|
|
2584
|
-
isDebuggerStatement: isDebuggerStatement,
|
|
2585
|
-
isDoWhileStatement: isDoWhileStatement,
|
|
2586
|
-
isEmptyStatement: isEmptyStatement,
|
|
2587
|
-
isExpressionStatement: isExpressionStatement,
|
|
2588
|
-
isFile: isFile,
|
|
2589
|
-
isForInStatement: isForInStatement,
|
|
2590
|
-
isForStatement: isForStatement,
|
|
2591
|
-
isFunctionDeclaration: isFunctionDeclaration,
|
|
2592
|
-
isFunctionExpression: isFunctionExpression,
|
|
2593
|
-
isIdentifier: isIdentifier,
|
|
2594
|
-
isIfStatement: isIfStatement,
|
|
2595
|
-
isLabeledStatement: isLabeledStatement,
|
|
2596
|
-
isStringLiteral: isStringLiteral,
|
|
2597
|
-
isNumericLiteral: isNumericLiteral,
|
|
2598
|
-
isNullLiteral: isNullLiteral,
|
|
2599
|
-
isBooleanLiteral: isBooleanLiteral,
|
|
2600
|
-
isRegExpLiteral: isRegExpLiteral,
|
|
2601
|
-
isLogicalExpression: isLogicalExpression,
|
|
2602
|
-
isMemberExpression: isMemberExpression,
|
|
2603
|
-
isNewExpression: isNewExpression,
|
|
2604
|
-
isProgram: isProgram,
|
|
2605
|
-
isObjectExpression: isObjectExpression,
|
|
2606
|
-
isObjectMethod: isObjectMethod,
|
|
2607
|
-
isObjectProperty: isObjectProperty,
|
|
2608
|
-
isRestElement: isRestElement,
|
|
2609
|
-
isReturnStatement: isReturnStatement,
|
|
2610
|
-
isSequenceExpression: isSequenceExpression,
|
|
2611
|
-
isParenthesizedExpression: isParenthesizedExpression,
|
|
2612
|
-
isSwitchCase: isSwitchCase,
|
|
2613
|
-
isSwitchStatement: isSwitchStatement,
|
|
2614
|
-
isThisExpression: isThisExpression,
|
|
2615
|
-
isThrowStatement: isThrowStatement,
|
|
2616
|
-
isTryStatement: isTryStatement,
|
|
2617
|
-
isUnaryExpression: isUnaryExpression,
|
|
2618
|
-
isUpdateExpression: isUpdateExpression,
|
|
2619
|
-
isVariableDeclaration: isVariableDeclaration,
|
|
2620
|
-
isVariableDeclarator: isVariableDeclarator,
|
|
2621
|
-
isWhileStatement: isWhileStatement,
|
|
2622
|
-
isWithStatement: isWithStatement,
|
|
2623
|
-
isAssignmentPattern: isAssignmentPattern,
|
|
2624
|
-
isArrayPattern: isArrayPattern,
|
|
2625
|
-
isArrowFunctionExpression: isArrowFunctionExpression,
|
|
2626
|
-
isClassBody: isClassBody,
|
|
2627
|
-
isClassExpression: isClassExpression,
|
|
2628
|
-
isClassDeclaration: isClassDeclaration,
|
|
2629
|
-
isExportAllDeclaration: isExportAllDeclaration,
|
|
2630
|
-
isExportDefaultDeclaration: isExportDefaultDeclaration,
|
|
2631
|
-
isExportNamedDeclaration: isExportNamedDeclaration,
|
|
2632
|
-
isExportSpecifier: isExportSpecifier,
|
|
2633
|
-
isForOfStatement: isForOfStatement,
|
|
2634
|
-
isImportDeclaration: isImportDeclaration,
|
|
2635
|
-
isImportDefaultSpecifier: isImportDefaultSpecifier,
|
|
2636
|
-
isImportNamespaceSpecifier: isImportNamespaceSpecifier,
|
|
2637
|
-
isImportSpecifier: isImportSpecifier,
|
|
2638
|
-
isMetaProperty: isMetaProperty,
|
|
2639
|
-
isClassMethod: isClassMethod,
|
|
2640
|
-
isObjectPattern: isObjectPattern,
|
|
2641
|
-
isSpreadElement: isSpreadElement,
|
|
2642
|
-
isSuper: isSuper,
|
|
2643
|
-
isTaggedTemplateExpression: isTaggedTemplateExpression,
|
|
2644
|
-
isTemplateElement: isTemplateElement,
|
|
2645
|
-
isTemplateLiteral: isTemplateLiteral,
|
|
2646
|
-
isYieldExpression: isYieldExpression,
|
|
2647
|
-
isAwaitExpression: isAwaitExpression,
|
|
2648
|
-
isImport: isImport,
|
|
2649
|
-
isBigIntLiteral: isBigIntLiteral,
|
|
2650
|
-
isExportNamespaceSpecifier: isExportNamespaceSpecifier,
|
|
2651
|
-
isOptionalMemberExpression: isOptionalMemberExpression,
|
|
2652
|
-
isOptionalCallExpression: isOptionalCallExpression,
|
|
2653
|
-
isClassProperty: isClassProperty,
|
|
2654
|
-
isClassPrivateProperty: isClassPrivateProperty,
|
|
2655
|
-
isClassPrivateMethod: isClassPrivateMethod,
|
|
2656
|
-
isPrivateName: isPrivateName,
|
|
2657
|
-
isAnyTypeAnnotation: isAnyTypeAnnotation,
|
|
2658
|
-
isArrayTypeAnnotation: isArrayTypeAnnotation,
|
|
2659
|
-
isBooleanTypeAnnotation: isBooleanTypeAnnotation,
|
|
2660
|
-
isBooleanLiteralTypeAnnotation: isBooleanLiteralTypeAnnotation,
|
|
2661
|
-
isNullLiteralTypeAnnotation: isNullLiteralTypeAnnotation,
|
|
2662
|
-
isClassImplements: isClassImplements,
|
|
2663
|
-
isDeclareClass: isDeclareClass,
|
|
2664
|
-
isDeclareFunction: isDeclareFunction,
|
|
2665
|
-
isDeclareInterface: isDeclareInterface,
|
|
2666
|
-
isDeclareModule: isDeclareModule,
|
|
2667
|
-
isDeclareModuleExports: isDeclareModuleExports,
|
|
2668
|
-
isDeclareTypeAlias: isDeclareTypeAlias,
|
|
2669
|
-
isDeclareOpaqueType: isDeclareOpaqueType,
|
|
2670
|
-
isDeclareVariable: isDeclareVariable,
|
|
2671
|
-
isDeclareExportDeclaration: isDeclareExportDeclaration,
|
|
2672
|
-
isDeclareExportAllDeclaration: isDeclareExportAllDeclaration,
|
|
2673
|
-
isDeclaredPredicate: isDeclaredPredicate,
|
|
2674
|
-
isExistsTypeAnnotation: isExistsTypeAnnotation,
|
|
2675
|
-
isFunctionTypeAnnotation: isFunctionTypeAnnotation,
|
|
2676
|
-
isFunctionTypeParam: isFunctionTypeParam,
|
|
2677
|
-
isGenericTypeAnnotation: isGenericTypeAnnotation,
|
|
2678
|
-
isInferredPredicate: isInferredPredicate,
|
|
2679
|
-
isInterfaceExtends: isInterfaceExtends,
|
|
2680
|
-
isInterfaceDeclaration: isInterfaceDeclaration,
|
|
2681
|
-
isInterfaceTypeAnnotation: isInterfaceTypeAnnotation,
|
|
2682
|
-
isIntersectionTypeAnnotation: isIntersectionTypeAnnotation,
|
|
2683
|
-
isMixedTypeAnnotation: isMixedTypeAnnotation,
|
|
2684
|
-
isEmptyTypeAnnotation: isEmptyTypeAnnotation,
|
|
2685
|
-
isNullableTypeAnnotation: isNullableTypeAnnotation,
|
|
2686
|
-
isNumberLiteralTypeAnnotation: isNumberLiteralTypeAnnotation,
|
|
2687
|
-
isNumberTypeAnnotation: isNumberTypeAnnotation,
|
|
2688
|
-
isObjectTypeAnnotation: isObjectTypeAnnotation,
|
|
2689
|
-
isObjectTypeInternalSlot: isObjectTypeInternalSlot,
|
|
2690
|
-
isObjectTypeCallProperty: isObjectTypeCallProperty,
|
|
2691
|
-
isObjectTypeIndexer: isObjectTypeIndexer,
|
|
2692
|
-
isObjectTypeProperty: isObjectTypeProperty,
|
|
2693
|
-
isObjectTypeSpreadProperty: isObjectTypeSpreadProperty,
|
|
2694
|
-
isOpaqueType: isOpaqueType,
|
|
2695
|
-
isQualifiedTypeIdentifier: isQualifiedTypeIdentifier,
|
|
2696
|
-
isStringLiteralTypeAnnotation: isStringLiteralTypeAnnotation,
|
|
2697
|
-
isStringTypeAnnotation: isStringTypeAnnotation,
|
|
2698
|
-
isSymbolTypeAnnotation: isSymbolTypeAnnotation,
|
|
2699
|
-
isThisTypeAnnotation: isThisTypeAnnotation,
|
|
2700
|
-
isTupleTypeAnnotation: isTupleTypeAnnotation,
|
|
2701
|
-
isTypeofTypeAnnotation: isTypeofTypeAnnotation,
|
|
2702
|
-
isTypeAlias: isTypeAlias,
|
|
2703
|
-
isTypeAnnotation: isTypeAnnotation,
|
|
2704
|
-
isTypeCastExpression: isTypeCastExpression,
|
|
2705
|
-
isTypeParameter: isTypeParameter,
|
|
2706
|
-
isTypeParameterDeclaration: isTypeParameterDeclaration,
|
|
2707
|
-
isTypeParameterInstantiation: isTypeParameterInstantiation,
|
|
2708
|
-
isUnionTypeAnnotation: isUnionTypeAnnotation,
|
|
2709
|
-
isVariance: isVariance,
|
|
2710
|
-
isVoidTypeAnnotation: isVoidTypeAnnotation,
|
|
2711
|
-
isEnumDeclaration: isEnumDeclaration,
|
|
2712
|
-
isEnumBooleanBody: isEnumBooleanBody,
|
|
2713
|
-
isEnumNumberBody: isEnumNumberBody,
|
|
2714
|
-
isEnumStringBody: isEnumStringBody,
|
|
2715
|
-
isEnumSymbolBody: isEnumSymbolBody,
|
|
2716
|
-
isEnumBooleanMember: isEnumBooleanMember,
|
|
2717
|
-
isEnumNumberMember: isEnumNumberMember,
|
|
2718
|
-
isEnumStringMember: isEnumStringMember,
|
|
2719
|
-
isEnumDefaultedMember: isEnumDefaultedMember,
|
|
2720
|
-
isIndexedAccessType: isIndexedAccessType,
|
|
2721
|
-
isOptionalIndexedAccessType: isOptionalIndexedAccessType,
|
|
2722
|
-
isJSXAttribute: isJSXAttribute,
|
|
2723
|
-
isJSXClosingElement: isJSXClosingElement,
|
|
2724
|
-
isJSXElement: isJSXElement,
|
|
2725
|
-
isJSXEmptyExpression: isJSXEmptyExpression,
|
|
2726
|
-
isJSXExpressionContainer: isJSXExpressionContainer,
|
|
2727
|
-
isJSXSpreadChild: isJSXSpreadChild,
|
|
2728
|
-
isJSXIdentifier: isJSXIdentifier,
|
|
2729
|
-
isJSXMemberExpression: isJSXMemberExpression,
|
|
2730
|
-
isJSXNamespacedName: isJSXNamespacedName,
|
|
2731
|
-
isJSXOpeningElement: isJSXOpeningElement,
|
|
2732
|
-
isJSXSpreadAttribute: isJSXSpreadAttribute,
|
|
2733
|
-
isJSXText: isJSXText,
|
|
2734
|
-
isJSXFragment: isJSXFragment,
|
|
2735
|
-
isJSXOpeningFragment: isJSXOpeningFragment,
|
|
2736
|
-
isJSXClosingFragment: isJSXClosingFragment,
|
|
2737
|
-
isNoop: isNoop,
|
|
2738
|
-
isPlaceholder: isPlaceholder,
|
|
2739
|
-
isV8IntrinsicIdentifier: isV8IntrinsicIdentifier,
|
|
2740
|
-
isArgumentPlaceholder: isArgumentPlaceholder,
|
|
2741
|
-
isBindExpression: isBindExpression,
|
|
2742
|
-
isImportAttribute: isImportAttribute,
|
|
2743
|
-
isDecorator: isDecorator,
|
|
2744
|
-
isDoExpression: isDoExpression,
|
|
2745
|
-
isExportDefaultSpecifier: isExportDefaultSpecifier,
|
|
2746
|
-
isRecordExpression: isRecordExpression,
|
|
2747
|
-
isTupleExpression: isTupleExpression,
|
|
2748
|
-
isDecimalLiteral: isDecimalLiteral,
|
|
2749
|
-
isStaticBlock: isStaticBlock,
|
|
2750
|
-
isModuleExpression: isModuleExpression,
|
|
2751
|
-
isTopicReference: isTopicReference,
|
|
2752
|
-
isPipelineTopicExpression: isPipelineTopicExpression,
|
|
2753
|
-
isPipelineBareFunction: isPipelineBareFunction,
|
|
2754
|
-
isPipelinePrimaryTopicReference: isPipelinePrimaryTopicReference,
|
|
2755
|
-
isTSParameterProperty: isTSParameterProperty,
|
|
2756
|
-
isTSDeclareFunction: isTSDeclareFunction,
|
|
2757
|
-
isTSDeclareMethod: isTSDeclareMethod,
|
|
2758
|
-
isTSQualifiedName: isTSQualifiedName,
|
|
2759
|
-
isTSCallSignatureDeclaration: isTSCallSignatureDeclaration,
|
|
2760
|
-
isTSConstructSignatureDeclaration: isTSConstructSignatureDeclaration,
|
|
2761
|
-
isTSPropertySignature: isTSPropertySignature,
|
|
2762
|
-
isTSMethodSignature: isTSMethodSignature,
|
|
2763
|
-
isTSIndexSignature: isTSIndexSignature,
|
|
2764
|
-
isTSAnyKeyword: isTSAnyKeyword,
|
|
2765
|
-
isTSBooleanKeyword: isTSBooleanKeyword,
|
|
2766
|
-
isTSBigIntKeyword: isTSBigIntKeyword,
|
|
2767
|
-
isTSIntrinsicKeyword: isTSIntrinsicKeyword,
|
|
2768
|
-
isTSNeverKeyword: isTSNeverKeyword,
|
|
2769
|
-
isTSNullKeyword: isTSNullKeyword,
|
|
2770
|
-
isTSNumberKeyword: isTSNumberKeyword,
|
|
2771
|
-
isTSObjectKeyword: isTSObjectKeyword,
|
|
2772
|
-
isTSStringKeyword: isTSStringKeyword,
|
|
2773
|
-
isTSSymbolKeyword: isTSSymbolKeyword,
|
|
2774
|
-
isTSUndefinedKeyword: isTSUndefinedKeyword,
|
|
2775
|
-
isTSUnknownKeyword: isTSUnknownKeyword,
|
|
2776
|
-
isTSVoidKeyword: isTSVoidKeyword,
|
|
2777
|
-
isTSThisType: isTSThisType,
|
|
2778
|
-
isTSFunctionType: isTSFunctionType,
|
|
2779
|
-
isTSConstructorType: isTSConstructorType,
|
|
2780
|
-
isTSTypeReference: isTSTypeReference,
|
|
2781
|
-
isTSTypePredicate: isTSTypePredicate,
|
|
2782
|
-
isTSTypeQuery: isTSTypeQuery,
|
|
2783
|
-
isTSTypeLiteral: isTSTypeLiteral,
|
|
2784
|
-
isTSArrayType: isTSArrayType,
|
|
2785
|
-
isTSTupleType: isTSTupleType,
|
|
2786
|
-
isTSOptionalType: isTSOptionalType,
|
|
2787
|
-
isTSRestType: isTSRestType,
|
|
2788
|
-
isTSNamedTupleMember: isTSNamedTupleMember,
|
|
2789
|
-
isTSUnionType: isTSUnionType,
|
|
2790
|
-
isTSIntersectionType: isTSIntersectionType,
|
|
2791
|
-
isTSConditionalType: isTSConditionalType,
|
|
2792
|
-
isTSInferType: isTSInferType,
|
|
2793
|
-
isTSParenthesizedType: isTSParenthesizedType,
|
|
2794
|
-
isTSTypeOperator: isTSTypeOperator,
|
|
2795
|
-
isTSIndexedAccessType: isTSIndexedAccessType,
|
|
2796
|
-
isTSMappedType: isTSMappedType,
|
|
2797
|
-
isTSLiteralType: isTSLiteralType,
|
|
2798
|
-
isTSExpressionWithTypeArguments: isTSExpressionWithTypeArguments,
|
|
2799
|
-
isTSInterfaceDeclaration: isTSInterfaceDeclaration,
|
|
2800
|
-
isTSInterfaceBody: isTSInterfaceBody,
|
|
2801
|
-
isTSTypeAliasDeclaration: isTSTypeAliasDeclaration,
|
|
2802
|
-
isTSAsExpression: isTSAsExpression,
|
|
2803
|
-
isTSTypeAssertion: isTSTypeAssertion,
|
|
2804
|
-
isTSEnumDeclaration: isTSEnumDeclaration,
|
|
2805
|
-
isTSEnumMember: isTSEnumMember,
|
|
2806
|
-
isTSModuleDeclaration: isTSModuleDeclaration,
|
|
2807
|
-
isTSModuleBlock: isTSModuleBlock,
|
|
2808
|
-
isTSImportType: isTSImportType,
|
|
2809
|
-
isTSImportEqualsDeclaration: isTSImportEqualsDeclaration,
|
|
2810
|
-
isTSExternalModuleReference: isTSExternalModuleReference,
|
|
2811
|
-
isTSNonNullExpression: isTSNonNullExpression,
|
|
2812
|
-
isTSExportAssignment: isTSExportAssignment,
|
|
2813
|
-
isTSNamespaceExportDeclaration: isTSNamespaceExportDeclaration,
|
|
2814
|
-
isTSTypeAnnotation: isTSTypeAnnotation,
|
|
2815
|
-
isTSTypeParameterInstantiation: isTSTypeParameterInstantiation,
|
|
2816
|
-
isTSTypeParameterDeclaration: isTSTypeParameterDeclaration,
|
|
2817
|
-
isTSTypeParameter: isTSTypeParameter,
|
|
2818
|
-
isExpression: isExpression,
|
|
2819
|
-
isBinary: isBinary,
|
|
2820
|
-
isScopable: isScopable,
|
|
2821
|
-
isBlockParent: isBlockParent,
|
|
2822
|
-
isBlock: isBlock,
|
|
2823
|
-
isStatement: isStatement,
|
|
2824
|
-
isTerminatorless: isTerminatorless,
|
|
2825
|
-
isCompletionStatement: isCompletionStatement,
|
|
2826
|
-
isConditional: isConditional,
|
|
2827
|
-
isLoop: isLoop,
|
|
2828
|
-
isWhile: isWhile,
|
|
2829
|
-
isExpressionWrapper: isExpressionWrapper,
|
|
2830
|
-
isFor: isFor,
|
|
2831
|
-
isForXStatement: isForXStatement,
|
|
2832
|
-
isFunction: isFunction,
|
|
2833
|
-
isFunctionParent: isFunctionParent,
|
|
2834
|
-
isPureish: isPureish,
|
|
2835
|
-
isDeclaration: isDeclaration,
|
|
2836
|
-
isPatternLike: isPatternLike,
|
|
2837
|
-
isLVal: isLVal,
|
|
2838
|
-
isTSEntityName: isTSEntityName,
|
|
2839
|
-
isLiteral: isLiteral,
|
|
2840
|
-
isUserWhitespacable: isUserWhitespacable,
|
|
2841
|
-
isMethod: isMethod,
|
|
2842
|
-
isObjectMember: isObjectMember,
|
|
2843
|
-
isProperty: isProperty,
|
|
2844
|
-
isUnaryLike: isUnaryLike,
|
|
2845
|
-
isPattern: isPattern,
|
|
2846
|
-
isClass: isClass,
|
|
2847
|
-
isModuleDeclaration: isModuleDeclaration,
|
|
2848
|
-
isExportDeclaration: isExportDeclaration,
|
|
2849
|
-
isModuleSpecifier: isModuleSpecifier,
|
|
2850
|
-
isPrivate: isPrivate,
|
|
2851
|
-
isFlow: isFlow,
|
|
2852
|
-
isFlowType: isFlowType,
|
|
2853
|
-
isFlowBaseAnnotation: isFlowBaseAnnotation,
|
|
2854
|
-
isFlowDeclaration: isFlowDeclaration,
|
|
2855
|
-
isFlowPredicate: isFlowPredicate,
|
|
2856
|
-
isEnumBody: isEnumBody,
|
|
2857
|
-
isEnumMember: isEnumMember,
|
|
2858
|
-
isJSX: isJSX,
|
|
2859
|
-
isTSTypeElement: isTSTypeElement,
|
|
2860
|
-
isTSType: isTSType,
|
|
2861
|
-
isTSBaseType: isTSBaseType,
|
|
2862
|
-
isNumberLiteral: isNumberLiteral,
|
|
2863
|
-
isRegexLiteral: isRegexLiteral,
|
|
2864
|
-
isRestProperty: isRestProperty,
|
|
2865
|
-
isSpreadProperty: isSpreadProperty
|
|
2866
|
-
};
|
|
2867
|
-
|
|
2868
|
-
var operator;
|
|
2869
|
-
var hasRequiredOperator;
|
|
2870
|
-
|
|
2871
|
-
function requireOperator () {
|
|
2872
|
-
if (hasRequiredOperator) return operator;
|
|
2873
|
-
hasRequiredOperator = 1;
|
|
2874
|
-
|
|
2875
|
-
operator = {
|
|
2876
|
-
operator: `import {operator} from 'putout'`,
|
|
2877
|
-
compare: `const {compare} = operator`,
|
|
2878
|
-
compareAll: `const {compareAll} = operator`,
|
|
2879
|
-
compareAny: `const {compareAny} = operator`,
|
|
2880
|
-
compute: `const {compute} = operator`,
|
|
2881
|
-
contains: `const {contains} = operator`,
|
|
2882
|
-
declare: `const {declare} = operator`,
|
|
2883
|
-
rename: `const {rename} = operator`,
|
|
2884
|
-
renameProperty: `const {renameProperty} = operator`,
|
|
2885
|
-
extract: `const {extract} = operator`,
|
|
2886
|
-
getPathAfterImports: `const {getPathAfterImports} = operator`,
|
|
2887
|
-
traverse: `const {traverse} = operator`,
|
|
2888
|
-
isSimpleRegExp: `const {isSimpleRegExp} = operator`,
|
|
2889
|
-
getTemplateValues: `const {getTemplateValues} = operator`,
|
|
2890
|
-
addArgs: `const {addArgs} = operator`,
|
|
2891
|
-
replaceWith: `const {replaceWith} = operator`,
|
|
2892
|
-
replaceWithMultiple: `const {replaceWithMultiple} = operator`,
|
|
2893
|
-
remove: 'const {remove} = operator',
|
|
2894
|
-
isESM: `const {isESM} = operator`,
|
|
2895
|
-
getProperty: `const {getProperty} = operator`,
|
|
2896
|
-
getProperties: `const {getProperties} = operator`,
|
|
2897
|
-
isSimple: `const {isSimple} = operator`,
|
|
2898
|
-
};
|
|
2899
|
-
return operator;
|
|
2900
|
-
}
|
|
2901
|
-
|
|
2902
|
-
var hasRequiredDeclare;
|
|
2903
|
-
|
|
2904
|
-
function requireDeclare () {
|
|
2905
|
-
if (hasRequiredDeclare) return declare;
|
|
2906
|
-
hasRequiredDeclare = 1;
|
|
2907
|
-
|
|
2908
|
-
const types = require$$0;
|
|
2909
|
-
const operator = requireOperator();
|
|
2910
|
-
|
|
2911
|
-
declare.declare = () => ({
|
|
2912
|
-
template: `import {template} from 'putout'`,
|
|
2913
|
-
createTest: `import {createTest} from '@putout/test'`,
|
|
2914
|
-
...operator,
|
|
2915
|
-
...types,
|
|
2916
|
-
});
|
|
2917
|
-
return declare;
|
|
2918
|
-
}
|
|
2919
|
-
|
|
2920
|
-
var includer = {};
|
|
2921
|
-
|
|
2922
|
-
var hasRequiredIncluder;
|
|
2923
|
-
|
|
2924
|
-
function requireIncluder () {
|
|
2925
|
-
if (hasRequiredIncluder) return includer;
|
|
2926
|
-
hasRequiredIncluder = 1;
|
|
2927
|
-
|
|
2928
|
-
includer.report = () => 'Includer functions should return array (https://git.io/Jyndl)';
|
|
2929
|
-
|
|
2930
|
-
includer.replace = () => ({
|
|
2931
|
-
'module.exports.include = () => "__a"': 'module.exports.include = ["__a"]',
|
|
2932
|
-
'module.exports.exclude = () => "__a"': 'module.exports.exclude = ["__a"]',
|
|
2933
|
-
'module.exports.include = ["__a"]': 'module.exports.include = () => ["__a"]',
|
|
2934
|
-
'module.exports.exclude = ["__a"]': 'module.exports.exclude = () => ["__a"]',
|
|
2935
|
-
'module.exports.include = "__a"': 'module.exports.include = ["__a"]',
|
|
2936
|
-
'module.exports.exclude = "__a"': 'module.exports.exclude= ["__a"]',
|
|
2937
|
-
});
|
|
2938
|
-
return includer;
|
|
2939
|
-
}
|
|
2940
|
-
|
|
2941
|
-
var moveRequireOnTopLevel = {};
|
|
2942
|
-
|
|
2943
|
-
var justCamelCase;
|
|
2944
|
-
var hasRequiredJustCamelCase;
|
|
2945
|
-
|
|
2946
|
-
function requireJustCamelCase () {
|
|
2947
|
-
if (hasRequiredJustCamelCase) return justCamelCase;
|
|
2948
|
-
hasRequiredJustCamelCase = 1;
|
|
2949
|
-
justCamelCase = camelCase;
|
|
2950
|
-
|
|
2951
|
-
// any combination of spaces and punctuation characters
|
|
2952
|
-
// thanks to http://stackoverflow.com/a/25575009
|
|
2953
|
-
var wordSeparatorsRegEx = /[\s\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,\-.\/:;<=>?@\[\]^_`{|}~]+/;
|
|
2954
|
-
|
|
2955
|
-
var basicCamelRegEx = /^[a-z\u00E0-\u00FCA-Z\u00C0-\u00DC][\d|a-z\u00E0-\u00FCA-Z\u00C0-\u00DC]*$/;
|
|
2956
|
-
var fourOrMoreConsecutiveCapsRegEx = /([A-Z\u00C0-\u00DC]{4,})/g;
|
|
2957
|
-
var allCapsRegEx = /^[A-Z\u00C0-\u00DC]+$/;
|
|
2958
|
-
|
|
2959
|
-
function camelCase(str) {
|
|
2960
|
-
var words = str.split(wordSeparatorsRegEx);
|
|
2961
|
-
var len = words.length;
|
|
2962
|
-
var mappedWords = new Array(len);
|
|
2963
|
-
for (var i = 0; i < len; i++) {
|
|
2964
|
-
var word = words[i];
|
|
2965
|
-
if (word === '') {
|
|
2966
|
-
continue;
|
|
2967
|
-
}
|
|
2968
|
-
var isCamelCase = basicCamelRegEx.test(word) && !allCapsRegEx.test(word);
|
|
2969
|
-
if (isCamelCase) {
|
|
2970
|
-
word = word.replace(fourOrMoreConsecutiveCapsRegEx, function(match, p1, offset) {
|
|
2971
|
-
return deCap(match, word.length - offset - match.length == 0);
|
|
2972
|
-
});
|
|
2973
|
-
}
|
|
2974
|
-
var firstLetter = word[0];
|
|
2975
|
-
firstLetter = i > 0 ? firstLetter.toUpperCase() : firstLetter.toLowerCase();
|
|
2976
|
-
mappedWords[i] = firstLetter + (!isCamelCase ? word.slice(1).toLowerCase() : word.slice(1));
|
|
2977
|
-
}
|
|
2978
|
-
return mappedWords.join('');
|
|
2979
|
-
}
|
|
2980
|
-
|
|
2981
|
-
function deCap(match, endOfWord) {
|
|
2982
|
-
var arr = match.split('');
|
|
2983
|
-
var first = arr.shift().toUpperCase();
|
|
2984
|
-
var last = endOfWord ? arr.pop().toLowerCase() : arr.pop();
|
|
2985
|
-
return first + arr.join('').toLowerCase() + last;
|
|
2986
|
-
}
|
|
2987
|
-
return justCamelCase;
|
|
2988
|
-
}
|
|
2989
|
-
|
|
2990
|
-
var hasRequiredMoveRequireOnTopLevel;
|
|
2991
|
-
|
|
2992
|
-
function requireMoveRequireOnTopLevel () {
|
|
2993
|
-
if (hasRequiredMoveRequireOnTopLevel) return moveRequireOnTopLevel;
|
|
2994
|
-
hasRequiredMoveRequireOnTopLevel = 1;
|
|
2995
|
-
|
|
2996
|
-
const justCamelCase = requireJustCamelCase();
|
|
2997
|
-
|
|
2998
|
-
const {types, template} = require$$0$1;
|
|
2999
|
-
|
|
3000
|
-
const TEST = `
|
|
3001
|
-
const test = require('@putout/test')(__dirname, {
|
|
3002
|
-
__a: __b
|
|
3003
|
-
});
|
|
3004
|
-
`;
|
|
3005
|
-
|
|
3006
|
-
const TRANSFORM = `
|
|
3007
|
-
t.transform(__c, {
|
|
3008
|
-
__a: __b
|
|
3009
|
-
});
|
|
3010
|
-
`;
|
|
3011
|
-
|
|
3012
|
-
const {
|
|
3013
|
-
Identifier,
|
|
3014
|
-
isIdentifier,
|
|
3015
|
-
isObjectExpression,
|
|
3016
|
-
isMemberExpression,
|
|
3017
|
-
} = types;
|
|
3018
|
-
|
|
3019
|
-
moveRequireOnTopLevel.report = () => 'Move require on top level';
|
|
3020
|
-
|
|
3021
|
-
moveRequireOnTopLevel.match = () => ({
|
|
3022
|
-
[TEST]: ({__b}) => !isIdentifier(__b),
|
|
3023
|
-
[TRANSFORM]: ({__b}) => !isIdentifier(__b) && !isObjectExpression(__b) && !isMemberExpression(__b),
|
|
3024
|
-
});
|
|
3025
|
-
|
|
3026
|
-
moveRequireOnTopLevel.replace = () => ({
|
|
3027
|
-
[TEST]: (vars, path) => {
|
|
3028
|
-
const name = declareRequire(vars, path);
|
|
3029
|
-
const {__a} = vars;
|
|
3030
|
-
const value = __a.value || __a.name;
|
|
3031
|
-
|
|
3032
|
-
return `
|
|
3033
|
-
const test = require('@putout/test')(__dirname, {
|
|
3034
|
-
'${value}': ${name},
|
|
3035
|
-
});
|
|
3036
|
-
`;
|
|
3037
|
-
},
|
|
3038
|
-
[TRANSFORM]: (vars, path) => {
|
|
3039
|
-
const name = declareRequire(vars, path);
|
|
3040
|
-
const {__a} = vars;
|
|
3041
|
-
const value = __a.value || __a.name;
|
|
3042
|
-
|
|
3043
|
-
return `
|
|
3044
|
-
t.transform(__c, {
|
|
3045
|
-
'${value}': ${name},
|
|
3046
|
-
});
|
|
3047
|
-
`;
|
|
3048
|
-
},
|
|
3049
|
-
});
|
|
3050
|
-
|
|
3051
|
-
const buildRequire = template(`const NAME = REQUIRE`);
|
|
3052
|
-
|
|
3053
|
-
function declareRequire({__a, __b}, path) {
|
|
3054
|
-
const shortName = __a.value || __a.name.split('/').pop();
|
|
3055
|
-
|
|
3056
|
-
const name = justCamelCase(shortName);
|
|
3057
|
-
|
|
3058
|
-
const requireNode = buildRequire({
|
|
3059
|
-
NAME: Identifier(name),
|
|
3060
|
-
REQUIRE: __b,
|
|
3061
|
-
});
|
|
3062
|
-
|
|
3063
|
-
if (path.scope.hasBinding(name))
|
|
3064
|
-
return name;
|
|
3065
|
-
|
|
3066
|
-
const programPath = path.scope.getProgramParent().path;
|
|
3067
|
-
|
|
3068
|
-
programPath.node.body.unshift(requireNode);
|
|
3069
|
-
|
|
3070
|
-
return name;
|
|
3071
|
-
}
|
|
3072
|
-
return moveRequireOnTopLevel;
|
|
3073
|
-
}
|
|
3074
|
-
|
|
3075
|
-
var renameOperateToOperator = {};
|
|
3076
|
-
|
|
3077
|
-
var hasRequiredRenameOperateToOperator;
|
|
3078
|
-
|
|
3079
|
-
function requireRenameOperateToOperator () {
|
|
3080
|
-
if (hasRequiredRenameOperateToOperator) return renameOperateToOperator;
|
|
3081
|
-
hasRequiredRenameOperateToOperator = 1;
|
|
3082
|
-
|
|
3083
|
-
const {operator} = require$$0$1;
|
|
3084
|
-
const {rename} = operator;
|
|
3085
|
-
|
|
3086
|
-
renameOperateToOperator.report = () => '"operator" should be used instead of "operate"';
|
|
3087
|
-
|
|
3088
|
-
renameOperateToOperator.include = () => ['Program'];
|
|
3089
|
-
|
|
3090
|
-
renameOperateToOperator.filter = (path) => {
|
|
3091
|
-
const noOperator = !path.scope.bindings.operator;
|
|
3092
|
-
const yesOperate = path.scope.bindings.operate;
|
|
3093
|
-
|
|
3094
|
-
return noOperator && yesOperate;
|
|
3095
|
-
};
|
|
3096
|
-
|
|
3097
|
-
renameOperateToOperator.fix = (path) => {
|
|
3098
|
-
rename(path, 'operate', 'operator');
|
|
3099
|
-
};
|
|
3100
|
-
return renameOperateToOperator;
|
|
3101
|
-
}
|
|
3102
|
-
|
|
3103
|
-
var replaceOperateWithOperator = {};
|
|
3104
|
-
|
|
3105
|
-
var hasRequiredReplaceOperateWithOperator;
|
|
3106
|
-
|
|
3107
|
-
function requireReplaceOperateWithOperator () {
|
|
3108
|
-
if (hasRequiredReplaceOperateWithOperator) return replaceOperateWithOperator;
|
|
3109
|
-
hasRequiredReplaceOperateWithOperator = 1;
|
|
3110
|
-
|
|
3111
|
-
replaceOperateWithOperator.report = () => '"operator" should be used instead of "operate"';
|
|
3112
|
-
|
|
3113
|
-
replaceOperateWithOperator.replace = () => ({
|
|
3114
|
-
'const __object = require("putout").operate': 'const __object = require("putout").operator',
|
|
3115
|
-
});
|
|
3116
|
-
return replaceOperateWithOperator;
|
|
3117
|
-
}
|
|
3118
|
-
|
|
3119
|
-
var replaceTestMessage = {};
|
|
3120
|
-
|
|
3121
|
-
var hasRequiredReplaceTestMessage;
|
|
3122
|
-
|
|
3123
|
-
function requireReplaceTestMessage () {
|
|
3124
|
-
if (hasRequiredReplaceTestMessage) return replaceTestMessage;
|
|
3125
|
-
hasRequiredReplaceTestMessage = 1;
|
|
3126
|
-
|
|
3127
|
-
const {types} = require$$0$1;
|
|
3128
|
-
const {isCallExpression} = types;
|
|
3129
|
-
|
|
3130
|
-
replaceTestMessage.report = ({correct, operatorPath}) => {
|
|
3131
|
-
const calleePath = operatorPath.get('callee');
|
|
3132
|
-
return `Use '${correct}' in test message when using '${calleePath}()'`;
|
|
3133
|
-
};
|
|
3134
|
-
|
|
3135
|
-
replaceTestMessage.fix = ({path, incorrect, correct}) => {
|
|
3136
|
-
path.node.value = path.node.value.replace(incorrect, correct);
|
|
3137
|
-
path.node.raw = path.node.raw.replace(incorrect, correct);
|
|
3138
|
-
};
|
|
3139
|
-
|
|
3140
|
-
replaceTestMessage.traverse = ({push}) => ({
|
|
3141
|
-
't.transform(__a)': convert({
|
|
3142
|
-
push,
|
|
3143
|
-
incorrect: /: no transform/,
|
|
3144
|
-
correct: ': transform',
|
|
3145
|
-
}),
|
|
3146
|
-
't.noTransform(__a)': convert({
|
|
3147
|
-
push,
|
|
3148
|
-
incorrect: /: transform/,
|
|
3149
|
-
correct: ': no transform',
|
|
3150
|
-
}),
|
|
3151
|
-
't.report(__a)': convert({
|
|
3152
|
-
push,
|
|
3153
|
-
incorrect: /: no report/,
|
|
3154
|
-
correct: ': report',
|
|
3155
|
-
}),
|
|
3156
|
-
't.noReport(__a)': convert({
|
|
3157
|
-
push,
|
|
3158
|
-
incorrect: /: (report|transform|no transform)/,
|
|
3159
|
-
correct: ': no report',
|
|
3160
|
-
}),
|
|
3161
|
-
});
|
|
3162
|
-
|
|
3163
|
-
const convert = ({push, correct, incorrect}) => (path) => {
|
|
3164
|
-
const [is, messagePath] = isCorrect({
|
|
3165
|
-
incorrect,
|
|
3166
|
-
path,
|
|
3167
|
-
});
|
|
3168
|
-
|
|
3169
|
-
if (is)
|
|
3170
|
-
return;
|
|
3171
|
-
|
|
3172
|
-
push({
|
|
3173
|
-
path: messagePath,
|
|
3174
|
-
operatorPath: path,
|
|
3175
|
-
incorrect,
|
|
3176
|
-
correct,
|
|
3177
|
-
});
|
|
3178
|
-
};
|
|
3179
|
-
|
|
3180
|
-
const CORRECT = true;
|
|
3181
|
-
|
|
3182
|
-
function isCorrect({path, incorrect}) {
|
|
3183
|
-
const calleePath = path.findParent(isCallExpression);
|
|
3184
|
-
|
|
3185
|
-
if (!calleePath)
|
|
3186
|
-
return [CORRECT];
|
|
3187
|
-
|
|
3188
|
-
const messagePath = calleePath.get('arguments.0');
|
|
3189
|
-
|
|
3190
|
-
if (!messagePath.isStringLiteral())
|
|
3191
|
-
return [CORRECT];
|
|
3192
|
-
|
|
3193
|
-
const {value} = messagePath.node;
|
|
3194
|
-
const is = !incorrect.test(value);
|
|
3195
|
-
|
|
3196
|
-
return [is, messagePath];
|
|
3197
|
-
}
|
|
3198
|
-
return replaceTestMessage;
|
|
3199
|
-
}
|
|
3200
|
-
|
|
3201
|
-
var shortenImports = {};
|
|
3202
|
-
|
|
3203
|
-
var hasRequiredShortenImports;
|
|
3204
|
-
|
|
3205
|
-
function requireShortenImports () {
|
|
3206
|
-
if (hasRequiredShortenImports) return shortenImports;
|
|
3207
|
-
hasRequiredShortenImports = 1;
|
|
3208
|
-
|
|
3209
|
-
shortenImports.report = () => 'Shorten require path to putout exports';
|
|
3210
|
-
|
|
3211
|
-
shortenImports.replace = () => ({
|
|
3212
|
-
'require("putout/lib/cli/process-file")': 'require("putout/process-file")',
|
|
3213
|
-
'require("putout/lib/parse-options")': 'require("putout/parse-options")',
|
|
3214
|
-
});
|
|
3215
|
-
return shortenImports;
|
|
3216
|
-
}
|
|
3217
|
-
|
|
3218
|
-
var dynamicModules;
|
|
3219
|
-
|
|
3220
|
-
function getDynamicModules() {
|
|
3221
|
-
return dynamicModules || (dynamicModules = {
|
|
3222
|
-
"/node_modules/@putout/plugin-putout/lib/add-args": requireAddArgs,
|
|
3223
|
-
"/node_modules/@putout/plugin-putout/lib/add-args/index.js": requireAddArgs,
|
|
3224
|
-
"/node_modules/@putout/plugin-putout/lib/add-push": requireAddPush,
|
|
3225
|
-
"/node_modules/@putout/plugin-putout/lib/add-push/index.js": requireAddPush,
|
|
3226
|
-
"/node_modules/@putout/plugin-putout/lib/apply-async-formatter": requireApplyAsyncFormatter,
|
|
3227
|
-
"/node_modules/@putout/plugin-putout/lib/apply-async-formatter/index.js": requireApplyAsyncFormatter,
|
|
3228
|
-
"/node_modules/@putout/plugin-putout/lib/apply-create-test": requireApplyCreateTest,
|
|
3229
|
-
"/node_modules/@putout/plugin-putout/lib/apply-create-test/index.js": requireApplyCreateTest,
|
|
3230
|
-
"/node_modules/@putout/plugin-putout/lib/apply-declare": requireApplyDeclare,
|
|
3231
|
-
"/node_modules/@putout/plugin-putout/lib/apply-declare/index.js": requireApplyDeclare,
|
|
3232
|
-
"/node_modules/@putout/plugin-putout/lib/apply-processors-destructuring": requireApplyProcessorsDestructuring,
|
|
3233
|
-
"/node_modules/@putout/plugin-putout/lib/apply-processors-destructuring/index.js": requireApplyProcessorsDestructuring,
|
|
3234
|
-
"/node_modules/@putout/plugin-putout/lib/apply-remove": requireApplyRemove,
|
|
3235
|
-
"/node_modules/@putout/plugin-putout/lib/apply-remove/index.js": requireApplyRemove,
|
|
3236
|
-
"/node_modules/@putout/plugin-putout/lib/check-match": requireCheckMatch,
|
|
3237
|
-
"/node_modules/@putout/plugin-putout/lib/check-match/index.js": requireCheckMatch,
|
|
3238
|
-
"/node_modules/@putout/plugin-putout/lib/check-replace-code": requireCheckReplaceCode,
|
|
3239
|
-
"/node_modules/@putout/plugin-putout/lib/check-replace-code/index.js": requireCheckReplaceCode,
|
|
3240
|
-
"/node_modules/@putout/plugin-putout/lib/convert-add-argument-to-add-args": requireConvertAddArgumentToAddArgs,
|
|
3241
|
-
"/node_modules/@putout/plugin-putout/lib/convert-add-argument-to-add-args/index.js": requireConvertAddArgumentToAddArgs,
|
|
3242
|
-
"/node_modules/@putout/plugin-putout/lib/convert-babel-types": requireConvertBabelTypes,
|
|
3243
|
-
"/node_modules/@putout/plugin-putout/lib/convert-babel-types/index.js": requireConvertBabelTypes,
|
|
3244
|
-
"/node_modules/@putout/plugin-putout/lib/convert-destructuring-to-identifier": requireConvertDestructuringToIdentifier,
|
|
3245
|
-
"/node_modules/@putout/plugin-putout/lib/convert-destructuring-to-identifier/index.js": requireConvertDestructuringToIdentifier,
|
|
3246
|
-
"/node_modules/@putout/plugin-putout/lib/convert-dirname-to-url": requireConvertDirnameToUrl,
|
|
3247
|
-
"/node_modules/@putout/plugin-putout/lib/convert-dirname-to-url/index.js": requireConvertDirnameToUrl,
|
|
3248
|
-
"/node_modules/@putout/plugin-putout/lib/convert-find-to-traverse": requireConvertFindToTraverse,
|
|
3249
|
-
"/node_modules/@putout/plugin-putout/lib/convert-find-to-traverse/index.js": requireConvertFindToTraverse,
|
|
3250
|
-
"/node_modules/@putout/plugin-putout/lib/convert-match-to-function": requireConvertMatchToFunction,
|
|
3251
|
-
"/node_modules/@putout/plugin-putout/lib/convert-match-to-function/index.js": requireConvertMatchToFunction,
|
|
3252
|
-
"/node_modules/@putout/plugin-putout/lib/convert-method-to-property": requireConvertMethodToProperty,
|
|
3253
|
-
"/node_modules/@putout/plugin-putout/lib/convert-method-to-property/index.js": requireConvertMethodToProperty,
|
|
3254
|
-
"/node_modules/@putout/plugin-putout/lib/convert-node-to-path-in-get-template-values": requireConvertNodeToPathInGetTemplateValues,
|
|
3255
|
-
"/node_modules/@putout/plugin-putout/lib/convert-node-to-path-in-get-template-values/index.js": requireConvertNodeToPathInGetTemplateValues,
|
|
3256
|
-
"/node_modules/@putout/plugin-putout/lib/convert-number-to-numeric": requireConvertNumberToNumeric,
|
|
3257
|
-
"/node_modules/@putout/plugin-putout/lib/convert-number-to-numeric/index.js": requireConvertNumberToNumeric,
|
|
3258
|
-
"/node_modules/@putout/plugin-putout/lib/convert-process-to-find": requireConvertProcessToFind,
|
|
3259
|
-
"/node_modules/@putout/plugin-putout/lib/convert-process-to-find/index.js": requireConvertProcessToFind,
|
|
3260
|
-
"/node_modules/@putout/plugin-putout/lib/convert-putout-test-to-create-test": requireConvertPutoutTestToCreateTest,
|
|
3261
|
-
"/node_modules/@putout/plugin-putout/lib/convert-putout-test-to-create-test/index.js": requireConvertPutoutTestToCreateTest,
|
|
3262
|
-
"/node_modules/@putout/plugin-putout/lib/convert-replace-to-function": requireConvertReplaceToFunction,
|
|
3263
|
-
"/node_modules/@putout/plugin-putout/lib/convert-replace-to-function/index.js": requireConvertReplaceToFunction,
|
|
3264
|
-
"/node_modules/@putout/plugin-putout/lib/convert-replace-with": requireConvertReplaceWith,
|
|
3265
|
-
"/node_modules/@putout/plugin-putout/lib/convert-replace-with/index.js": requireConvertReplaceWith,
|
|
3266
|
-
"/node_modules/@putout/plugin-putout/lib/convert-replace-with-multiple": requireConvertReplaceWithMultiple,
|
|
3267
|
-
"/node_modules/@putout/plugin-putout/lib/convert-replace-with-multiple/index.js": requireConvertReplaceWithMultiple,
|
|
3268
|
-
"/node_modules/@putout/plugin-putout/lib/convert-report-to-function": requireConvertReportToFunction,
|
|
3269
|
-
"/node_modules/@putout/plugin-putout/lib/convert-report-to-function/index.js": requireConvertReportToFunction,
|
|
3270
|
-
"/node_modules/@putout/plugin-putout/lib/convert-to-no-transform-code": requireConvertToNoTransformCode,
|
|
3271
|
-
"/node_modules/@putout/plugin-putout/lib/convert-to-no-transform-code/index.js": requireConvertToNoTransformCode,
|
|
3272
|
-
"/node_modules/@putout/plugin-putout/lib/convert-traverse-to-include": requireConvertTraverseToInclude,
|
|
3273
|
-
"/node_modules/@putout/plugin-putout/lib/convert-traverse-to-include/index.js": requireConvertTraverseToInclude,
|
|
3274
|
-
"/node_modules/@putout/plugin-putout/lib/convert-traverse-to-replace": requireConvertTraverseToReplace,
|
|
3275
|
-
"/node_modules/@putout/plugin-putout/lib/convert-traverse-to-replace/index.js": requireConvertTraverseToReplace,
|
|
3276
|
-
"/node_modules/@putout/plugin-putout/lib/convert-url-to-dirname": requireConvertUrlToDirname,
|
|
3277
|
-
"/node_modules/@putout/plugin-putout/lib/convert-url-to-dirname/index.js": requireConvertUrlToDirname,
|
|
3278
|
-
"/node_modules/@putout/plugin-putout/lib/create-test": requireCreateTest,
|
|
3279
|
-
"/node_modules/@putout/plugin-putout/lib/create-test/index.js": requireCreateTest,
|
|
3280
|
-
"/node_modules/@putout/plugin-putout/lib/declare": requireDeclare,
|
|
3281
|
-
"/node_modules/@putout/plugin-putout/lib/declare/index.js": requireDeclare,
|
|
3282
|
-
"/node_modules/@putout/plugin-putout/lib/includer": requireIncluder,
|
|
3283
|
-
"/node_modules/@putout/plugin-putout/lib/includer/index.js": requireIncluder,
|
|
3284
|
-
"/node_modules/@putout/plugin-putout/lib/move-require-on-top-level": requireMoveRequireOnTopLevel,
|
|
3285
|
-
"/node_modules/@putout/plugin-putout/lib/move-require-on-top-level/index.js": requireMoveRequireOnTopLevel,
|
|
3286
|
-
"/node_modules/@putout/plugin-putout/lib/rename-operate-to-operator": requireRenameOperateToOperator,
|
|
3287
|
-
"/node_modules/@putout/plugin-putout/lib/rename-operate-to-operator/index.js": requireRenameOperateToOperator,
|
|
3288
|
-
"/node_modules/@putout/plugin-putout/lib/replace-operate-with-operator": requireReplaceOperateWithOperator,
|
|
3289
|
-
"/node_modules/@putout/plugin-putout/lib/replace-operate-with-operator/index.js": requireReplaceOperateWithOperator,
|
|
3290
|
-
"/node_modules/@putout/plugin-putout/lib/replace-test-message": requireReplaceTestMessage,
|
|
3291
|
-
"/node_modules/@putout/plugin-putout/lib/replace-test-message/index.js": requireReplaceTestMessage,
|
|
3292
|
-
"/node_modules/@putout/plugin-putout/lib/shorten-imports": requireShortenImports,
|
|
3293
|
-
"/node_modules/@putout/plugin-putout/lib/shorten-imports/index.js": requireShortenImports
|
|
3294
|
-
});
|
|
3295
|
-
}
|
|
3296
|
-
|
|
3297
|
-
function createCommonjsRequire(originalModuleDir) {
|
|
3298
|
-
function handleRequire(path) {
|
|
3299
|
-
var resolvedPath = commonjsResolve(path, originalModuleDir);
|
|
3300
|
-
if (resolvedPath !== null) {
|
|
3301
|
-
return getDynamicModules()[resolvedPath]();
|
|
3302
|
-
}
|
|
3303
|
-
throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
3304
|
-
}
|
|
3305
|
-
handleRequire.resolve = function (path) {
|
|
3306
|
-
var resolvedPath = commonjsResolve(path, originalModuleDir);
|
|
3307
|
-
if (resolvedPath !== null) {
|
|
3308
|
-
return resolvedPath;
|
|
3309
|
-
}
|
|
3310
|
-
return require.resolve(path);
|
|
3311
|
-
};
|
|
3312
|
-
return handleRequire;
|
|
3313
|
-
}
|
|
3314
|
-
|
|
3315
|
-
function commonjsResolve (path, originalModuleDir) {
|
|
3316
|
-
var shouldTryNodeModules = isPossibleNodeModulesPath(path);
|
|
3317
|
-
path = normalize(path);
|
|
3318
|
-
var relPath;
|
|
3319
|
-
if (path[0] === '/') {
|
|
3320
|
-
originalModuleDir = '';
|
|
3321
|
-
}
|
|
3322
|
-
var modules = getDynamicModules();
|
|
3323
|
-
var checkedExtensions = ['', '.js', '.json'];
|
|
3324
|
-
while (true) {
|
|
3325
|
-
if (!shouldTryNodeModules) {
|
|
3326
|
-
relPath = normalize(originalModuleDir + '/' + path);
|
|
3327
|
-
} else {
|
|
3328
|
-
relPath = normalize(originalModuleDir + '/node_modules/' + path);
|
|
3329
|
-
}
|
|
3330
|
-
|
|
3331
|
-
if (relPath.endsWith('/..')) {
|
|
3332
|
-
break; // Travelled too far up, avoid infinite loop
|
|
3333
|
-
}
|
|
3334
|
-
|
|
3335
|
-
for (var extensionIndex = 0; extensionIndex < checkedExtensions.length; extensionIndex++) {
|
|
3336
|
-
var resolvedPath = relPath + checkedExtensions[extensionIndex];
|
|
3337
|
-
if (modules[resolvedPath]) {
|
|
3338
|
-
return resolvedPath;
|
|
3339
|
-
}
|
|
3340
|
-
}
|
|
3341
|
-
if (!shouldTryNodeModules) break;
|
|
3342
|
-
var nextDir = normalize(originalModuleDir + '/..');
|
|
3343
|
-
if (nextDir === originalModuleDir) break;
|
|
3344
|
-
originalModuleDir = nextDir;
|
|
3345
|
-
}
|
|
3346
|
-
return null;
|
|
3347
|
-
}
|
|
3348
|
-
|
|
3349
|
-
function isPossibleNodeModulesPath (modulePath) {
|
|
3350
|
-
var c0 = modulePath[0];
|
|
3351
|
-
if (c0 === '/' || c0 === '\\') return false;
|
|
3352
|
-
var c1 = modulePath[1], c2 = modulePath[2];
|
|
3353
|
-
if ((c0 === '.' && (!c1 || c1 === '/' || c1 === '\\')) ||
|
|
3354
|
-
(c0 === '.' && c1 === '.' && (!c2 || c2 === '/' || c2 === '\\'))) return false;
|
|
3355
|
-
if (c1 === ':' && (c2 === '/' || c2 === '\\')) return false;
|
|
3356
|
-
return true;
|
|
3357
|
-
}
|
|
3358
|
-
|
|
3359
|
-
function normalize (path) {
|
|
3360
|
-
path = path.replace(/\\/g, '/');
|
|
3361
|
-
var parts = path.split('/');
|
|
3362
|
-
var slashed = parts[0] === '';
|
|
3363
|
-
for (var i = 1; i < parts.length; i++) {
|
|
3364
|
-
if (parts[i] === '.' || parts[i] === '') {
|
|
3365
|
-
parts.splice(i--, 1);
|
|
3366
|
-
}
|
|
3367
|
-
}
|
|
3368
|
-
for (var i = 1; i < parts.length; i++) {
|
|
3369
|
-
if (parts[i] !== '..') continue;
|
|
3370
|
-
if (i > 0 && parts[i - 1] !== '..' && parts[i - 1] !== '.') {
|
|
3371
|
-
parts.splice(--i, 2);
|
|
3372
|
-
i--;
|
|
3373
|
-
}
|
|
3374
|
-
}
|
|
3375
|
-
path = parts.join('/');
|
|
3376
|
-
if (slashed && path[0] !== '/') path = '/' + path;
|
|
3377
|
-
else if (path.length === 0) path = '.';
|
|
3378
|
-
return path;
|
|
3379
|
-
}
|
|
3380
|
-
|
|
3381
|
-
var lib = {};
|
|
3382
|
-
|
|
3383
|
-
const getRule = (a) => ({
|
|
3384
|
-
[a]: createCommonjsRequire("/node_modules/@putout/plugin-putout/lib")(`./${a}`),
|
|
3385
|
-
});
|
|
3386
|
-
|
|
3387
|
-
var rules = lib.rules = {
|
|
3388
|
-
...getRule('apply-processors-destructuring'),
|
|
3389
|
-
...getRule('apply-async-formatter'),
|
|
3390
|
-
...getRule('apply-create-test'),
|
|
3391
|
-
...getRule('apply-remove'),
|
|
3392
|
-
...getRule('apply-declare'),
|
|
3393
|
-
...getRule('check-replace-code'),
|
|
3394
|
-
...getRule('check-match'),
|
|
3395
|
-
...getRule('convert-putout-test-to-create-test'),
|
|
3396
|
-
...getRule('convert-to-no-transform-code'),
|
|
3397
|
-
...getRule('convert-find-to-traverse'),
|
|
3398
|
-
...getRule('convert-destructuring-to-identifier'),
|
|
3399
|
-
...getRule('convert-number-to-numeric'),
|
|
3400
|
-
...getRule('convert-replace-with'),
|
|
3401
|
-
...getRule('convert-replace-with-multiple'),
|
|
3402
|
-
...getRule('convert-replace-to-function'),
|
|
3403
|
-
...getRule('convert-match-to-function'),
|
|
3404
|
-
...getRule('convert-babel-types'),
|
|
3405
|
-
...getRule('convert-node-to-path-in-get-template-values'),
|
|
3406
|
-
...getRule('convert-traverse-to-include'),
|
|
3407
|
-
...getRule('convert-traverse-to-replace'),
|
|
3408
|
-
...getRule('convert-process-to-find'),
|
|
3409
|
-
...getRule('convert-method-to-property'),
|
|
3410
|
-
...getRule('convert-add-argument-to-add-args'),
|
|
3411
|
-
...getRule('convert-dirname-to-url'),
|
|
3412
|
-
...getRule('convert-url-to-dirname'),
|
|
3413
|
-
...getRule('convert-report-to-function'),
|
|
3414
|
-
...getRule('replace-test-message'),
|
|
3415
|
-
...getRule('rename-operate-to-operator'),
|
|
3416
|
-
...getRule('replace-operate-with-operator'),
|
|
3417
|
-
...getRule('shorten-imports'),
|
|
3418
|
-
...getRule('declare'),
|
|
3419
|
-
...getRule('add-args'),
|
|
3420
|
-
...getRule('add-push'),
|
|
3421
|
-
...getRule('move-require-on-top-level'),
|
|
3422
|
-
...getRule('includer'),
|
|
3423
|
-
...getRule('create-test'),
|
|
3424
|
-
};
|
|
3425
|
-
|
|
3426
|
-
var pluginPutout = /*#__PURE__*/_mergeNamespaces({
|
|
3427
|
-
__proto__: null,
|
|
3428
|
-
default: lib,
|
|
3429
|
-
rules: rules
|
|
3430
|
-
}, [lib]);
|
|
3431
|
-
|
|
3432
|
-
export { pluginPutout as default };
|