@tinacms/app 0.0.28 → 1.0.1
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/appFiles/node_modules/.package-lock.json +23 -23
- package/appFiles/node_modules/@babel/generator/lib/generators/base.js.map +1 -1
- package/appFiles/node_modules/@babel/generator/lib/generators/classes.js +1 -1
- package/appFiles/node_modules/@babel/generator/lib/generators/classes.js.map +1 -1
- package/appFiles/node_modules/@babel/generator/lib/generators/expressions.js +9 -15
- package/appFiles/node_modules/@babel/generator/lib/generators/expressions.js.map +1 -1
- package/appFiles/node_modules/@babel/generator/lib/generators/methods.js +12 -25
- package/appFiles/node_modules/@babel/generator/lib/generators/methods.js.map +1 -1
- package/appFiles/node_modules/@babel/generator/lib/generators/modules.js +6 -14
- package/appFiles/node_modules/@babel/generator/lib/generators/modules.js.map +1 -1
- package/appFiles/node_modules/@babel/generator/lib/generators/statements.js +1 -16
- package/appFiles/node_modules/@babel/generator/lib/generators/statements.js.map +1 -1
- package/appFiles/node_modules/@babel/generator/lib/index.js +11 -0
- package/appFiles/node_modules/@babel/generator/lib/index.js.map +1 -1
- package/appFiles/node_modules/@babel/generator/lib/printer.js +112 -86
- package/appFiles/node_modules/@babel/generator/lib/printer.js.map +1 -1
- package/appFiles/node_modules/@babel/generator/package.json +3 -3
- package/appFiles/node_modules/@babel/parser/lib/index.js +165 -99
- package/appFiles/node_modules/@babel/parser/lib/index.js.map +1 -1
- package/appFiles/node_modules/@babel/parser/package.json +2 -2
- package/appFiles/node_modules/@babel/parser/typings/babel-parser.d.ts +92 -80
- package/appFiles/node_modules/@babel/runtime/helpers/checkInRHS.js +6 -0
- package/appFiles/node_modules/@babel/runtime/helpers/createClass.js +2 -1
- package/appFiles/node_modules/@babel/runtime/helpers/defineProperty.js +2 -0
- package/appFiles/node_modules/@babel/runtime/helpers/esm/checkInRHS.js +5 -0
- package/appFiles/node_modules/@babel/runtime/helpers/esm/createClass.js +2 -1
- package/appFiles/node_modules/@babel/runtime/helpers/esm/defineProperty.js +2 -0
- package/appFiles/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +23 -18
- package/appFiles/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimitLoose.js +8 -7
- package/appFiles/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js +3 -8
- package/appFiles/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +23 -18
- package/appFiles/node_modules/@babel/runtime/helpers/iterableToArrayLimitLoose.js +8 -7
- package/appFiles/node_modules/@babel/runtime/helpers/regeneratorRuntime.js +3 -8
- package/appFiles/node_modules/@babel/runtime/package.json +29 -20
- package/appFiles/node_modules/@babel/traverse/lib/path/context.js +3 -2
- package/appFiles/node_modules/@babel/traverse/lib/path/context.js.map +1 -1
- package/appFiles/node_modules/@babel/traverse/lib/path/conversion.js +8 -4
- package/appFiles/node_modules/@babel/traverse/lib/path/conversion.js.map +1 -1
- package/appFiles/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js +1 -0
- package/appFiles/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js.map +1 -1
- package/appFiles/node_modules/@babel/traverse/lib/scope/index.js +1 -1
- package/appFiles/node_modules/@babel/traverse/lib/scope/index.js.map +1 -1
- package/appFiles/node_modules/@babel/traverse/package.json +4 -4
- package/appFiles/node_modules/@babel/types/lib/asserts/assertNode.js +0 -3
- package/appFiles/node_modules/@babel/types/lib/asserts/assertNode.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/asserts/generated/index.js +0 -303
- package/appFiles/node_modules/@babel/types/lib/asserts/generated/index.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js +0 -4
- package/appFiles/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js +0 -11
- package/appFiles/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/builders/generated/index.js +0 -253
- package/appFiles/node_modules/@babel/types/lib/builders/generated/index.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/builders/generated/uppercase.js +0 -1
- package/appFiles/node_modules/@babel/types/lib/builders/generated/uppercase.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/builders/react/buildChildren.js +0 -7
- package/appFiles/node_modules/@babel/types/lib/builders/react/buildChildren.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js +0 -5
- package/appFiles/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/builders/validateNode.js +0 -5
- package/appFiles/node_modules/@babel/types/lib/builders/validateNode.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/clone/clone.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/clone/clone.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/clone/cloneDeep.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/clone/cloneDeep.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/clone/cloneNode.js +4 -22
- package/appFiles/node_modules/@babel/types/lib/clone/cloneNode.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/comments/addComment.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/comments/addComment.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/comments/addComments.js +0 -3
- package/appFiles/node_modules/@babel/types/lib/comments/addComments.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/comments/inheritInnerComments.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/comments/inheritInnerComments.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/comments/inheritLeadingComments.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/comments/inheritLeadingComments.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/comments/inheritTrailingComments.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/comments/inheritTrailingComments.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/comments/inheritsComments.js +0 -4
- package/appFiles/node_modules/@babel/types/lib/comments/inheritsComments.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/comments/removeComments.js +0 -3
- package/appFiles/node_modules/@babel/types/lib/comments/removeComments.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/constants/generated/index.js +0 -1
- package/appFiles/node_modules/@babel/types/lib/constants/generated/index.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/constants/index.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/converters/ensureBlock.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/converters/ensureBlock.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js +2 -12
- package/appFiles/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/converters/toBlock.js +0 -7
- package/appFiles/node_modules/@babel/types/lib/converters/toBlock.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/converters/toComputedKey.js +2 -4
- package/appFiles/node_modules/@babel/types/lib/converters/toComputedKey.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/converters/toExpression.js +0 -4
- package/appFiles/node_modules/@babel/types/lib/converters/toExpression.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/converters/toIdentifier.js +2 -6
- package/appFiles/node_modules/@babel/types/lib/converters/toIdentifier.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/converters/toKeyAlias.js +0 -7
- package/appFiles/node_modules/@babel/types/lib/converters/toKeyAlias.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/converters/toSequenceExpression.js +0 -3
- package/appFiles/node_modules/@babel/types/lib/converters/toSequenceExpression.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/converters/toStatement.js +1 -7
- package/appFiles/node_modules/@babel/types/lib/converters/toStatement.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/converters/valueToNode.js +2 -18
- package/appFiles/node_modules/@babel/types/lib/converters/valueToNode.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/definitions/core.js +33 -61
- package/appFiles/node_modules/@babel/types/lib/definitions/core.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/definitions/experimental.js +3 -1
- package/appFiles/node_modules/@babel/types/lib/definitions/experimental.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/definitions/flow.js +1 -3
- package/appFiles/node_modules/@babel/types/lib/definitions/flow.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/definitions/index.js +0 -18
- package/appFiles/node_modules/@babel/types/lib/definitions/index.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/definitions/jsx.js +0 -1
- package/appFiles/node_modules/@babel/types/lib/definitions/jsx.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/definitions/misc.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/definitions/misc.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/definitions/placeholders.js +0 -5
- package/appFiles/node_modules/@babel/types/lib/definitions/placeholders.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/definitions/typescript.js +4 -15
- package/appFiles/node_modules/@babel/types/lib/definitions/typescript.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/definitions/utils.js +1 -65
- package/appFiles/node_modules/@babel/types/lib/definitions/utils.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/index.d.ts +64 -65
- package/appFiles/node_modules/@babel/types/lib/index.js +1 -75
- package/appFiles/node_modules/@babel/types/lib/index.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js +3 -12
- package/appFiles/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/modifications/inherits.js +0 -4
- package/appFiles/node_modules/@babel/types/lib/modifications/inherits.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js +0 -4
- package/appFiles/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/modifications/removeProperties.js +3 -8
- package/appFiles/node_modules/@babel/types/lib/modifications/removeProperties.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js +0 -3
- package/appFiles/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js +1 -10
- package/appFiles/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js +4 -14
- package/appFiles/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js +0 -3
- package/appFiles/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/traverse/traverse.js +0 -7
- package/appFiles/node_modules/@babel/types/lib/traverse/traverse.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/traverse/traverseFast.js +2 -5
- package/appFiles/node_modules/@babel/types/lib/traverse/traverseFast.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/utils/inherit.js +0 -1
- package/appFiles/node_modules/@babel/types/lib/utils/inherit.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js +1 -8
- package/appFiles/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/utils/shallowEqual.js +2 -4
- package/appFiles/node_modules/@babel/types/lib/utils/shallowEqual.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/generated/index.js +0 -906
- package/appFiles/node_modules/@babel/types/lib/validators/generated/index.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/is.js +0 -8
- package/appFiles/node_modules/@babel/types/lib/validators/is.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/isBinding.js +4 -8
- package/appFiles/node_modules/@babel/types/lib/validators/isBinding.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/isBlockScoped.js +0 -3
- package/appFiles/node_modules/@babel/types/lib/validators/isBlockScoped.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/isImmutable.js +0 -5
- package/appFiles/node_modules/@babel/types/lib/validators/isImmutable.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/isLet.js +2 -4
- package/appFiles/node_modules/@babel/types/lib/validators/isLet.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/isNode.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/validators/isNode.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/isNodesEquivalent.js +2 -16
- package/appFiles/node_modules/@babel/types/lib/validators/isNodesEquivalent.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/isPlaceholderType.js +0 -4
- package/appFiles/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/isReferenced.js +0 -13
- package/appFiles/node_modules/@babel/types/lib/validators/isReferenced.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/isScope.js +0 -3
- package/appFiles/node_modules/@babel/types/lib/validators/isScope.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/isSpecifierDefault.js +2 -3
- package/appFiles/node_modules/@babel/types/lib/validators/isSpecifierDefault.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/isType.js +1 -5
- package/appFiles/node_modules/@babel/types/lib/validators/isType.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/isValidES3Identifier.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/validators/isValidES3Identifier.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/isValidIdentifier.js +0 -4
- package/appFiles/node_modules/@babel/types/lib/validators/isValidIdentifier.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/isVar.js +2 -4
- package/appFiles/node_modules/@babel/types/lib/validators/isVar.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/matchesPattern.js +0 -8
- package/appFiles/node_modules/@babel/types/lib/validators/matchesPattern.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/react/isCompatTag.js +0 -1
- package/appFiles/node_modules/@babel/types/lib/validators/react/isCompatTag.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/react/isReactComponent.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/validators/react/isReactComponent.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/validate.js +0 -4
- package/appFiles/node_modules/@babel/types/lib/validators/validate.js.map +1 -1
- package/appFiles/node_modules/@babel/types/package.json +3 -3
- package/appFiles/node_modules/regenerator-runtime/package.json +2 -2
- package/appFiles/node_modules/regenerator-runtime/runtime.js +18 -17
- package/appFiles/src/App.tsx +0 -12
- package/appFiles/src/fields/rich-text/monaco/mdx.js +0 -46
- package/appFiles/src/lib/machines/query-machine.ts +130 -2
- package/appFiles/src/preview.tsx +9 -15
- package/dist/index.js +1 -1
- package/package.json +4 -4
- package/appFiles/node_modules/@babel/types/lib/index.d.ts.map +0 -1
|
@@ -305,13 +305,11 @@ exports.isWhile = isWhile;
|
|
|
305
305
|
exports.isWhileStatement = isWhileStatement;
|
|
306
306
|
exports.isWithStatement = isWithStatement;
|
|
307
307
|
exports.isYieldExpression = isYieldExpression;
|
|
308
|
-
|
|
309
308
|
var _shallowEqual = require("../../utils/shallowEqual");
|
|
310
309
|
|
|
311
310
|
function isArrayExpression(node, opts) {
|
|
312
311
|
if (!node) return false;
|
|
313
312
|
const nodeType = node.type;
|
|
314
|
-
|
|
315
313
|
if (nodeType === "ArrayExpression") {
|
|
316
314
|
if (typeof opts === "undefined") {
|
|
317
315
|
return true;
|
|
@@ -319,14 +317,11 @@ function isArrayExpression(node, opts) {
|
|
|
319
317
|
return (0, _shallowEqual.default)(node, opts);
|
|
320
318
|
}
|
|
321
319
|
}
|
|
322
|
-
|
|
323
320
|
return false;
|
|
324
321
|
}
|
|
325
|
-
|
|
326
322
|
function isAssignmentExpression(node, opts) {
|
|
327
323
|
if (!node) return false;
|
|
328
324
|
const nodeType = node.type;
|
|
329
|
-
|
|
330
325
|
if (nodeType === "AssignmentExpression") {
|
|
331
326
|
if (typeof opts === "undefined") {
|
|
332
327
|
return true;
|
|
@@ -334,14 +329,11 @@ function isAssignmentExpression(node, opts) {
|
|
|
334
329
|
return (0, _shallowEqual.default)(node, opts);
|
|
335
330
|
}
|
|
336
331
|
}
|
|
337
|
-
|
|
338
332
|
return false;
|
|
339
333
|
}
|
|
340
|
-
|
|
341
334
|
function isBinaryExpression(node, opts) {
|
|
342
335
|
if (!node) return false;
|
|
343
336
|
const nodeType = node.type;
|
|
344
|
-
|
|
345
337
|
if (nodeType === "BinaryExpression") {
|
|
346
338
|
if (typeof opts === "undefined") {
|
|
347
339
|
return true;
|
|
@@ -349,14 +341,11 @@ function isBinaryExpression(node, opts) {
|
|
|
349
341
|
return (0, _shallowEqual.default)(node, opts);
|
|
350
342
|
}
|
|
351
343
|
}
|
|
352
|
-
|
|
353
344
|
return false;
|
|
354
345
|
}
|
|
355
|
-
|
|
356
346
|
function isInterpreterDirective(node, opts) {
|
|
357
347
|
if (!node) return false;
|
|
358
348
|
const nodeType = node.type;
|
|
359
|
-
|
|
360
349
|
if (nodeType === "InterpreterDirective") {
|
|
361
350
|
if (typeof opts === "undefined") {
|
|
362
351
|
return true;
|
|
@@ -364,14 +353,11 @@ function isInterpreterDirective(node, opts) {
|
|
|
364
353
|
return (0, _shallowEqual.default)(node, opts);
|
|
365
354
|
}
|
|
366
355
|
}
|
|
367
|
-
|
|
368
356
|
return false;
|
|
369
357
|
}
|
|
370
|
-
|
|
371
358
|
function isDirective(node, opts) {
|
|
372
359
|
if (!node) return false;
|
|
373
360
|
const nodeType = node.type;
|
|
374
|
-
|
|
375
361
|
if (nodeType === "Directive") {
|
|
376
362
|
if (typeof opts === "undefined") {
|
|
377
363
|
return true;
|
|
@@ -379,14 +365,11 @@ function isDirective(node, opts) {
|
|
|
379
365
|
return (0, _shallowEqual.default)(node, opts);
|
|
380
366
|
}
|
|
381
367
|
}
|
|
382
|
-
|
|
383
368
|
return false;
|
|
384
369
|
}
|
|
385
|
-
|
|
386
370
|
function isDirectiveLiteral(node, opts) {
|
|
387
371
|
if (!node) return false;
|
|
388
372
|
const nodeType = node.type;
|
|
389
|
-
|
|
390
373
|
if (nodeType === "DirectiveLiteral") {
|
|
391
374
|
if (typeof opts === "undefined") {
|
|
392
375
|
return true;
|
|
@@ -394,14 +377,11 @@ function isDirectiveLiteral(node, opts) {
|
|
|
394
377
|
return (0, _shallowEqual.default)(node, opts);
|
|
395
378
|
}
|
|
396
379
|
}
|
|
397
|
-
|
|
398
380
|
return false;
|
|
399
381
|
}
|
|
400
|
-
|
|
401
382
|
function isBlockStatement(node, opts) {
|
|
402
383
|
if (!node) return false;
|
|
403
384
|
const nodeType = node.type;
|
|
404
|
-
|
|
405
385
|
if (nodeType === "BlockStatement") {
|
|
406
386
|
if (typeof opts === "undefined") {
|
|
407
387
|
return true;
|
|
@@ -409,14 +389,11 @@ function isBlockStatement(node, opts) {
|
|
|
409
389
|
return (0, _shallowEqual.default)(node, opts);
|
|
410
390
|
}
|
|
411
391
|
}
|
|
412
|
-
|
|
413
392
|
return false;
|
|
414
393
|
}
|
|
415
|
-
|
|
416
394
|
function isBreakStatement(node, opts) {
|
|
417
395
|
if (!node) return false;
|
|
418
396
|
const nodeType = node.type;
|
|
419
|
-
|
|
420
397
|
if (nodeType === "BreakStatement") {
|
|
421
398
|
if (typeof opts === "undefined") {
|
|
422
399
|
return true;
|
|
@@ -424,14 +401,11 @@ function isBreakStatement(node, opts) {
|
|
|
424
401
|
return (0, _shallowEqual.default)(node, opts);
|
|
425
402
|
}
|
|
426
403
|
}
|
|
427
|
-
|
|
428
404
|
return false;
|
|
429
405
|
}
|
|
430
|
-
|
|
431
406
|
function isCallExpression(node, opts) {
|
|
432
407
|
if (!node) return false;
|
|
433
408
|
const nodeType = node.type;
|
|
434
|
-
|
|
435
409
|
if (nodeType === "CallExpression") {
|
|
436
410
|
if (typeof opts === "undefined") {
|
|
437
411
|
return true;
|
|
@@ -439,14 +413,11 @@ function isCallExpression(node, opts) {
|
|
|
439
413
|
return (0, _shallowEqual.default)(node, opts);
|
|
440
414
|
}
|
|
441
415
|
}
|
|
442
|
-
|
|
443
416
|
return false;
|
|
444
417
|
}
|
|
445
|
-
|
|
446
418
|
function isCatchClause(node, opts) {
|
|
447
419
|
if (!node) return false;
|
|
448
420
|
const nodeType = node.type;
|
|
449
|
-
|
|
450
421
|
if (nodeType === "CatchClause") {
|
|
451
422
|
if (typeof opts === "undefined") {
|
|
452
423
|
return true;
|
|
@@ -454,14 +425,11 @@ function isCatchClause(node, opts) {
|
|
|
454
425
|
return (0, _shallowEqual.default)(node, opts);
|
|
455
426
|
}
|
|
456
427
|
}
|
|
457
|
-
|
|
458
428
|
return false;
|
|
459
429
|
}
|
|
460
|
-
|
|
461
430
|
function isConditionalExpression(node, opts) {
|
|
462
431
|
if (!node) return false;
|
|
463
432
|
const nodeType = node.type;
|
|
464
|
-
|
|
465
433
|
if (nodeType === "ConditionalExpression") {
|
|
466
434
|
if (typeof opts === "undefined") {
|
|
467
435
|
return true;
|
|
@@ -469,14 +437,11 @@ function isConditionalExpression(node, opts) {
|
|
|
469
437
|
return (0, _shallowEqual.default)(node, opts);
|
|
470
438
|
}
|
|
471
439
|
}
|
|
472
|
-
|
|
473
440
|
return false;
|
|
474
441
|
}
|
|
475
|
-
|
|
476
442
|
function isContinueStatement(node, opts) {
|
|
477
443
|
if (!node) return false;
|
|
478
444
|
const nodeType = node.type;
|
|
479
|
-
|
|
480
445
|
if (nodeType === "ContinueStatement") {
|
|
481
446
|
if (typeof opts === "undefined") {
|
|
482
447
|
return true;
|
|
@@ -484,14 +449,11 @@ function isContinueStatement(node, opts) {
|
|
|
484
449
|
return (0, _shallowEqual.default)(node, opts);
|
|
485
450
|
}
|
|
486
451
|
}
|
|
487
|
-
|
|
488
452
|
return false;
|
|
489
453
|
}
|
|
490
|
-
|
|
491
454
|
function isDebuggerStatement(node, opts) {
|
|
492
455
|
if (!node) return false;
|
|
493
456
|
const nodeType = node.type;
|
|
494
|
-
|
|
495
457
|
if (nodeType === "DebuggerStatement") {
|
|
496
458
|
if (typeof opts === "undefined") {
|
|
497
459
|
return true;
|
|
@@ -499,14 +461,11 @@ function isDebuggerStatement(node, opts) {
|
|
|
499
461
|
return (0, _shallowEqual.default)(node, opts);
|
|
500
462
|
}
|
|
501
463
|
}
|
|
502
|
-
|
|
503
464
|
return false;
|
|
504
465
|
}
|
|
505
|
-
|
|
506
466
|
function isDoWhileStatement(node, opts) {
|
|
507
467
|
if (!node) return false;
|
|
508
468
|
const nodeType = node.type;
|
|
509
|
-
|
|
510
469
|
if (nodeType === "DoWhileStatement") {
|
|
511
470
|
if (typeof opts === "undefined") {
|
|
512
471
|
return true;
|
|
@@ -514,14 +473,11 @@ function isDoWhileStatement(node, opts) {
|
|
|
514
473
|
return (0, _shallowEqual.default)(node, opts);
|
|
515
474
|
}
|
|
516
475
|
}
|
|
517
|
-
|
|
518
476
|
return false;
|
|
519
477
|
}
|
|
520
|
-
|
|
521
478
|
function isEmptyStatement(node, opts) {
|
|
522
479
|
if (!node) return false;
|
|
523
480
|
const nodeType = node.type;
|
|
524
|
-
|
|
525
481
|
if (nodeType === "EmptyStatement") {
|
|
526
482
|
if (typeof opts === "undefined") {
|
|
527
483
|
return true;
|
|
@@ -529,14 +485,11 @@ function isEmptyStatement(node, opts) {
|
|
|
529
485
|
return (0, _shallowEqual.default)(node, opts);
|
|
530
486
|
}
|
|
531
487
|
}
|
|
532
|
-
|
|
533
488
|
return false;
|
|
534
489
|
}
|
|
535
|
-
|
|
536
490
|
function isExpressionStatement(node, opts) {
|
|
537
491
|
if (!node) return false;
|
|
538
492
|
const nodeType = node.type;
|
|
539
|
-
|
|
540
493
|
if (nodeType === "ExpressionStatement") {
|
|
541
494
|
if (typeof opts === "undefined") {
|
|
542
495
|
return true;
|
|
@@ -544,14 +497,11 @@ function isExpressionStatement(node, opts) {
|
|
|
544
497
|
return (0, _shallowEqual.default)(node, opts);
|
|
545
498
|
}
|
|
546
499
|
}
|
|
547
|
-
|
|
548
500
|
return false;
|
|
549
501
|
}
|
|
550
|
-
|
|
551
502
|
function isFile(node, opts) {
|
|
552
503
|
if (!node) return false;
|
|
553
504
|
const nodeType = node.type;
|
|
554
|
-
|
|
555
505
|
if (nodeType === "File") {
|
|
556
506
|
if (typeof opts === "undefined") {
|
|
557
507
|
return true;
|
|
@@ -559,14 +509,11 @@ function isFile(node, opts) {
|
|
|
559
509
|
return (0, _shallowEqual.default)(node, opts);
|
|
560
510
|
}
|
|
561
511
|
}
|
|
562
|
-
|
|
563
512
|
return false;
|
|
564
513
|
}
|
|
565
|
-
|
|
566
514
|
function isForInStatement(node, opts) {
|
|
567
515
|
if (!node) return false;
|
|
568
516
|
const nodeType = node.type;
|
|
569
|
-
|
|
570
517
|
if (nodeType === "ForInStatement") {
|
|
571
518
|
if (typeof opts === "undefined") {
|
|
572
519
|
return true;
|
|
@@ -574,14 +521,11 @@ function isForInStatement(node, opts) {
|
|
|
574
521
|
return (0, _shallowEqual.default)(node, opts);
|
|
575
522
|
}
|
|
576
523
|
}
|
|
577
|
-
|
|
578
524
|
return false;
|
|
579
525
|
}
|
|
580
|
-
|
|
581
526
|
function isForStatement(node, opts) {
|
|
582
527
|
if (!node) return false;
|
|
583
528
|
const nodeType = node.type;
|
|
584
|
-
|
|
585
529
|
if (nodeType === "ForStatement") {
|
|
586
530
|
if (typeof opts === "undefined") {
|
|
587
531
|
return true;
|
|
@@ -589,14 +533,11 @@ function isForStatement(node, opts) {
|
|
|
589
533
|
return (0, _shallowEqual.default)(node, opts);
|
|
590
534
|
}
|
|
591
535
|
}
|
|
592
|
-
|
|
593
536
|
return false;
|
|
594
537
|
}
|
|
595
|
-
|
|
596
538
|
function isFunctionDeclaration(node, opts) {
|
|
597
539
|
if (!node) return false;
|
|
598
540
|
const nodeType = node.type;
|
|
599
|
-
|
|
600
541
|
if (nodeType === "FunctionDeclaration") {
|
|
601
542
|
if (typeof opts === "undefined") {
|
|
602
543
|
return true;
|
|
@@ -604,14 +545,11 @@ function isFunctionDeclaration(node, opts) {
|
|
|
604
545
|
return (0, _shallowEqual.default)(node, opts);
|
|
605
546
|
}
|
|
606
547
|
}
|
|
607
|
-
|
|
608
548
|
return false;
|
|
609
549
|
}
|
|
610
|
-
|
|
611
550
|
function isFunctionExpression(node, opts) {
|
|
612
551
|
if (!node) return false;
|
|
613
552
|
const nodeType = node.type;
|
|
614
|
-
|
|
615
553
|
if (nodeType === "FunctionExpression") {
|
|
616
554
|
if (typeof opts === "undefined") {
|
|
617
555
|
return true;
|
|
@@ -619,14 +557,11 @@ function isFunctionExpression(node, opts) {
|
|
|
619
557
|
return (0, _shallowEqual.default)(node, opts);
|
|
620
558
|
}
|
|
621
559
|
}
|
|
622
|
-
|
|
623
560
|
return false;
|
|
624
561
|
}
|
|
625
|
-
|
|
626
562
|
function isIdentifier(node, opts) {
|
|
627
563
|
if (!node) return false;
|
|
628
564
|
const nodeType = node.type;
|
|
629
|
-
|
|
630
565
|
if (nodeType === "Identifier") {
|
|
631
566
|
if (typeof opts === "undefined") {
|
|
632
567
|
return true;
|
|
@@ -634,14 +569,11 @@ function isIdentifier(node, opts) {
|
|
|
634
569
|
return (0, _shallowEqual.default)(node, opts);
|
|
635
570
|
}
|
|
636
571
|
}
|
|
637
|
-
|
|
638
572
|
return false;
|
|
639
573
|
}
|
|
640
|
-
|
|
641
574
|
function isIfStatement(node, opts) {
|
|
642
575
|
if (!node) return false;
|
|
643
576
|
const nodeType = node.type;
|
|
644
|
-
|
|
645
577
|
if (nodeType === "IfStatement") {
|
|
646
578
|
if (typeof opts === "undefined") {
|
|
647
579
|
return true;
|
|
@@ -649,14 +581,11 @@ function isIfStatement(node, opts) {
|
|
|
649
581
|
return (0, _shallowEqual.default)(node, opts);
|
|
650
582
|
}
|
|
651
583
|
}
|
|
652
|
-
|
|
653
584
|
return false;
|
|
654
585
|
}
|
|
655
|
-
|
|
656
586
|
function isLabeledStatement(node, opts) {
|
|
657
587
|
if (!node) return false;
|
|
658
588
|
const nodeType = node.type;
|
|
659
|
-
|
|
660
589
|
if (nodeType === "LabeledStatement") {
|
|
661
590
|
if (typeof opts === "undefined") {
|
|
662
591
|
return true;
|
|
@@ -664,14 +593,11 @@ function isLabeledStatement(node, opts) {
|
|
|
664
593
|
return (0, _shallowEqual.default)(node, opts);
|
|
665
594
|
}
|
|
666
595
|
}
|
|
667
|
-
|
|
668
596
|
return false;
|
|
669
597
|
}
|
|
670
|
-
|
|
671
598
|
function isStringLiteral(node, opts) {
|
|
672
599
|
if (!node) return false;
|
|
673
600
|
const nodeType = node.type;
|
|
674
|
-
|
|
675
601
|
if (nodeType === "StringLiteral") {
|
|
676
602
|
if (typeof opts === "undefined") {
|
|
677
603
|
return true;
|
|
@@ -679,14 +605,11 @@ function isStringLiteral(node, opts) {
|
|
|
679
605
|
return (0, _shallowEqual.default)(node, opts);
|
|
680
606
|
}
|
|
681
607
|
}
|
|
682
|
-
|
|
683
608
|
return false;
|
|
684
609
|
}
|
|
685
|
-
|
|
686
610
|
function isNumericLiteral(node, opts) {
|
|
687
611
|
if (!node) return false;
|
|
688
612
|
const nodeType = node.type;
|
|
689
|
-
|
|
690
613
|
if (nodeType === "NumericLiteral") {
|
|
691
614
|
if (typeof opts === "undefined") {
|
|
692
615
|
return true;
|
|
@@ -694,14 +617,11 @@ function isNumericLiteral(node, opts) {
|
|
|
694
617
|
return (0, _shallowEqual.default)(node, opts);
|
|
695
618
|
}
|
|
696
619
|
}
|
|
697
|
-
|
|
698
620
|
return false;
|
|
699
621
|
}
|
|
700
|
-
|
|
701
622
|
function isNullLiteral(node, opts) {
|
|
702
623
|
if (!node) return false;
|
|
703
624
|
const nodeType = node.type;
|
|
704
|
-
|
|
705
625
|
if (nodeType === "NullLiteral") {
|
|
706
626
|
if (typeof opts === "undefined") {
|
|
707
627
|
return true;
|
|
@@ -709,14 +629,11 @@ function isNullLiteral(node, opts) {
|
|
|
709
629
|
return (0, _shallowEqual.default)(node, opts);
|
|
710
630
|
}
|
|
711
631
|
}
|
|
712
|
-
|
|
713
632
|
return false;
|
|
714
633
|
}
|
|
715
|
-
|
|
716
634
|
function isBooleanLiteral(node, opts) {
|
|
717
635
|
if (!node) return false;
|
|
718
636
|
const nodeType = node.type;
|
|
719
|
-
|
|
720
637
|
if (nodeType === "BooleanLiteral") {
|
|
721
638
|
if (typeof opts === "undefined") {
|
|
722
639
|
return true;
|
|
@@ -724,14 +641,11 @@ function isBooleanLiteral(node, opts) {
|
|
|
724
641
|
return (0, _shallowEqual.default)(node, opts);
|
|
725
642
|
}
|
|
726
643
|
}
|
|
727
|
-
|
|
728
644
|
return false;
|
|
729
645
|
}
|
|
730
|
-
|
|
731
646
|
function isRegExpLiteral(node, opts) {
|
|
732
647
|
if (!node) return false;
|
|
733
648
|
const nodeType = node.type;
|
|
734
|
-
|
|
735
649
|
if (nodeType === "RegExpLiteral") {
|
|
736
650
|
if (typeof opts === "undefined") {
|
|
737
651
|
return true;
|
|
@@ -739,14 +653,11 @@ function isRegExpLiteral(node, opts) {
|
|
|
739
653
|
return (0, _shallowEqual.default)(node, opts);
|
|
740
654
|
}
|
|
741
655
|
}
|
|
742
|
-
|
|
743
656
|
return false;
|
|
744
657
|
}
|
|
745
|
-
|
|
746
658
|
function isLogicalExpression(node, opts) {
|
|
747
659
|
if (!node) return false;
|
|
748
660
|
const nodeType = node.type;
|
|
749
|
-
|
|
750
661
|
if (nodeType === "LogicalExpression") {
|
|
751
662
|
if (typeof opts === "undefined") {
|
|
752
663
|
return true;
|
|
@@ -754,14 +665,11 @@ function isLogicalExpression(node, opts) {
|
|
|
754
665
|
return (0, _shallowEqual.default)(node, opts);
|
|
755
666
|
}
|
|
756
667
|
}
|
|
757
|
-
|
|
758
668
|
return false;
|
|
759
669
|
}
|
|
760
|
-
|
|
761
670
|
function isMemberExpression(node, opts) {
|
|
762
671
|
if (!node) return false;
|
|
763
672
|
const nodeType = node.type;
|
|
764
|
-
|
|
765
673
|
if (nodeType === "MemberExpression") {
|
|
766
674
|
if (typeof opts === "undefined") {
|
|
767
675
|
return true;
|
|
@@ -769,14 +677,11 @@ function isMemberExpression(node, opts) {
|
|
|
769
677
|
return (0, _shallowEqual.default)(node, opts);
|
|
770
678
|
}
|
|
771
679
|
}
|
|
772
|
-
|
|
773
680
|
return false;
|
|
774
681
|
}
|
|
775
|
-
|
|
776
682
|
function isNewExpression(node, opts) {
|
|
777
683
|
if (!node) return false;
|
|
778
684
|
const nodeType = node.type;
|
|
779
|
-
|
|
780
685
|
if (nodeType === "NewExpression") {
|
|
781
686
|
if (typeof opts === "undefined") {
|
|
782
687
|
return true;
|
|
@@ -784,14 +689,11 @@ function isNewExpression(node, opts) {
|
|
|
784
689
|
return (0, _shallowEqual.default)(node, opts);
|
|
785
690
|
}
|
|
786
691
|
}
|
|
787
|
-
|
|
788
692
|
return false;
|
|
789
693
|
}
|
|
790
|
-
|
|
791
694
|
function isProgram(node, opts) {
|
|
792
695
|
if (!node) return false;
|
|
793
696
|
const nodeType = node.type;
|
|
794
|
-
|
|
795
697
|
if (nodeType === "Program") {
|
|
796
698
|
if (typeof opts === "undefined") {
|
|
797
699
|
return true;
|
|
@@ -799,14 +701,11 @@ function isProgram(node, opts) {
|
|
|
799
701
|
return (0, _shallowEqual.default)(node, opts);
|
|
800
702
|
}
|
|
801
703
|
}
|
|
802
|
-
|
|
803
704
|
return false;
|
|
804
705
|
}
|
|
805
|
-
|
|
806
706
|
function isObjectExpression(node, opts) {
|
|
807
707
|
if (!node) return false;
|
|
808
708
|
const nodeType = node.type;
|
|
809
|
-
|
|
810
709
|
if (nodeType === "ObjectExpression") {
|
|
811
710
|
if (typeof opts === "undefined") {
|
|
812
711
|
return true;
|
|
@@ -814,14 +713,11 @@ function isObjectExpression(node, opts) {
|
|
|
814
713
|
return (0, _shallowEqual.default)(node, opts);
|
|
815
714
|
}
|
|
816
715
|
}
|
|
817
|
-
|
|
818
716
|
return false;
|
|
819
717
|
}
|
|
820
|
-
|
|
821
718
|
function isObjectMethod(node, opts) {
|
|
822
719
|
if (!node) return false;
|
|
823
720
|
const nodeType = node.type;
|
|
824
|
-
|
|
825
721
|
if (nodeType === "ObjectMethod") {
|
|
826
722
|
if (typeof opts === "undefined") {
|
|
827
723
|
return true;
|
|
@@ -829,14 +725,11 @@ function isObjectMethod(node, opts) {
|
|
|
829
725
|
return (0, _shallowEqual.default)(node, opts);
|
|
830
726
|
}
|
|
831
727
|
}
|
|
832
|
-
|
|
833
728
|
return false;
|
|
834
729
|
}
|
|
835
|
-
|
|
836
730
|
function isObjectProperty(node, opts) {
|
|
837
731
|
if (!node) return false;
|
|
838
732
|
const nodeType = node.type;
|
|
839
|
-
|
|
840
733
|
if (nodeType === "ObjectProperty") {
|
|
841
734
|
if (typeof opts === "undefined") {
|
|
842
735
|
return true;
|
|
@@ -844,14 +737,11 @@ function isObjectProperty(node, opts) {
|
|
|
844
737
|
return (0, _shallowEqual.default)(node, opts);
|
|
845
738
|
}
|
|
846
739
|
}
|
|
847
|
-
|
|
848
740
|
return false;
|
|
849
741
|
}
|
|
850
|
-
|
|
851
742
|
function isRestElement(node, opts) {
|
|
852
743
|
if (!node) return false;
|
|
853
744
|
const nodeType = node.type;
|
|
854
|
-
|
|
855
745
|
if (nodeType === "RestElement") {
|
|
856
746
|
if (typeof opts === "undefined") {
|
|
857
747
|
return true;
|
|
@@ -859,14 +749,11 @@ function isRestElement(node, opts) {
|
|
|
859
749
|
return (0, _shallowEqual.default)(node, opts);
|
|
860
750
|
}
|
|
861
751
|
}
|
|
862
|
-
|
|
863
752
|
return false;
|
|
864
753
|
}
|
|
865
|
-
|
|
866
754
|
function isReturnStatement(node, opts) {
|
|
867
755
|
if (!node) return false;
|
|
868
756
|
const nodeType = node.type;
|
|
869
|
-
|
|
870
757
|
if (nodeType === "ReturnStatement") {
|
|
871
758
|
if (typeof opts === "undefined") {
|
|
872
759
|
return true;
|
|
@@ -874,14 +761,11 @@ function isReturnStatement(node, opts) {
|
|
|
874
761
|
return (0, _shallowEqual.default)(node, opts);
|
|
875
762
|
}
|
|
876
763
|
}
|
|
877
|
-
|
|
878
764
|
return false;
|
|
879
765
|
}
|
|
880
|
-
|
|
881
766
|
function isSequenceExpression(node, opts) {
|
|
882
767
|
if (!node) return false;
|
|
883
768
|
const nodeType = node.type;
|
|
884
|
-
|
|
885
769
|
if (nodeType === "SequenceExpression") {
|
|
886
770
|
if (typeof opts === "undefined") {
|
|
887
771
|
return true;
|
|
@@ -889,14 +773,11 @@ function isSequenceExpression(node, opts) {
|
|
|
889
773
|
return (0, _shallowEqual.default)(node, opts);
|
|
890
774
|
}
|
|
891
775
|
}
|
|
892
|
-
|
|
893
776
|
return false;
|
|
894
777
|
}
|
|
895
|
-
|
|
896
778
|
function isParenthesizedExpression(node, opts) {
|
|
897
779
|
if (!node) return false;
|
|
898
780
|
const nodeType = node.type;
|
|
899
|
-
|
|
900
781
|
if (nodeType === "ParenthesizedExpression") {
|
|
901
782
|
if (typeof opts === "undefined") {
|
|
902
783
|
return true;
|
|
@@ -904,14 +785,11 @@ function isParenthesizedExpression(node, opts) {
|
|
|
904
785
|
return (0, _shallowEqual.default)(node, opts);
|
|
905
786
|
}
|
|
906
787
|
}
|
|
907
|
-
|
|
908
788
|
return false;
|
|
909
789
|
}
|
|
910
|
-
|
|
911
790
|
function isSwitchCase(node, opts) {
|
|
912
791
|
if (!node) return false;
|
|
913
792
|
const nodeType = node.type;
|
|
914
|
-
|
|
915
793
|
if (nodeType === "SwitchCase") {
|
|
916
794
|
if (typeof opts === "undefined") {
|
|
917
795
|
return true;
|
|
@@ -919,14 +797,11 @@ function isSwitchCase(node, opts) {
|
|
|
919
797
|
return (0, _shallowEqual.default)(node, opts);
|
|
920
798
|
}
|
|
921
799
|
}
|
|
922
|
-
|
|
923
800
|
return false;
|
|
924
801
|
}
|
|
925
|
-
|
|
926
802
|
function isSwitchStatement(node, opts) {
|
|
927
803
|
if (!node) return false;
|
|
928
804
|
const nodeType = node.type;
|
|
929
|
-
|
|
930
805
|
if (nodeType === "SwitchStatement") {
|
|
931
806
|
if (typeof opts === "undefined") {
|
|
932
807
|
return true;
|
|
@@ -934,14 +809,11 @@ function isSwitchStatement(node, opts) {
|
|
|
934
809
|
return (0, _shallowEqual.default)(node, opts);
|
|
935
810
|
}
|
|
936
811
|
}
|
|
937
|
-
|
|
938
812
|
return false;
|
|
939
813
|
}
|
|
940
|
-
|
|
941
814
|
function isThisExpression(node, opts) {
|
|
942
815
|
if (!node) return false;
|
|
943
816
|
const nodeType = node.type;
|
|
944
|
-
|
|
945
817
|
if (nodeType === "ThisExpression") {
|
|
946
818
|
if (typeof opts === "undefined") {
|
|
947
819
|
return true;
|
|
@@ -949,14 +821,11 @@ function isThisExpression(node, opts) {
|
|
|
949
821
|
return (0, _shallowEqual.default)(node, opts);
|
|
950
822
|
}
|
|
951
823
|
}
|
|
952
|
-
|
|
953
824
|
return false;
|
|
954
825
|
}
|
|
955
|
-
|
|
956
826
|
function isThrowStatement(node, opts) {
|
|
957
827
|
if (!node) return false;
|
|
958
828
|
const nodeType = node.type;
|
|
959
|
-
|
|
960
829
|
if (nodeType === "ThrowStatement") {
|
|
961
830
|
if (typeof opts === "undefined") {
|
|
962
831
|
return true;
|
|
@@ -964,14 +833,11 @@ function isThrowStatement(node, opts) {
|
|
|
964
833
|
return (0, _shallowEqual.default)(node, opts);
|
|
965
834
|
}
|
|
966
835
|
}
|
|
967
|
-
|
|
968
836
|
return false;
|
|
969
837
|
}
|
|
970
|
-
|
|
971
838
|
function isTryStatement(node, opts) {
|
|
972
839
|
if (!node) return false;
|
|
973
840
|
const nodeType = node.type;
|
|
974
|
-
|
|
975
841
|
if (nodeType === "TryStatement") {
|
|
976
842
|
if (typeof opts === "undefined") {
|
|
977
843
|
return true;
|
|
@@ -979,14 +845,11 @@ function isTryStatement(node, opts) {
|
|
|
979
845
|
return (0, _shallowEqual.default)(node, opts);
|
|
980
846
|
}
|
|
981
847
|
}
|
|
982
|
-
|
|
983
848
|
return false;
|
|
984
849
|
}
|
|
985
|
-
|
|
986
850
|
function isUnaryExpression(node, opts) {
|
|
987
851
|
if (!node) return false;
|
|
988
852
|
const nodeType = node.type;
|
|
989
|
-
|
|
990
853
|
if (nodeType === "UnaryExpression") {
|
|
991
854
|
if (typeof opts === "undefined") {
|
|
992
855
|
return true;
|
|
@@ -994,14 +857,11 @@ function isUnaryExpression(node, opts) {
|
|
|
994
857
|
return (0, _shallowEqual.default)(node, opts);
|
|
995
858
|
}
|
|
996
859
|
}
|
|
997
|
-
|
|
998
860
|
return false;
|
|
999
861
|
}
|
|
1000
|
-
|
|
1001
862
|
function isUpdateExpression(node, opts) {
|
|
1002
863
|
if (!node) return false;
|
|
1003
864
|
const nodeType = node.type;
|
|
1004
|
-
|
|
1005
865
|
if (nodeType === "UpdateExpression") {
|
|
1006
866
|
if (typeof opts === "undefined") {
|
|
1007
867
|
return true;
|
|
@@ -1009,14 +869,11 @@ function isUpdateExpression(node, opts) {
|
|
|
1009
869
|
return (0, _shallowEqual.default)(node, opts);
|
|
1010
870
|
}
|
|
1011
871
|
}
|
|
1012
|
-
|
|
1013
872
|
return false;
|
|
1014
873
|
}
|
|
1015
|
-
|
|
1016
874
|
function isVariableDeclaration(node, opts) {
|
|
1017
875
|
if (!node) return false;
|
|
1018
876
|
const nodeType = node.type;
|
|
1019
|
-
|
|
1020
877
|
if (nodeType === "VariableDeclaration") {
|
|
1021
878
|
if (typeof opts === "undefined") {
|
|
1022
879
|
return true;
|
|
@@ -1024,14 +881,11 @@ function isVariableDeclaration(node, opts) {
|
|
|
1024
881
|
return (0, _shallowEqual.default)(node, opts);
|
|
1025
882
|
}
|
|
1026
883
|
}
|
|
1027
|
-
|
|
1028
884
|
return false;
|
|
1029
885
|
}
|
|
1030
|
-
|
|
1031
886
|
function isVariableDeclarator(node, opts) {
|
|
1032
887
|
if (!node) return false;
|
|
1033
888
|
const nodeType = node.type;
|
|
1034
|
-
|
|
1035
889
|
if (nodeType === "VariableDeclarator") {
|
|
1036
890
|
if (typeof opts === "undefined") {
|
|
1037
891
|
return true;
|
|
@@ -1039,14 +893,11 @@ function isVariableDeclarator(node, opts) {
|
|
|
1039
893
|
return (0, _shallowEqual.default)(node, opts);
|
|
1040
894
|
}
|
|
1041
895
|
}
|
|
1042
|
-
|
|
1043
896
|
return false;
|
|
1044
897
|
}
|
|
1045
|
-
|
|
1046
898
|
function isWhileStatement(node, opts) {
|
|
1047
899
|
if (!node) return false;
|
|
1048
900
|
const nodeType = node.type;
|
|
1049
|
-
|
|
1050
901
|
if (nodeType === "WhileStatement") {
|
|
1051
902
|
if (typeof opts === "undefined") {
|
|
1052
903
|
return true;
|
|
@@ -1054,14 +905,11 @@ function isWhileStatement(node, opts) {
|
|
|
1054
905
|
return (0, _shallowEqual.default)(node, opts);
|
|
1055
906
|
}
|
|
1056
907
|
}
|
|
1057
|
-
|
|
1058
908
|
return false;
|
|
1059
909
|
}
|
|
1060
|
-
|
|
1061
910
|
function isWithStatement(node, opts) {
|
|
1062
911
|
if (!node) return false;
|
|
1063
912
|
const nodeType = node.type;
|
|
1064
|
-
|
|
1065
913
|
if (nodeType === "WithStatement") {
|
|
1066
914
|
if (typeof opts === "undefined") {
|
|
1067
915
|
return true;
|
|
@@ -1069,14 +917,11 @@ function isWithStatement(node, opts) {
|
|
|
1069
917
|
return (0, _shallowEqual.default)(node, opts);
|
|
1070
918
|
}
|
|
1071
919
|
}
|
|
1072
|
-
|
|
1073
920
|
return false;
|
|
1074
921
|
}
|
|
1075
|
-
|
|
1076
922
|
function isAssignmentPattern(node, opts) {
|
|
1077
923
|
if (!node) return false;
|
|
1078
924
|
const nodeType = node.type;
|
|
1079
|
-
|
|
1080
925
|
if (nodeType === "AssignmentPattern") {
|
|
1081
926
|
if (typeof opts === "undefined") {
|
|
1082
927
|
return true;
|
|
@@ -1084,14 +929,11 @@ function isAssignmentPattern(node, opts) {
|
|
|
1084
929
|
return (0, _shallowEqual.default)(node, opts);
|
|
1085
930
|
}
|
|
1086
931
|
}
|
|
1087
|
-
|
|
1088
932
|
return false;
|
|
1089
933
|
}
|
|
1090
|
-
|
|
1091
934
|
function isArrayPattern(node, opts) {
|
|
1092
935
|
if (!node) return false;
|
|
1093
936
|
const nodeType = node.type;
|
|
1094
|
-
|
|
1095
937
|
if (nodeType === "ArrayPattern") {
|
|
1096
938
|
if (typeof opts === "undefined") {
|
|
1097
939
|
return true;
|
|
@@ -1099,14 +941,11 @@ function isArrayPattern(node, opts) {
|
|
|
1099
941
|
return (0, _shallowEqual.default)(node, opts);
|
|
1100
942
|
}
|
|
1101
943
|
}
|
|
1102
|
-
|
|
1103
944
|
return false;
|
|
1104
945
|
}
|
|
1105
|
-
|
|
1106
946
|
function isArrowFunctionExpression(node, opts) {
|
|
1107
947
|
if (!node) return false;
|
|
1108
948
|
const nodeType = node.type;
|
|
1109
|
-
|
|
1110
949
|
if (nodeType === "ArrowFunctionExpression") {
|
|
1111
950
|
if (typeof opts === "undefined") {
|
|
1112
951
|
return true;
|
|
@@ -1114,14 +953,11 @@ function isArrowFunctionExpression(node, opts) {
|
|
|
1114
953
|
return (0, _shallowEqual.default)(node, opts);
|
|
1115
954
|
}
|
|
1116
955
|
}
|
|
1117
|
-
|
|
1118
956
|
return false;
|
|
1119
957
|
}
|
|
1120
|
-
|
|
1121
958
|
function isClassBody(node, opts) {
|
|
1122
959
|
if (!node) return false;
|
|
1123
960
|
const nodeType = node.type;
|
|
1124
|
-
|
|
1125
961
|
if (nodeType === "ClassBody") {
|
|
1126
962
|
if (typeof opts === "undefined") {
|
|
1127
963
|
return true;
|
|
@@ -1129,14 +965,11 @@ function isClassBody(node, opts) {
|
|
|
1129
965
|
return (0, _shallowEqual.default)(node, opts);
|
|
1130
966
|
}
|
|
1131
967
|
}
|
|
1132
|
-
|
|
1133
968
|
return false;
|
|
1134
969
|
}
|
|
1135
|
-
|
|
1136
970
|
function isClassExpression(node, opts) {
|
|
1137
971
|
if (!node) return false;
|
|
1138
972
|
const nodeType = node.type;
|
|
1139
|
-
|
|
1140
973
|
if (nodeType === "ClassExpression") {
|
|
1141
974
|
if (typeof opts === "undefined") {
|
|
1142
975
|
return true;
|
|
@@ -1144,14 +977,11 @@ function isClassExpression(node, opts) {
|
|
|
1144
977
|
return (0, _shallowEqual.default)(node, opts);
|
|
1145
978
|
}
|
|
1146
979
|
}
|
|
1147
|
-
|
|
1148
980
|
return false;
|
|
1149
981
|
}
|
|
1150
|
-
|
|
1151
982
|
function isClassDeclaration(node, opts) {
|
|
1152
983
|
if (!node) return false;
|
|
1153
984
|
const nodeType = node.type;
|
|
1154
|
-
|
|
1155
985
|
if (nodeType === "ClassDeclaration") {
|
|
1156
986
|
if (typeof opts === "undefined") {
|
|
1157
987
|
return true;
|
|
@@ -1159,14 +989,11 @@ function isClassDeclaration(node, opts) {
|
|
|
1159
989
|
return (0, _shallowEqual.default)(node, opts);
|
|
1160
990
|
}
|
|
1161
991
|
}
|
|
1162
|
-
|
|
1163
992
|
return false;
|
|
1164
993
|
}
|
|
1165
|
-
|
|
1166
994
|
function isExportAllDeclaration(node, opts) {
|
|
1167
995
|
if (!node) return false;
|
|
1168
996
|
const nodeType = node.type;
|
|
1169
|
-
|
|
1170
997
|
if (nodeType === "ExportAllDeclaration") {
|
|
1171
998
|
if (typeof opts === "undefined") {
|
|
1172
999
|
return true;
|
|
@@ -1174,14 +1001,11 @@ function isExportAllDeclaration(node, opts) {
|
|
|
1174
1001
|
return (0, _shallowEqual.default)(node, opts);
|
|
1175
1002
|
}
|
|
1176
1003
|
}
|
|
1177
|
-
|
|
1178
1004
|
return false;
|
|
1179
1005
|
}
|
|
1180
|
-
|
|
1181
1006
|
function isExportDefaultDeclaration(node, opts) {
|
|
1182
1007
|
if (!node) return false;
|
|
1183
1008
|
const nodeType = node.type;
|
|
1184
|
-
|
|
1185
1009
|
if (nodeType === "ExportDefaultDeclaration") {
|
|
1186
1010
|
if (typeof opts === "undefined") {
|
|
1187
1011
|
return true;
|
|
@@ -1189,14 +1013,11 @@ function isExportDefaultDeclaration(node, opts) {
|
|
|
1189
1013
|
return (0, _shallowEqual.default)(node, opts);
|
|
1190
1014
|
}
|
|
1191
1015
|
}
|
|
1192
|
-
|
|
1193
1016
|
return false;
|
|
1194
1017
|
}
|
|
1195
|
-
|
|
1196
1018
|
function isExportNamedDeclaration(node, opts) {
|
|
1197
1019
|
if (!node) return false;
|
|
1198
1020
|
const nodeType = node.type;
|
|
1199
|
-
|
|
1200
1021
|
if (nodeType === "ExportNamedDeclaration") {
|
|
1201
1022
|
if (typeof opts === "undefined") {
|
|
1202
1023
|
return true;
|
|
@@ -1204,14 +1025,11 @@ function isExportNamedDeclaration(node, opts) {
|
|
|
1204
1025
|
return (0, _shallowEqual.default)(node, opts);
|
|
1205
1026
|
}
|
|
1206
1027
|
}
|
|
1207
|
-
|
|
1208
1028
|
return false;
|
|
1209
1029
|
}
|
|
1210
|
-
|
|
1211
1030
|
function isExportSpecifier(node, opts) {
|
|
1212
1031
|
if (!node) return false;
|
|
1213
1032
|
const nodeType = node.type;
|
|
1214
|
-
|
|
1215
1033
|
if (nodeType === "ExportSpecifier") {
|
|
1216
1034
|
if (typeof opts === "undefined") {
|
|
1217
1035
|
return true;
|
|
@@ -1219,14 +1037,11 @@ function isExportSpecifier(node, opts) {
|
|
|
1219
1037
|
return (0, _shallowEqual.default)(node, opts);
|
|
1220
1038
|
}
|
|
1221
1039
|
}
|
|
1222
|
-
|
|
1223
1040
|
return false;
|
|
1224
1041
|
}
|
|
1225
|
-
|
|
1226
1042
|
function isForOfStatement(node, opts) {
|
|
1227
1043
|
if (!node) return false;
|
|
1228
1044
|
const nodeType = node.type;
|
|
1229
|
-
|
|
1230
1045
|
if (nodeType === "ForOfStatement") {
|
|
1231
1046
|
if (typeof opts === "undefined") {
|
|
1232
1047
|
return true;
|
|
@@ -1234,14 +1049,11 @@ function isForOfStatement(node, opts) {
|
|
|
1234
1049
|
return (0, _shallowEqual.default)(node, opts);
|
|
1235
1050
|
}
|
|
1236
1051
|
}
|
|
1237
|
-
|
|
1238
1052
|
return false;
|
|
1239
1053
|
}
|
|
1240
|
-
|
|
1241
1054
|
function isImportDeclaration(node, opts) {
|
|
1242
1055
|
if (!node) return false;
|
|
1243
1056
|
const nodeType = node.type;
|
|
1244
|
-
|
|
1245
1057
|
if (nodeType === "ImportDeclaration") {
|
|
1246
1058
|
if (typeof opts === "undefined") {
|
|
1247
1059
|
return true;
|
|
@@ -1249,14 +1061,11 @@ function isImportDeclaration(node, opts) {
|
|
|
1249
1061
|
return (0, _shallowEqual.default)(node, opts);
|
|
1250
1062
|
}
|
|
1251
1063
|
}
|
|
1252
|
-
|
|
1253
1064
|
return false;
|
|
1254
1065
|
}
|
|
1255
|
-
|
|
1256
1066
|
function isImportDefaultSpecifier(node, opts) {
|
|
1257
1067
|
if (!node) return false;
|
|
1258
1068
|
const nodeType = node.type;
|
|
1259
|
-
|
|
1260
1069
|
if (nodeType === "ImportDefaultSpecifier") {
|
|
1261
1070
|
if (typeof opts === "undefined") {
|
|
1262
1071
|
return true;
|
|
@@ -1264,14 +1073,11 @@ function isImportDefaultSpecifier(node, opts) {
|
|
|
1264
1073
|
return (0, _shallowEqual.default)(node, opts);
|
|
1265
1074
|
}
|
|
1266
1075
|
}
|
|
1267
|
-
|
|
1268
1076
|
return false;
|
|
1269
1077
|
}
|
|
1270
|
-
|
|
1271
1078
|
function isImportNamespaceSpecifier(node, opts) {
|
|
1272
1079
|
if (!node) return false;
|
|
1273
1080
|
const nodeType = node.type;
|
|
1274
|
-
|
|
1275
1081
|
if (nodeType === "ImportNamespaceSpecifier") {
|
|
1276
1082
|
if (typeof opts === "undefined") {
|
|
1277
1083
|
return true;
|
|
@@ -1279,14 +1085,11 @@ function isImportNamespaceSpecifier(node, opts) {
|
|
|
1279
1085
|
return (0, _shallowEqual.default)(node, opts);
|
|
1280
1086
|
}
|
|
1281
1087
|
}
|
|
1282
|
-
|
|
1283
1088
|
return false;
|
|
1284
1089
|
}
|
|
1285
|
-
|
|
1286
1090
|
function isImportSpecifier(node, opts) {
|
|
1287
1091
|
if (!node) return false;
|
|
1288
1092
|
const nodeType = node.type;
|
|
1289
|
-
|
|
1290
1093
|
if (nodeType === "ImportSpecifier") {
|
|
1291
1094
|
if (typeof opts === "undefined") {
|
|
1292
1095
|
return true;
|
|
@@ -1294,14 +1097,11 @@ function isImportSpecifier(node, opts) {
|
|
|
1294
1097
|
return (0, _shallowEqual.default)(node, opts);
|
|
1295
1098
|
}
|
|
1296
1099
|
}
|
|
1297
|
-
|
|
1298
1100
|
return false;
|
|
1299
1101
|
}
|
|
1300
|
-
|
|
1301
1102
|
function isMetaProperty(node, opts) {
|
|
1302
1103
|
if (!node) return false;
|
|
1303
1104
|
const nodeType = node.type;
|
|
1304
|
-
|
|
1305
1105
|
if (nodeType === "MetaProperty") {
|
|
1306
1106
|
if (typeof opts === "undefined") {
|
|
1307
1107
|
return true;
|
|
@@ -1309,14 +1109,11 @@ function isMetaProperty(node, opts) {
|
|
|
1309
1109
|
return (0, _shallowEqual.default)(node, opts);
|
|
1310
1110
|
}
|
|
1311
1111
|
}
|
|
1312
|
-
|
|
1313
1112
|
return false;
|
|
1314
1113
|
}
|
|
1315
|
-
|
|
1316
1114
|
function isClassMethod(node, opts) {
|
|
1317
1115
|
if (!node) return false;
|
|
1318
1116
|
const nodeType = node.type;
|
|
1319
|
-
|
|
1320
1117
|
if (nodeType === "ClassMethod") {
|
|
1321
1118
|
if (typeof opts === "undefined") {
|
|
1322
1119
|
return true;
|
|
@@ -1324,14 +1121,11 @@ function isClassMethod(node, opts) {
|
|
|
1324
1121
|
return (0, _shallowEqual.default)(node, opts);
|
|
1325
1122
|
}
|
|
1326
1123
|
}
|
|
1327
|
-
|
|
1328
1124
|
return false;
|
|
1329
1125
|
}
|
|
1330
|
-
|
|
1331
1126
|
function isObjectPattern(node, opts) {
|
|
1332
1127
|
if (!node) return false;
|
|
1333
1128
|
const nodeType = node.type;
|
|
1334
|
-
|
|
1335
1129
|
if (nodeType === "ObjectPattern") {
|
|
1336
1130
|
if (typeof opts === "undefined") {
|
|
1337
1131
|
return true;
|
|
@@ -1339,14 +1133,11 @@ function isObjectPattern(node, opts) {
|
|
|
1339
1133
|
return (0, _shallowEqual.default)(node, opts);
|
|
1340
1134
|
}
|
|
1341
1135
|
}
|
|
1342
|
-
|
|
1343
1136
|
return false;
|
|
1344
1137
|
}
|
|
1345
|
-
|
|
1346
1138
|
function isSpreadElement(node, opts) {
|
|
1347
1139
|
if (!node) return false;
|
|
1348
1140
|
const nodeType = node.type;
|
|
1349
|
-
|
|
1350
1141
|
if (nodeType === "SpreadElement") {
|
|
1351
1142
|
if (typeof opts === "undefined") {
|
|
1352
1143
|
return true;
|
|
@@ -1354,14 +1145,11 @@ function isSpreadElement(node, opts) {
|
|
|
1354
1145
|
return (0, _shallowEqual.default)(node, opts);
|
|
1355
1146
|
}
|
|
1356
1147
|
}
|
|
1357
|
-
|
|
1358
1148
|
return false;
|
|
1359
1149
|
}
|
|
1360
|
-
|
|
1361
1150
|
function isSuper(node, opts) {
|
|
1362
1151
|
if (!node) return false;
|
|
1363
1152
|
const nodeType = node.type;
|
|
1364
|
-
|
|
1365
1153
|
if (nodeType === "Super") {
|
|
1366
1154
|
if (typeof opts === "undefined") {
|
|
1367
1155
|
return true;
|
|
@@ -1369,14 +1157,11 @@ function isSuper(node, opts) {
|
|
|
1369
1157
|
return (0, _shallowEqual.default)(node, opts);
|
|
1370
1158
|
}
|
|
1371
1159
|
}
|
|
1372
|
-
|
|
1373
1160
|
return false;
|
|
1374
1161
|
}
|
|
1375
|
-
|
|
1376
1162
|
function isTaggedTemplateExpression(node, opts) {
|
|
1377
1163
|
if (!node) return false;
|
|
1378
1164
|
const nodeType = node.type;
|
|
1379
|
-
|
|
1380
1165
|
if (nodeType === "TaggedTemplateExpression") {
|
|
1381
1166
|
if (typeof opts === "undefined") {
|
|
1382
1167
|
return true;
|
|
@@ -1384,14 +1169,11 @@ function isTaggedTemplateExpression(node, opts) {
|
|
|
1384
1169
|
return (0, _shallowEqual.default)(node, opts);
|
|
1385
1170
|
}
|
|
1386
1171
|
}
|
|
1387
|
-
|
|
1388
1172
|
return false;
|
|
1389
1173
|
}
|
|
1390
|
-
|
|
1391
1174
|
function isTemplateElement(node, opts) {
|
|
1392
1175
|
if (!node) return false;
|
|
1393
1176
|
const nodeType = node.type;
|
|
1394
|
-
|
|
1395
1177
|
if (nodeType === "TemplateElement") {
|
|
1396
1178
|
if (typeof opts === "undefined") {
|
|
1397
1179
|
return true;
|
|
@@ -1399,14 +1181,11 @@ function isTemplateElement(node, opts) {
|
|
|
1399
1181
|
return (0, _shallowEqual.default)(node, opts);
|
|
1400
1182
|
}
|
|
1401
1183
|
}
|
|
1402
|
-
|
|
1403
1184
|
return false;
|
|
1404
1185
|
}
|
|
1405
|
-
|
|
1406
1186
|
function isTemplateLiteral(node, opts) {
|
|
1407
1187
|
if (!node) return false;
|
|
1408
1188
|
const nodeType = node.type;
|
|
1409
|
-
|
|
1410
1189
|
if (nodeType === "TemplateLiteral") {
|
|
1411
1190
|
if (typeof opts === "undefined") {
|
|
1412
1191
|
return true;
|
|
@@ -1414,14 +1193,11 @@ function isTemplateLiteral(node, opts) {
|
|
|
1414
1193
|
return (0, _shallowEqual.default)(node, opts);
|
|
1415
1194
|
}
|
|
1416
1195
|
}
|
|
1417
|
-
|
|
1418
1196
|
return false;
|
|
1419
1197
|
}
|
|
1420
|
-
|
|
1421
1198
|
function isYieldExpression(node, opts) {
|
|
1422
1199
|
if (!node) return false;
|
|
1423
1200
|
const nodeType = node.type;
|
|
1424
|
-
|
|
1425
1201
|
if (nodeType === "YieldExpression") {
|
|
1426
1202
|
if (typeof opts === "undefined") {
|
|
1427
1203
|
return true;
|
|
@@ -1429,14 +1205,11 @@ function isYieldExpression(node, opts) {
|
|
|
1429
1205
|
return (0, _shallowEqual.default)(node, opts);
|
|
1430
1206
|
}
|
|
1431
1207
|
}
|
|
1432
|
-
|
|
1433
1208
|
return false;
|
|
1434
1209
|
}
|
|
1435
|
-
|
|
1436
1210
|
function isAwaitExpression(node, opts) {
|
|
1437
1211
|
if (!node) return false;
|
|
1438
1212
|
const nodeType = node.type;
|
|
1439
|
-
|
|
1440
1213
|
if (nodeType === "AwaitExpression") {
|
|
1441
1214
|
if (typeof opts === "undefined") {
|
|
1442
1215
|
return true;
|
|
@@ -1444,14 +1217,11 @@ function isAwaitExpression(node, opts) {
|
|
|
1444
1217
|
return (0, _shallowEqual.default)(node, opts);
|
|
1445
1218
|
}
|
|
1446
1219
|
}
|
|
1447
|
-
|
|
1448
1220
|
return false;
|
|
1449
1221
|
}
|
|
1450
|
-
|
|
1451
1222
|
function isImport(node, opts) {
|
|
1452
1223
|
if (!node) return false;
|
|
1453
1224
|
const nodeType = node.type;
|
|
1454
|
-
|
|
1455
1225
|
if (nodeType === "Import") {
|
|
1456
1226
|
if (typeof opts === "undefined") {
|
|
1457
1227
|
return true;
|
|
@@ -1459,14 +1229,11 @@ function isImport(node, opts) {
|
|
|
1459
1229
|
return (0, _shallowEqual.default)(node, opts);
|
|
1460
1230
|
}
|
|
1461
1231
|
}
|
|
1462
|
-
|
|
1463
1232
|
return false;
|
|
1464
1233
|
}
|
|
1465
|
-
|
|
1466
1234
|
function isBigIntLiteral(node, opts) {
|
|
1467
1235
|
if (!node) return false;
|
|
1468
1236
|
const nodeType = node.type;
|
|
1469
|
-
|
|
1470
1237
|
if (nodeType === "BigIntLiteral") {
|
|
1471
1238
|
if (typeof opts === "undefined") {
|
|
1472
1239
|
return true;
|
|
@@ -1474,14 +1241,11 @@ function isBigIntLiteral(node, opts) {
|
|
|
1474
1241
|
return (0, _shallowEqual.default)(node, opts);
|
|
1475
1242
|
}
|
|
1476
1243
|
}
|
|
1477
|
-
|
|
1478
1244
|
return false;
|
|
1479
1245
|
}
|
|
1480
|
-
|
|
1481
1246
|
function isExportNamespaceSpecifier(node, opts) {
|
|
1482
1247
|
if (!node) return false;
|
|
1483
1248
|
const nodeType = node.type;
|
|
1484
|
-
|
|
1485
1249
|
if (nodeType === "ExportNamespaceSpecifier") {
|
|
1486
1250
|
if (typeof opts === "undefined") {
|
|
1487
1251
|
return true;
|
|
@@ -1489,14 +1253,11 @@ function isExportNamespaceSpecifier(node, opts) {
|
|
|
1489
1253
|
return (0, _shallowEqual.default)(node, opts);
|
|
1490
1254
|
}
|
|
1491
1255
|
}
|
|
1492
|
-
|
|
1493
1256
|
return false;
|
|
1494
1257
|
}
|
|
1495
|
-
|
|
1496
1258
|
function isOptionalMemberExpression(node, opts) {
|
|
1497
1259
|
if (!node) return false;
|
|
1498
1260
|
const nodeType = node.type;
|
|
1499
|
-
|
|
1500
1261
|
if (nodeType === "OptionalMemberExpression") {
|
|
1501
1262
|
if (typeof opts === "undefined") {
|
|
1502
1263
|
return true;
|
|
@@ -1504,14 +1265,11 @@ function isOptionalMemberExpression(node, opts) {
|
|
|
1504
1265
|
return (0, _shallowEqual.default)(node, opts);
|
|
1505
1266
|
}
|
|
1506
1267
|
}
|
|
1507
|
-
|
|
1508
1268
|
return false;
|
|
1509
1269
|
}
|
|
1510
|
-
|
|
1511
1270
|
function isOptionalCallExpression(node, opts) {
|
|
1512
1271
|
if (!node) return false;
|
|
1513
1272
|
const nodeType = node.type;
|
|
1514
|
-
|
|
1515
1273
|
if (nodeType === "OptionalCallExpression") {
|
|
1516
1274
|
if (typeof opts === "undefined") {
|
|
1517
1275
|
return true;
|
|
@@ -1519,14 +1277,11 @@ function isOptionalCallExpression(node, opts) {
|
|
|
1519
1277
|
return (0, _shallowEqual.default)(node, opts);
|
|
1520
1278
|
}
|
|
1521
1279
|
}
|
|
1522
|
-
|
|
1523
1280
|
return false;
|
|
1524
1281
|
}
|
|
1525
|
-
|
|
1526
1282
|
function isClassProperty(node, opts) {
|
|
1527
1283
|
if (!node) return false;
|
|
1528
1284
|
const nodeType = node.type;
|
|
1529
|
-
|
|
1530
1285
|
if (nodeType === "ClassProperty") {
|
|
1531
1286
|
if (typeof opts === "undefined") {
|
|
1532
1287
|
return true;
|
|
@@ -1534,14 +1289,11 @@ function isClassProperty(node, opts) {
|
|
|
1534
1289
|
return (0, _shallowEqual.default)(node, opts);
|
|
1535
1290
|
}
|
|
1536
1291
|
}
|
|
1537
|
-
|
|
1538
1292
|
return false;
|
|
1539
1293
|
}
|
|
1540
|
-
|
|
1541
1294
|
function isClassAccessorProperty(node, opts) {
|
|
1542
1295
|
if (!node) return false;
|
|
1543
1296
|
const nodeType = node.type;
|
|
1544
|
-
|
|
1545
1297
|
if (nodeType === "ClassAccessorProperty") {
|
|
1546
1298
|
if (typeof opts === "undefined") {
|
|
1547
1299
|
return true;
|
|
@@ -1549,14 +1301,11 @@ function isClassAccessorProperty(node, opts) {
|
|
|
1549
1301
|
return (0, _shallowEqual.default)(node, opts);
|
|
1550
1302
|
}
|
|
1551
1303
|
}
|
|
1552
|
-
|
|
1553
1304
|
return false;
|
|
1554
1305
|
}
|
|
1555
|
-
|
|
1556
1306
|
function isClassPrivateProperty(node, opts) {
|
|
1557
1307
|
if (!node) return false;
|
|
1558
1308
|
const nodeType = node.type;
|
|
1559
|
-
|
|
1560
1309
|
if (nodeType === "ClassPrivateProperty") {
|
|
1561
1310
|
if (typeof opts === "undefined") {
|
|
1562
1311
|
return true;
|
|
@@ -1564,14 +1313,11 @@ function isClassPrivateProperty(node, opts) {
|
|
|
1564
1313
|
return (0, _shallowEqual.default)(node, opts);
|
|
1565
1314
|
}
|
|
1566
1315
|
}
|
|
1567
|
-
|
|
1568
1316
|
return false;
|
|
1569
1317
|
}
|
|
1570
|
-
|
|
1571
1318
|
function isClassPrivateMethod(node, opts) {
|
|
1572
1319
|
if (!node) return false;
|
|
1573
1320
|
const nodeType = node.type;
|
|
1574
|
-
|
|
1575
1321
|
if (nodeType === "ClassPrivateMethod") {
|
|
1576
1322
|
if (typeof opts === "undefined") {
|
|
1577
1323
|
return true;
|
|
@@ -1579,14 +1325,11 @@ function isClassPrivateMethod(node, opts) {
|
|
|
1579
1325
|
return (0, _shallowEqual.default)(node, opts);
|
|
1580
1326
|
}
|
|
1581
1327
|
}
|
|
1582
|
-
|
|
1583
1328
|
return false;
|
|
1584
1329
|
}
|
|
1585
|
-
|
|
1586
1330
|
function isPrivateName(node, opts) {
|
|
1587
1331
|
if (!node) return false;
|
|
1588
1332
|
const nodeType = node.type;
|
|
1589
|
-
|
|
1590
1333
|
if (nodeType === "PrivateName") {
|
|
1591
1334
|
if (typeof opts === "undefined") {
|
|
1592
1335
|
return true;
|
|
@@ -1594,14 +1337,11 @@ function isPrivateName(node, opts) {
|
|
|
1594
1337
|
return (0, _shallowEqual.default)(node, opts);
|
|
1595
1338
|
}
|
|
1596
1339
|
}
|
|
1597
|
-
|
|
1598
1340
|
return false;
|
|
1599
1341
|
}
|
|
1600
|
-
|
|
1601
1342
|
function isStaticBlock(node, opts) {
|
|
1602
1343
|
if (!node) return false;
|
|
1603
1344
|
const nodeType = node.type;
|
|
1604
|
-
|
|
1605
1345
|
if (nodeType === "StaticBlock") {
|
|
1606
1346
|
if (typeof opts === "undefined") {
|
|
1607
1347
|
return true;
|
|
@@ -1609,14 +1349,11 @@ function isStaticBlock(node, opts) {
|
|
|
1609
1349
|
return (0, _shallowEqual.default)(node, opts);
|
|
1610
1350
|
}
|
|
1611
1351
|
}
|
|
1612
|
-
|
|
1613
1352
|
return false;
|
|
1614
1353
|
}
|
|
1615
|
-
|
|
1616
1354
|
function isAnyTypeAnnotation(node, opts) {
|
|
1617
1355
|
if (!node) return false;
|
|
1618
1356
|
const nodeType = node.type;
|
|
1619
|
-
|
|
1620
1357
|
if (nodeType === "AnyTypeAnnotation") {
|
|
1621
1358
|
if (typeof opts === "undefined") {
|
|
1622
1359
|
return true;
|
|
@@ -1624,14 +1361,11 @@ function isAnyTypeAnnotation(node, opts) {
|
|
|
1624
1361
|
return (0, _shallowEqual.default)(node, opts);
|
|
1625
1362
|
}
|
|
1626
1363
|
}
|
|
1627
|
-
|
|
1628
1364
|
return false;
|
|
1629
1365
|
}
|
|
1630
|
-
|
|
1631
1366
|
function isArrayTypeAnnotation(node, opts) {
|
|
1632
1367
|
if (!node) return false;
|
|
1633
1368
|
const nodeType = node.type;
|
|
1634
|
-
|
|
1635
1369
|
if (nodeType === "ArrayTypeAnnotation") {
|
|
1636
1370
|
if (typeof opts === "undefined") {
|
|
1637
1371
|
return true;
|
|
@@ -1639,14 +1373,11 @@ function isArrayTypeAnnotation(node, opts) {
|
|
|
1639
1373
|
return (0, _shallowEqual.default)(node, opts);
|
|
1640
1374
|
}
|
|
1641
1375
|
}
|
|
1642
|
-
|
|
1643
1376
|
return false;
|
|
1644
1377
|
}
|
|
1645
|
-
|
|
1646
1378
|
function isBooleanTypeAnnotation(node, opts) {
|
|
1647
1379
|
if (!node) return false;
|
|
1648
1380
|
const nodeType = node.type;
|
|
1649
|
-
|
|
1650
1381
|
if (nodeType === "BooleanTypeAnnotation") {
|
|
1651
1382
|
if (typeof opts === "undefined") {
|
|
1652
1383
|
return true;
|
|
@@ -1654,14 +1385,11 @@ function isBooleanTypeAnnotation(node, opts) {
|
|
|
1654
1385
|
return (0, _shallowEqual.default)(node, opts);
|
|
1655
1386
|
}
|
|
1656
1387
|
}
|
|
1657
|
-
|
|
1658
1388
|
return false;
|
|
1659
1389
|
}
|
|
1660
|
-
|
|
1661
1390
|
function isBooleanLiteralTypeAnnotation(node, opts) {
|
|
1662
1391
|
if (!node) return false;
|
|
1663
1392
|
const nodeType = node.type;
|
|
1664
|
-
|
|
1665
1393
|
if (nodeType === "BooleanLiteralTypeAnnotation") {
|
|
1666
1394
|
if (typeof opts === "undefined") {
|
|
1667
1395
|
return true;
|
|
@@ -1669,14 +1397,11 @@ function isBooleanLiteralTypeAnnotation(node, opts) {
|
|
|
1669
1397
|
return (0, _shallowEqual.default)(node, opts);
|
|
1670
1398
|
}
|
|
1671
1399
|
}
|
|
1672
|
-
|
|
1673
1400
|
return false;
|
|
1674
1401
|
}
|
|
1675
|
-
|
|
1676
1402
|
function isNullLiteralTypeAnnotation(node, opts) {
|
|
1677
1403
|
if (!node) return false;
|
|
1678
1404
|
const nodeType = node.type;
|
|
1679
|
-
|
|
1680
1405
|
if (nodeType === "NullLiteralTypeAnnotation") {
|
|
1681
1406
|
if (typeof opts === "undefined") {
|
|
1682
1407
|
return true;
|
|
@@ -1684,14 +1409,11 @@ function isNullLiteralTypeAnnotation(node, opts) {
|
|
|
1684
1409
|
return (0, _shallowEqual.default)(node, opts);
|
|
1685
1410
|
}
|
|
1686
1411
|
}
|
|
1687
|
-
|
|
1688
1412
|
return false;
|
|
1689
1413
|
}
|
|
1690
|
-
|
|
1691
1414
|
function isClassImplements(node, opts) {
|
|
1692
1415
|
if (!node) return false;
|
|
1693
1416
|
const nodeType = node.type;
|
|
1694
|
-
|
|
1695
1417
|
if (nodeType === "ClassImplements") {
|
|
1696
1418
|
if (typeof opts === "undefined") {
|
|
1697
1419
|
return true;
|
|
@@ -1699,14 +1421,11 @@ function isClassImplements(node, opts) {
|
|
|
1699
1421
|
return (0, _shallowEqual.default)(node, opts);
|
|
1700
1422
|
}
|
|
1701
1423
|
}
|
|
1702
|
-
|
|
1703
1424
|
return false;
|
|
1704
1425
|
}
|
|
1705
|
-
|
|
1706
1426
|
function isDeclareClass(node, opts) {
|
|
1707
1427
|
if (!node) return false;
|
|
1708
1428
|
const nodeType = node.type;
|
|
1709
|
-
|
|
1710
1429
|
if (nodeType === "DeclareClass") {
|
|
1711
1430
|
if (typeof opts === "undefined") {
|
|
1712
1431
|
return true;
|
|
@@ -1714,14 +1433,11 @@ function isDeclareClass(node, opts) {
|
|
|
1714
1433
|
return (0, _shallowEqual.default)(node, opts);
|
|
1715
1434
|
}
|
|
1716
1435
|
}
|
|
1717
|
-
|
|
1718
1436
|
return false;
|
|
1719
1437
|
}
|
|
1720
|
-
|
|
1721
1438
|
function isDeclareFunction(node, opts) {
|
|
1722
1439
|
if (!node) return false;
|
|
1723
1440
|
const nodeType = node.type;
|
|
1724
|
-
|
|
1725
1441
|
if (nodeType === "DeclareFunction") {
|
|
1726
1442
|
if (typeof opts === "undefined") {
|
|
1727
1443
|
return true;
|
|
@@ -1729,14 +1445,11 @@ function isDeclareFunction(node, opts) {
|
|
|
1729
1445
|
return (0, _shallowEqual.default)(node, opts);
|
|
1730
1446
|
}
|
|
1731
1447
|
}
|
|
1732
|
-
|
|
1733
1448
|
return false;
|
|
1734
1449
|
}
|
|
1735
|
-
|
|
1736
1450
|
function isDeclareInterface(node, opts) {
|
|
1737
1451
|
if (!node) return false;
|
|
1738
1452
|
const nodeType = node.type;
|
|
1739
|
-
|
|
1740
1453
|
if (nodeType === "DeclareInterface") {
|
|
1741
1454
|
if (typeof opts === "undefined") {
|
|
1742
1455
|
return true;
|
|
@@ -1744,14 +1457,11 @@ function isDeclareInterface(node, opts) {
|
|
|
1744
1457
|
return (0, _shallowEqual.default)(node, opts);
|
|
1745
1458
|
}
|
|
1746
1459
|
}
|
|
1747
|
-
|
|
1748
1460
|
return false;
|
|
1749
1461
|
}
|
|
1750
|
-
|
|
1751
1462
|
function isDeclareModule(node, opts) {
|
|
1752
1463
|
if (!node) return false;
|
|
1753
1464
|
const nodeType = node.type;
|
|
1754
|
-
|
|
1755
1465
|
if (nodeType === "DeclareModule") {
|
|
1756
1466
|
if (typeof opts === "undefined") {
|
|
1757
1467
|
return true;
|
|
@@ -1759,14 +1469,11 @@ function isDeclareModule(node, opts) {
|
|
|
1759
1469
|
return (0, _shallowEqual.default)(node, opts);
|
|
1760
1470
|
}
|
|
1761
1471
|
}
|
|
1762
|
-
|
|
1763
1472
|
return false;
|
|
1764
1473
|
}
|
|
1765
|
-
|
|
1766
1474
|
function isDeclareModuleExports(node, opts) {
|
|
1767
1475
|
if (!node) return false;
|
|
1768
1476
|
const nodeType = node.type;
|
|
1769
|
-
|
|
1770
1477
|
if (nodeType === "DeclareModuleExports") {
|
|
1771
1478
|
if (typeof opts === "undefined") {
|
|
1772
1479
|
return true;
|
|
@@ -1774,14 +1481,11 @@ function isDeclareModuleExports(node, opts) {
|
|
|
1774
1481
|
return (0, _shallowEqual.default)(node, opts);
|
|
1775
1482
|
}
|
|
1776
1483
|
}
|
|
1777
|
-
|
|
1778
1484
|
return false;
|
|
1779
1485
|
}
|
|
1780
|
-
|
|
1781
1486
|
function isDeclareTypeAlias(node, opts) {
|
|
1782
1487
|
if (!node) return false;
|
|
1783
1488
|
const nodeType = node.type;
|
|
1784
|
-
|
|
1785
1489
|
if (nodeType === "DeclareTypeAlias") {
|
|
1786
1490
|
if (typeof opts === "undefined") {
|
|
1787
1491
|
return true;
|
|
@@ -1789,14 +1493,11 @@ function isDeclareTypeAlias(node, opts) {
|
|
|
1789
1493
|
return (0, _shallowEqual.default)(node, opts);
|
|
1790
1494
|
}
|
|
1791
1495
|
}
|
|
1792
|
-
|
|
1793
1496
|
return false;
|
|
1794
1497
|
}
|
|
1795
|
-
|
|
1796
1498
|
function isDeclareOpaqueType(node, opts) {
|
|
1797
1499
|
if (!node) return false;
|
|
1798
1500
|
const nodeType = node.type;
|
|
1799
|
-
|
|
1800
1501
|
if (nodeType === "DeclareOpaqueType") {
|
|
1801
1502
|
if (typeof opts === "undefined") {
|
|
1802
1503
|
return true;
|
|
@@ -1804,14 +1505,11 @@ function isDeclareOpaqueType(node, opts) {
|
|
|
1804
1505
|
return (0, _shallowEqual.default)(node, opts);
|
|
1805
1506
|
}
|
|
1806
1507
|
}
|
|
1807
|
-
|
|
1808
1508
|
return false;
|
|
1809
1509
|
}
|
|
1810
|
-
|
|
1811
1510
|
function isDeclareVariable(node, opts) {
|
|
1812
1511
|
if (!node) return false;
|
|
1813
1512
|
const nodeType = node.type;
|
|
1814
|
-
|
|
1815
1513
|
if (nodeType === "DeclareVariable") {
|
|
1816
1514
|
if (typeof opts === "undefined") {
|
|
1817
1515
|
return true;
|
|
@@ -1819,14 +1517,11 @@ function isDeclareVariable(node, opts) {
|
|
|
1819
1517
|
return (0, _shallowEqual.default)(node, opts);
|
|
1820
1518
|
}
|
|
1821
1519
|
}
|
|
1822
|
-
|
|
1823
1520
|
return false;
|
|
1824
1521
|
}
|
|
1825
|
-
|
|
1826
1522
|
function isDeclareExportDeclaration(node, opts) {
|
|
1827
1523
|
if (!node) return false;
|
|
1828
1524
|
const nodeType = node.type;
|
|
1829
|
-
|
|
1830
1525
|
if (nodeType === "DeclareExportDeclaration") {
|
|
1831
1526
|
if (typeof opts === "undefined") {
|
|
1832
1527
|
return true;
|
|
@@ -1834,14 +1529,11 @@ function isDeclareExportDeclaration(node, opts) {
|
|
|
1834
1529
|
return (0, _shallowEqual.default)(node, opts);
|
|
1835
1530
|
}
|
|
1836
1531
|
}
|
|
1837
|
-
|
|
1838
1532
|
return false;
|
|
1839
1533
|
}
|
|
1840
|
-
|
|
1841
1534
|
function isDeclareExportAllDeclaration(node, opts) {
|
|
1842
1535
|
if (!node) return false;
|
|
1843
1536
|
const nodeType = node.type;
|
|
1844
|
-
|
|
1845
1537
|
if (nodeType === "DeclareExportAllDeclaration") {
|
|
1846
1538
|
if (typeof opts === "undefined") {
|
|
1847
1539
|
return true;
|
|
@@ -1849,14 +1541,11 @@ function isDeclareExportAllDeclaration(node, opts) {
|
|
|
1849
1541
|
return (0, _shallowEqual.default)(node, opts);
|
|
1850
1542
|
}
|
|
1851
1543
|
}
|
|
1852
|
-
|
|
1853
1544
|
return false;
|
|
1854
1545
|
}
|
|
1855
|
-
|
|
1856
1546
|
function isDeclaredPredicate(node, opts) {
|
|
1857
1547
|
if (!node) return false;
|
|
1858
1548
|
const nodeType = node.type;
|
|
1859
|
-
|
|
1860
1549
|
if (nodeType === "DeclaredPredicate") {
|
|
1861
1550
|
if (typeof opts === "undefined") {
|
|
1862
1551
|
return true;
|
|
@@ -1864,14 +1553,11 @@ function isDeclaredPredicate(node, opts) {
|
|
|
1864
1553
|
return (0, _shallowEqual.default)(node, opts);
|
|
1865
1554
|
}
|
|
1866
1555
|
}
|
|
1867
|
-
|
|
1868
1556
|
return false;
|
|
1869
1557
|
}
|
|
1870
|
-
|
|
1871
1558
|
function isExistsTypeAnnotation(node, opts) {
|
|
1872
1559
|
if (!node) return false;
|
|
1873
1560
|
const nodeType = node.type;
|
|
1874
|
-
|
|
1875
1561
|
if (nodeType === "ExistsTypeAnnotation") {
|
|
1876
1562
|
if (typeof opts === "undefined") {
|
|
1877
1563
|
return true;
|
|
@@ -1879,14 +1565,11 @@ function isExistsTypeAnnotation(node, opts) {
|
|
|
1879
1565
|
return (0, _shallowEqual.default)(node, opts);
|
|
1880
1566
|
}
|
|
1881
1567
|
}
|
|
1882
|
-
|
|
1883
1568
|
return false;
|
|
1884
1569
|
}
|
|
1885
|
-
|
|
1886
1570
|
function isFunctionTypeAnnotation(node, opts) {
|
|
1887
1571
|
if (!node) return false;
|
|
1888
1572
|
const nodeType = node.type;
|
|
1889
|
-
|
|
1890
1573
|
if (nodeType === "FunctionTypeAnnotation") {
|
|
1891
1574
|
if (typeof opts === "undefined") {
|
|
1892
1575
|
return true;
|
|
@@ -1894,14 +1577,11 @@ function isFunctionTypeAnnotation(node, opts) {
|
|
|
1894
1577
|
return (0, _shallowEqual.default)(node, opts);
|
|
1895
1578
|
}
|
|
1896
1579
|
}
|
|
1897
|
-
|
|
1898
1580
|
return false;
|
|
1899
1581
|
}
|
|
1900
|
-
|
|
1901
1582
|
function isFunctionTypeParam(node, opts) {
|
|
1902
1583
|
if (!node) return false;
|
|
1903
1584
|
const nodeType = node.type;
|
|
1904
|
-
|
|
1905
1585
|
if (nodeType === "FunctionTypeParam") {
|
|
1906
1586
|
if (typeof opts === "undefined") {
|
|
1907
1587
|
return true;
|
|
@@ -1909,14 +1589,11 @@ function isFunctionTypeParam(node, opts) {
|
|
|
1909
1589
|
return (0, _shallowEqual.default)(node, opts);
|
|
1910
1590
|
}
|
|
1911
1591
|
}
|
|
1912
|
-
|
|
1913
1592
|
return false;
|
|
1914
1593
|
}
|
|
1915
|
-
|
|
1916
1594
|
function isGenericTypeAnnotation(node, opts) {
|
|
1917
1595
|
if (!node) return false;
|
|
1918
1596
|
const nodeType = node.type;
|
|
1919
|
-
|
|
1920
1597
|
if (nodeType === "GenericTypeAnnotation") {
|
|
1921
1598
|
if (typeof opts === "undefined") {
|
|
1922
1599
|
return true;
|
|
@@ -1924,14 +1601,11 @@ function isGenericTypeAnnotation(node, opts) {
|
|
|
1924
1601
|
return (0, _shallowEqual.default)(node, opts);
|
|
1925
1602
|
}
|
|
1926
1603
|
}
|
|
1927
|
-
|
|
1928
1604
|
return false;
|
|
1929
1605
|
}
|
|
1930
|
-
|
|
1931
1606
|
function isInferredPredicate(node, opts) {
|
|
1932
1607
|
if (!node) return false;
|
|
1933
1608
|
const nodeType = node.type;
|
|
1934
|
-
|
|
1935
1609
|
if (nodeType === "InferredPredicate") {
|
|
1936
1610
|
if (typeof opts === "undefined") {
|
|
1937
1611
|
return true;
|
|
@@ -1939,14 +1613,11 @@ function isInferredPredicate(node, opts) {
|
|
|
1939
1613
|
return (0, _shallowEqual.default)(node, opts);
|
|
1940
1614
|
}
|
|
1941
1615
|
}
|
|
1942
|
-
|
|
1943
1616
|
return false;
|
|
1944
1617
|
}
|
|
1945
|
-
|
|
1946
1618
|
function isInterfaceExtends(node, opts) {
|
|
1947
1619
|
if (!node) return false;
|
|
1948
1620
|
const nodeType = node.type;
|
|
1949
|
-
|
|
1950
1621
|
if (nodeType === "InterfaceExtends") {
|
|
1951
1622
|
if (typeof opts === "undefined") {
|
|
1952
1623
|
return true;
|
|
@@ -1954,14 +1625,11 @@ function isInterfaceExtends(node, opts) {
|
|
|
1954
1625
|
return (0, _shallowEqual.default)(node, opts);
|
|
1955
1626
|
}
|
|
1956
1627
|
}
|
|
1957
|
-
|
|
1958
1628
|
return false;
|
|
1959
1629
|
}
|
|
1960
|
-
|
|
1961
1630
|
function isInterfaceDeclaration(node, opts) {
|
|
1962
1631
|
if (!node) return false;
|
|
1963
1632
|
const nodeType = node.type;
|
|
1964
|
-
|
|
1965
1633
|
if (nodeType === "InterfaceDeclaration") {
|
|
1966
1634
|
if (typeof opts === "undefined") {
|
|
1967
1635
|
return true;
|
|
@@ -1969,14 +1637,11 @@ function isInterfaceDeclaration(node, opts) {
|
|
|
1969
1637
|
return (0, _shallowEqual.default)(node, opts);
|
|
1970
1638
|
}
|
|
1971
1639
|
}
|
|
1972
|
-
|
|
1973
1640
|
return false;
|
|
1974
1641
|
}
|
|
1975
|
-
|
|
1976
1642
|
function isInterfaceTypeAnnotation(node, opts) {
|
|
1977
1643
|
if (!node) return false;
|
|
1978
1644
|
const nodeType = node.type;
|
|
1979
|
-
|
|
1980
1645
|
if (nodeType === "InterfaceTypeAnnotation") {
|
|
1981
1646
|
if (typeof opts === "undefined") {
|
|
1982
1647
|
return true;
|
|
@@ -1984,14 +1649,11 @@ function isInterfaceTypeAnnotation(node, opts) {
|
|
|
1984
1649
|
return (0, _shallowEqual.default)(node, opts);
|
|
1985
1650
|
}
|
|
1986
1651
|
}
|
|
1987
|
-
|
|
1988
1652
|
return false;
|
|
1989
1653
|
}
|
|
1990
|
-
|
|
1991
1654
|
function isIntersectionTypeAnnotation(node, opts) {
|
|
1992
1655
|
if (!node) return false;
|
|
1993
1656
|
const nodeType = node.type;
|
|
1994
|
-
|
|
1995
1657
|
if (nodeType === "IntersectionTypeAnnotation") {
|
|
1996
1658
|
if (typeof opts === "undefined") {
|
|
1997
1659
|
return true;
|
|
@@ -1999,14 +1661,11 @@ function isIntersectionTypeAnnotation(node, opts) {
|
|
|
1999
1661
|
return (0, _shallowEqual.default)(node, opts);
|
|
2000
1662
|
}
|
|
2001
1663
|
}
|
|
2002
|
-
|
|
2003
1664
|
return false;
|
|
2004
1665
|
}
|
|
2005
|
-
|
|
2006
1666
|
function isMixedTypeAnnotation(node, opts) {
|
|
2007
1667
|
if (!node) return false;
|
|
2008
1668
|
const nodeType = node.type;
|
|
2009
|
-
|
|
2010
1669
|
if (nodeType === "MixedTypeAnnotation") {
|
|
2011
1670
|
if (typeof opts === "undefined") {
|
|
2012
1671
|
return true;
|
|
@@ -2014,14 +1673,11 @@ function isMixedTypeAnnotation(node, opts) {
|
|
|
2014
1673
|
return (0, _shallowEqual.default)(node, opts);
|
|
2015
1674
|
}
|
|
2016
1675
|
}
|
|
2017
|
-
|
|
2018
1676
|
return false;
|
|
2019
1677
|
}
|
|
2020
|
-
|
|
2021
1678
|
function isEmptyTypeAnnotation(node, opts) {
|
|
2022
1679
|
if (!node) return false;
|
|
2023
1680
|
const nodeType = node.type;
|
|
2024
|
-
|
|
2025
1681
|
if (nodeType === "EmptyTypeAnnotation") {
|
|
2026
1682
|
if (typeof opts === "undefined") {
|
|
2027
1683
|
return true;
|
|
@@ -2029,14 +1685,11 @@ function isEmptyTypeAnnotation(node, opts) {
|
|
|
2029
1685
|
return (0, _shallowEqual.default)(node, opts);
|
|
2030
1686
|
}
|
|
2031
1687
|
}
|
|
2032
|
-
|
|
2033
1688
|
return false;
|
|
2034
1689
|
}
|
|
2035
|
-
|
|
2036
1690
|
function isNullableTypeAnnotation(node, opts) {
|
|
2037
1691
|
if (!node) return false;
|
|
2038
1692
|
const nodeType = node.type;
|
|
2039
|
-
|
|
2040
1693
|
if (nodeType === "NullableTypeAnnotation") {
|
|
2041
1694
|
if (typeof opts === "undefined") {
|
|
2042
1695
|
return true;
|
|
@@ -2044,14 +1697,11 @@ function isNullableTypeAnnotation(node, opts) {
|
|
|
2044
1697
|
return (0, _shallowEqual.default)(node, opts);
|
|
2045
1698
|
}
|
|
2046
1699
|
}
|
|
2047
|
-
|
|
2048
1700
|
return false;
|
|
2049
1701
|
}
|
|
2050
|
-
|
|
2051
1702
|
function isNumberLiteralTypeAnnotation(node, opts) {
|
|
2052
1703
|
if (!node) return false;
|
|
2053
1704
|
const nodeType = node.type;
|
|
2054
|
-
|
|
2055
1705
|
if (nodeType === "NumberLiteralTypeAnnotation") {
|
|
2056
1706
|
if (typeof opts === "undefined") {
|
|
2057
1707
|
return true;
|
|
@@ -2059,14 +1709,11 @@ function isNumberLiteralTypeAnnotation(node, opts) {
|
|
|
2059
1709
|
return (0, _shallowEqual.default)(node, opts);
|
|
2060
1710
|
}
|
|
2061
1711
|
}
|
|
2062
|
-
|
|
2063
1712
|
return false;
|
|
2064
1713
|
}
|
|
2065
|
-
|
|
2066
1714
|
function isNumberTypeAnnotation(node, opts) {
|
|
2067
1715
|
if (!node) return false;
|
|
2068
1716
|
const nodeType = node.type;
|
|
2069
|
-
|
|
2070
1717
|
if (nodeType === "NumberTypeAnnotation") {
|
|
2071
1718
|
if (typeof opts === "undefined") {
|
|
2072
1719
|
return true;
|
|
@@ -2074,14 +1721,11 @@ function isNumberTypeAnnotation(node, opts) {
|
|
|
2074
1721
|
return (0, _shallowEqual.default)(node, opts);
|
|
2075
1722
|
}
|
|
2076
1723
|
}
|
|
2077
|
-
|
|
2078
1724
|
return false;
|
|
2079
1725
|
}
|
|
2080
|
-
|
|
2081
1726
|
function isObjectTypeAnnotation(node, opts) {
|
|
2082
1727
|
if (!node) return false;
|
|
2083
1728
|
const nodeType = node.type;
|
|
2084
|
-
|
|
2085
1729
|
if (nodeType === "ObjectTypeAnnotation") {
|
|
2086
1730
|
if (typeof opts === "undefined") {
|
|
2087
1731
|
return true;
|
|
@@ -2089,14 +1733,11 @@ function isObjectTypeAnnotation(node, opts) {
|
|
|
2089
1733
|
return (0, _shallowEqual.default)(node, opts);
|
|
2090
1734
|
}
|
|
2091
1735
|
}
|
|
2092
|
-
|
|
2093
1736
|
return false;
|
|
2094
1737
|
}
|
|
2095
|
-
|
|
2096
1738
|
function isObjectTypeInternalSlot(node, opts) {
|
|
2097
1739
|
if (!node) return false;
|
|
2098
1740
|
const nodeType = node.type;
|
|
2099
|
-
|
|
2100
1741
|
if (nodeType === "ObjectTypeInternalSlot") {
|
|
2101
1742
|
if (typeof opts === "undefined") {
|
|
2102
1743
|
return true;
|
|
@@ -2104,14 +1745,11 @@ function isObjectTypeInternalSlot(node, opts) {
|
|
|
2104
1745
|
return (0, _shallowEqual.default)(node, opts);
|
|
2105
1746
|
}
|
|
2106
1747
|
}
|
|
2107
|
-
|
|
2108
1748
|
return false;
|
|
2109
1749
|
}
|
|
2110
|
-
|
|
2111
1750
|
function isObjectTypeCallProperty(node, opts) {
|
|
2112
1751
|
if (!node) return false;
|
|
2113
1752
|
const nodeType = node.type;
|
|
2114
|
-
|
|
2115
1753
|
if (nodeType === "ObjectTypeCallProperty") {
|
|
2116
1754
|
if (typeof opts === "undefined") {
|
|
2117
1755
|
return true;
|
|
@@ -2119,14 +1757,11 @@ function isObjectTypeCallProperty(node, opts) {
|
|
|
2119
1757
|
return (0, _shallowEqual.default)(node, opts);
|
|
2120
1758
|
}
|
|
2121
1759
|
}
|
|
2122
|
-
|
|
2123
1760
|
return false;
|
|
2124
1761
|
}
|
|
2125
|
-
|
|
2126
1762
|
function isObjectTypeIndexer(node, opts) {
|
|
2127
1763
|
if (!node) return false;
|
|
2128
1764
|
const nodeType = node.type;
|
|
2129
|
-
|
|
2130
1765
|
if (nodeType === "ObjectTypeIndexer") {
|
|
2131
1766
|
if (typeof opts === "undefined") {
|
|
2132
1767
|
return true;
|
|
@@ -2134,14 +1769,11 @@ function isObjectTypeIndexer(node, opts) {
|
|
|
2134
1769
|
return (0, _shallowEqual.default)(node, opts);
|
|
2135
1770
|
}
|
|
2136
1771
|
}
|
|
2137
|
-
|
|
2138
1772
|
return false;
|
|
2139
1773
|
}
|
|
2140
|
-
|
|
2141
1774
|
function isObjectTypeProperty(node, opts) {
|
|
2142
1775
|
if (!node) return false;
|
|
2143
1776
|
const nodeType = node.type;
|
|
2144
|
-
|
|
2145
1777
|
if (nodeType === "ObjectTypeProperty") {
|
|
2146
1778
|
if (typeof opts === "undefined") {
|
|
2147
1779
|
return true;
|
|
@@ -2149,14 +1781,11 @@ function isObjectTypeProperty(node, opts) {
|
|
|
2149
1781
|
return (0, _shallowEqual.default)(node, opts);
|
|
2150
1782
|
}
|
|
2151
1783
|
}
|
|
2152
|
-
|
|
2153
1784
|
return false;
|
|
2154
1785
|
}
|
|
2155
|
-
|
|
2156
1786
|
function isObjectTypeSpreadProperty(node, opts) {
|
|
2157
1787
|
if (!node) return false;
|
|
2158
1788
|
const nodeType = node.type;
|
|
2159
|
-
|
|
2160
1789
|
if (nodeType === "ObjectTypeSpreadProperty") {
|
|
2161
1790
|
if (typeof opts === "undefined") {
|
|
2162
1791
|
return true;
|
|
@@ -2164,14 +1793,11 @@ function isObjectTypeSpreadProperty(node, opts) {
|
|
|
2164
1793
|
return (0, _shallowEqual.default)(node, opts);
|
|
2165
1794
|
}
|
|
2166
1795
|
}
|
|
2167
|
-
|
|
2168
1796
|
return false;
|
|
2169
1797
|
}
|
|
2170
|
-
|
|
2171
1798
|
function isOpaqueType(node, opts) {
|
|
2172
1799
|
if (!node) return false;
|
|
2173
1800
|
const nodeType = node.type;
|
|
2174
|
-
|
|
2175
1801
|
if (nodeType === "OpaqueType") {
|
|
2176
1802
|
if (typeof opts === "undefined") {
|
|
2177
1803
|
return true;
|
|
@@ -2179,14 +1805,11 @@ function isOpaqueType(node, opts) {
|
|
|
2179
1805
|
return (0, _shallowEqual.default)(node, opts);
|
|
2180
1806
|
}
|
|
2181
1807
|
}
|
|
2182
|
-
|
|
2183
1808
|
return false;
|
|
2184
1809
|
}
|
|
2185
|
-
|
|
2186
1810
|
function isQualifiedTypeIdentifier(node, opts) {
|
|
2187
1811
|
if (!node) return false;
|
|
2188
1812
|
const nodeType = node.type;
|
|
2189
|
-
|
|
2190
1813
|
if (nodeType === "QualifiedTypeIdentifier") {
|
|
2191
1814
|
if (typeof opts === "undefined") {
|
|
2192
1815
|
return true;
|
|
@@ -2194,14 +1817,11 @@ function isQualifiedTypeIdentifier(node, opts) {
|
|
|
2194
1817
|
return (0, _shallowEqual.default)(node, opts);
|
|
2195
1818
|
}
|
|
2196
1819
|
}
|
|
2197
|
-
|
|
2198
1820
|
return false;
|
|
2199
1821
|
}
|
|
2200
|
-
|
|
2201
1822
|
function isStringLiteralTypeAnnotation(node, opts) {
|
|
2202
1823
|
if (!node) return false;
|
|
2203
1824
|
const nodeType = node.type;
|
|
2204
|
-
|
|
2205
1825
|
if (nodeType === "StringLiteralTypeAnnotation") {
|
|
2206
1826
|
if (typeof opts === "undefined") {
|
|
2207
1827
|
return true;
|
|
@@ -2209,14 +1829,11 @@ function isStringLiteralTypeAnnotation(node, opts) {
|
|
|
2209
1829
|
return (0, _shallowEqual.default)(node, opts);
|
|
2210
1830
|
}
|
|
2211
1831
|
}
|
|
2212
|
-
|
|
2213
1832
|
return false;
|
|
2214
1833
|
}
|
|
2215
|
-
|
|
2216
1834
|
function isStringTypeAnnotation(node, opts) {
|
|
2217
1835
|
if (!node) return false;
|
|
2218
1836
|
const nodeType = node.type;
|
|
2219
|
-
|
|
2220
1837
|
if (nodeType === "StringTypeAnnotation") {
|
|
2221
1838
|
if (typeof opts === "undefined") {
|
|
2222
1839
|
return true;
|
|
@@ -2224,14 +1841,11 @@ function isStringTypeAnnotation(node, opts) {
|
|
|
2224
1841
|
return (0, _shallowEqual.default)(node, opts);
|
|
2225
1842
|
}
|
|
2226
1843
|
}
|
|
2227
|
-
|
|
2228
1844
|
return false;
|
|
2229
1845
|
}
|
|
2230
|
-
|
|
2231
1846
|
function isSymbolTypeAnnotation(node, opts) {
|
|
2232
1847
|
if (!node) return false;
|
|
2233
1848
|
const nodeType = node.type;
|
|
2234
|
-
|
|
2235
1849
|
if (nodeType === "SymbolTypeAnnotation") {
|
|
2236
1850
|
if (typeof opts === "undefined") {
|
|
2237
1851
|
return true;
|
|
@@ -2239,14 +1853,11 @@ function isSymbolTypeAnnotation(node, opts) {
|
|
|
2239
1853
|
return (0, _shallowEqual.default)(node, opts);
|
|
2240
1854
|
}
|
|
2241
1855
|
}
|
|
2242
|
-
|
|
2243
1856
|
return false;
|
|
2244
1857
|
}
|
|
2245
|
-
|
|
2246
1858
|
function isThisTypeAnnotation(node, opts) {
|
|
2247
1859
|
if (!node) return false;
|
|
2248
1860
|
const nodeType = node.type;
|
|
2249
|
-
|
|
2250
1861
|
if (nodeType === "ThisTypeAnnotation") {
|
|
2251
1862
|
if (typeof opts === "undefined") {
|
|
2252
1863
|
return true;
|
|
@@ -2254,14 +1865,11 @@ function isThisTypeAnnotation(node, opts) {
|
|
|
2254
1865
|
return (0, _shallowEqual.default)(node, opts);
|
|
2255
1866
|
}
|
|
2256
1867
|
}
|
|
2257
|
-
|
|
2258
1868
|
return false;
|
|
2259
1869
|
}
|
|
2260
|
-
|
|
2261
1870
|
function isTupleTypeAnnotation(node, opts) {
|
|
2262
1871
|
if (!node) return false;
|
|
2263
1872
|
const nodeType = node.type;
|
|
2264
|
-
|
|
2265
1873
|
if (nodeType === "TupleTypeAnnotation") {
|
|
2266
1874
|
if (typeof opts === "undefined") {
|
|
2267
1875
|
return true;
|
|
@@ -2269,14 +1877,11 @@ function isTupleTypeAnnotation(node, opts) {
|
|
|
2269
1877
|
return (0, _shallowEqual.default)(node, opts);
|
|
2270
1878
|
}
|
|
2271
1879
|
}
|
|
2272
|
-
|
|
2273
1880
|
return false;
|
|
2274
1881
|
}
|
|
2275
|
-
|
|
2276
1882
|
function isTypeofTypeAnnotation(node, opts) {
|
|
2277
1883
|
if (!node) return false;
|
|
2278
1884
|
const nodeType = node.type;
|
|
2279
|
-
|
|
2280
1885
|
if (nodeType === "TypeofTypeAnnotation") {
|
|
2281
1886
|
if (typeof opts === "undefined") {
|
|
2282
1887
|
return true;
|
|
@@ -2284,14 +1889,11 @@ function isTypeofTypeAnnotation(node, opts) {
|
|
|
2284
1889
|
return (0, _shallowEqual.default)(node, opts);
|
|
2285
1890
|
}
|
|
2286
1891
|
}
|
|
2287
|
-
|
|
2288
1892
|
return false;
|
|
2289
1893
|
}
|
|
2290
|
-
|
|
2291
1894
|
function isTypeAlias(node, opts) {
|
|
2292
1895
|
if (!node) return false;
|
|
2293
1896
|
const nodeType = node.type;
|
|
2294
|
-
|
|
2295
1897
|
if (nodeType === "TypeAlias") {
|
|
2296
1898
|
if (typeof opts === "undefined") {
|
|
2297
1899
|
return true;
|
|
@@ -2299,14 +1901,11 @@ function isTypeAlias(node, opts) {
|
|
|
2299
1901
|
return (0, _shallowEqual.default)(node, opts);
|
|
2300
1902
|
}
|
|
2301
1903
|
}
|
|
2302
|
-
|
|
2303
1904
|
return false;
|
|
2304
1905
|
}
|
|
2305
|
-
|
|
2306
1906
|
function isTypeAnnotation(node, opts) {
|
|
2307
1907
|
if (!node) return false;
|
|
2308
1908
|
const nodeType = node.type;
|
|
2309
|
-
|
|
2310
1909
|
if (nodeType === "TypeAnnotation") {
|
|
2311
1910
|
if (typeof opts === "undefined") {
|
|
2312
1911
|
return true;
|
|
@@ -2314,14 +1913,11 @@ function isTypeAnnotation(node, opts) {
|
|
|
2314
1913
|
return (0, _shallowEqual.default)(node, opts);
|
|
2315
1914
|
}
|
|
2316
1915
|
}
|
|
2317
|
-
|
|
2318
1916
|
return false;
|
|
2319
1917
|
}
|
|
2320
|
-
|
|
2321
1918
|
function isTypeCastExpression(node, opts) {
|
|
2322
1919
|
if (!node) return false;
|
|
2323
1920
|
const nodeType = node.type;
|
|
2324
|
-
|
|
2325
1921
|
if (nodeType === "TypeCastExpression") {
|
|
2326
1922
|
if (typeof opts === "undefined") {
|
|
2327
1923
|
return true;
|
|
@@ -2329,14 +1925,11 @@ function isTypeCastExpression(node, opts) {
|
|
|
2329
1925
|
return (0, _shallowEqual.default)(node, opts);
|
|
2330
1926
|
}
|
|
2331
1927
|
}
|
|
2332
|
-
|
|
2333
1928
|
return false;
|
|
2334
1929
|
}
|
|
2335
|
-
|
|
2336
1930
|
function isTypeParameter(node, opts) {
|
|
2337
1931
|
if (!node) return false;
|
|
2338
1932
|
const nodeType = node.type;
|
|
2339
|
-
|
|
2340
1933
|
if (nodeType === "TypeParameter") {
|
|
2341
1934
|
if (typeof opts === "undefined") {
|
|
2342
1935
|
return true;
|
|
@@ -2344,14 +1937,11 @@ function isTypeParameter(node, opts) {
|
|
|
2344
1937
|
return (0, _shallowEqual.default)(node, opts);
|
|
2345
1938
|
}
|
|
2346
1939
|
}
|
|
2347
|
-
|
|
2348
1940
|
return false;
|
|
2349
1941
|
}
|
|
2350
|
-
|
|
2351
1942
|
function isTypeParameterDeclaration(node, opts) {
|
|
2352
1943
|
if (!node) return false;
|
|
2353
1944
|
const nodeType = node.type;
|
|
2354
|
-
|
|
2355
1945
|
if (nodeType === "TypeParameterDeclaration") {
|
|
2356
1946
|
if (typeof opts === "undefined") {
|
|
2357
1947
|
return true;
|
|
@@ -2359,14 +1949,11 @@ function isTypeParameterDeclaration(node, opts) {
|
|
|
2359
1949
|
return (0, _shallowEqual.default)(node, opts);
|
|
2360
1950
|
}
|
|
2361
1951
|
}
|
|
2362
|
-
|
|
2363
1952
|
return false;
|
|
2364
1953
|
}
|
|
2365
|
-
|
|
2366
1954
|
function isTypeParameterInstantiation(node, opts) {
|
|
2367
1955
|
if (!node) return false;
|
|
2368
1956
|
const nodeType = node.type;
|
|
2369
|
-
|
|
2370
1957
|
if (nodeType === "TypeParameterInstantiation") {
|
|
2371
1958
|
if (typeof opts === "undefined") {
|
|
2372
1959
|
return true;
|
|
@@ -2374,14 +1961,11 @@ function isTypeParameterInstantiation(node, opts) {
|
|
|
2374
1961
|
return (0, _shallowEqual.default)(node, opts);
|
|
2375
1962
|
}
|
|
2376
1963
|
}
|
|
2377
|
-
|
|
2378
1964
|
return false;
|
|
2379
1965
|
}
|
|
2380
|
-
|
|
2381
1966
|
function isUnionTypeAnnotation(node, opts) {
|
|
2382
1967
|
if (!node) return false;
|
|
2383
1968
|
const nodeType = node.type;
|
|
2384
|
-
|
|
2385
1969
|
if (nodeType === "UnionTypeAnnotation") {
|
|
2386
1970
|
if (typeof opts === "undefined") {
|
|
2387
1971
|
return true;
|
|
@@ -2389,14 +1973,11 @@ function isUnionTypeAnnotation(node, opts) {
|
|
|
2389
1973
|
return (0, _shallowEqual.default)(node, opts);
|
|
2390
1974
|
}
|
|
2391
1975
|
}
|
|
2392
|
-
|
|
2393
1976
|
return false;
|
|
2394
1977
|
}
|
|
2395
|
-
|
|
2396
1978
|
function isVariance(node, opts) {
|
|
2397
1979
|
if (!node) return false;
|
|
2398
1980
|
const nodeType = node.type;
|
|
2399
|
-
|
|
2400
1981
|
if (nodeType === "Variance") {
|
|
2401
1982
|
if (typeof opts === "undefined") {
|
|
2402
1983
|
return true;
|
|
@@ -2404,14 +1985,11 @@ function isVariance(node, opts) {
|
|
|
2404
1985
|
return (0, _shallowEqual.default)(node, opts);
|
|
2405
1986
|
}
|
|
2406
1987
|
}
|
|
2407
|
-
|
|
2408
1988
|
return false;
|
|
2409
1989
|
}
|
|
2410
|
-
|
|
2411
1990
|
function isVoidTypeAnnotation(node, opts) {
|
|
2412
1991
|
if (!node) return false;
|
|
2413
1992
|
const nodeType = node.type;
|
|
2414
|
-
|
|
2415
1993
|
if (nodeType === "VoidTypeAnnotation") {
|
|
2416
1994
|
if (typeof opts === "undefined") {
|
|
2417
1995
|
return true;
|
|
@@ -2419,14 +1997,11 @@ function isVoidTypeAnnotation(node, opts) {
|
|
|
2419
1997
|
return (0, _shallowEqual.default)(node, opts);
|
|
2420
1998
|
}
|
|
2421
1999
|
}
|
|
2422
|
-
|
|
2423
2000
|
return false;
|
|
2424
2001
|
}
|
|
2425
|
-
|
|
2426
2002
|
function isEnumDeclaration(node, opts) {
|
|
2427
2003
|
if (!node) return false;
|
|
2428
2004
|
const nodeType = node.type;
|
|
2429
|
-
|
|
2430
2005
|
if (nodeType === "EnumDeclaration") {
|
|
2431
2006
|
if (typeof opts === "undefined") {
|
|
2432
2007
|
return true;
|
|
@@ -2434,14 +2009,11 @@ function isEnumDeclaration(node, opts) {
|
|
|
2434
2009
|
return (0, _shallowEqual.default)(node, opts);
|
|
2435
2010
|
}
|
|
2436
2011
|
}
|
|
2437
|
-
|
|
2438
2012
|
return false;
|
|
2439
2013
|
}
|
|
2440
|
-
|
|
2441
2014
|
function isEnumBooleanBody(node, opts) {
|
|
2442
2015
|
if (!node) return false;
|
|
2443
2016
|
const nodeType = node.type;
|
|
2444
|
-
|
|
2445
2017
|
if (nodeType === "EnumBooleanBody") {
|
|
2446
2018
|
if (typeof opts === "undefined") {
|
|
2447
2019
|
return true;
|
|
@@ -2449,14 +2021,11 @@ function isEnumBooleanBody(node, opts) {
|
|
|
2449
2021
|
return (0, _shallowEqual.default)(node, opts);
|
|
2450
2022
|
}
|
|
2451
2023
|
}
|
|
2452
|
-
|
|
2453
2024
|
return false;
|
|
2454
2025
|
}
|
|
2455
|
-
|
|
2456
2026
|
function isEnumNumberBody(node, opts) {
|
|
2457
2027
|
if (!node) return false;
|
|
2458
2028
|
const nodeType = node.type;
|
|
2459
|
-
|
|
2460
2029
|
if (nodeType === "EnumNumberBody") {
|
|
2461
2030
|
if (typeof opts === "undefined") {
|
|
2462
2031
|
return true;
|
|
@@ -2464,14 +2033,11 @@ function isEnumNumberBody(node, opts) {
|
|
|
2464
2033
|
return (0, _shallowEqual.default)(node, opts);
|
|
2465
2034
|
}
|
|
2466
2035
|
}
|
|
2467
|
-
|
|
2468
2036
|
return false;
|
|
2469
2037
|
}
|
|
2470
|
-
|
|
2471
2038
|
function isEnumStringBody(node, opts) {
|
|
2472
2039
|
if (!node) return false;
|
|
2473
2040
|
const nodeType = node.type;
|
|
2474
|
-
|
|
2475
2041
|
if (nodeType === "EnumStringBody") {
|
|
2476
2042
|
if (typeof opts === "undefined") {
|
|
2477
2043
|
return true;
|
|
@@ -2479,14 +2045,11 @@ function isEnumStringBody(node, opts) {
|
|
|
2479
2045
|
return (0, _shallowEqual.default)(node, opts);
|
|
2480
2046
|
}
|
|
2481
2047
|
}
|
|
2482
|
-
|
|
2483
2048
|
return false;
|
|
2484
2049
|
}
|
|
2485
|
-
|
|
2486
2050
|
function isEnumSymbolBody(node, opts) {
|
|
2487
2051
|
if (!node) return false;
|
|
2488
2052
|
const nodeType = node.type;
|
|
2489
|
-
|
|
2490
2053
|
if (nodeType === "EnumSymbolBody") {
|
|
2491
2054
|
if (typeof opts === "undefined") {
|
|
2492
2055
|
return true;
|
|
@@ -2494,14 +2057,11 @@ function isEnumSymbolBody(node, opts) {
|
|
|
2494
2057
|
return (0, _shallowEqual.default)(node, opts);
|
|
2495
2058
|
}
|
|
2496
2059
|
}
|
|
2497
|
-
|
|
2498
2060
|
return false;
|
|
2499
2061
|
}
|
|
2500
|
-
|
|
2501
2062
|
function isEnumBooleanMember(node, opts) {
|
|
2502
2063
|
if (!node) return false;
|
|
2503
2064
|
const nodeType = node.type;
|
|
2504
|
-
|
|
2505
2065
|
if (nodeType === "EnumBooleanMember") {
|
|
2506
2066
|
if (typeof opts === "undefined") {
|
|
2507
2067
|
return true;
|
|
@@ -2509,14 +2069,11 @@ function isEnumBooleanMember(node, opts) {
|
|
|
2509
2069
|
return (0, _shallowEqual.default)(node, opts);
|
|
2510
2070
|
}
|
|
2511
2071
|
}
|
|
2512
|
-
|
|
2513
2072
|
return false;
|
|
2514
2073
|
}
|
|
2515
|
-
|
|
2516
2074
|
function isEnumNumberMember(node, opts) {
|
|
2517
2075
|
if (!node) return false;
|
|
2518
2076
|
const nodeType = node.type;
|
|
2519
|
-
|
|
2520
2077
|
if (nodeType === "EnumNumberMember") {
|
|
2521
2078
|
if (typeof opts === "undefined") {
|
|
2522
2079
|
return true;
|
|
@@ -2524,14 +2081,11 @@ function isEnumNumberMember(node, opts) {
|
|
|
2524
2081
|
return (0, _shallowEqual.default)(node, opts);
|
|
2525
2082
|
}
|
|
2526
2083
|
}
|
|
2527
|
-
|
|
2528
2084
|
return false;
|
|
2529
2085
|
}
|
|
2530
|
-
|
|
2531
2086
|
function isEnumStringMember(node, opts) {
|
|
2532
2087
|
if (!node) return false;
|
|
2533
2088
|
const nodeType = node.type;
|
|
2534
|
-
|
|
2535
2089
|
if (nodeType === "EnumStringMember") {
|
|
2536
2090
|
if (typeof opts === "undefined") {
|
|
2537
2091
|
return true;
|
|
@@ -2539,14 +2093,11 @@ function isEnumStringMember(node, opts) {
|
|
|
2539
2093
|
return (0, _shallowEqual.default)(node, opts);
|
|
2540
2094
|
}
|
|
2541
2095
|
}
|
|
2542
|
-
|
|
2543
2096
|
return false;
|
|
2544
2097
|
}
|
|
2545
|
-
|
|
2546
2098
|
function isEnumDefaultedMember(node, opts) {
|
|
2547
2099
|
if (!node) return false;
|
|
2548
2100
|
const nodeType = node.type;
|
|
2549
|
-
|
|
2550
2101
|
if (nodeType === "EnumDefaultedMember") {
|
|
2551
2102
|
if (typeof opts === "undefined") {
|
|
2552
2103
|
return true;
|
|
@@ -2554,14 +2105,11 @@ function isEnumDefaultedMember(node, opts) {
|
|
|
2554
2105
|
return (0, _shallowEqual.default)(node, opts);
|
|
2555
2106
|
}
|
|
2556
2107
|
}
|
|
2557
|
-
|
|
2558
2108
|
return false;
|
|
2559
2109
|
}
|
|
2560
|
-
|
|
2561
2110
|
function isIndexedAccessType(node, opts) {
|
|
2562
2111
|
if (!node) return false;
|
|
2563
2112
|
const nodeType = node.type;
|
|
2564
|
-
|
|
2565
2113
|
if (nodeType === "IndexedAccessType") {
|
|
2566
2114
|
if (typeof opts === "undefined") {
|
|
2567
2115
|
return true;
|
|
@@ -2569,14 +2117,11 @@ function isIndexedAccessType(node, opts) {
|
|
|
2569
2117
|
return (0, _shallowEqual.default)(node, opts);
|
|
2570
2118
|
}
|
|
2571
2119
|
}
|
|
2572
|
-
|
|
2573
2120
|
return false;
|
|
2574
2121
|
}
|
|
2575
|
-
|
|
2576
2122
|
function isOptionalIndexedAccessType(node, opts) {
|
|
2577
2123
|
if (!node) return false;
|
|
2578
2124
|
const nodeType = node.type;
|
|
2579
|
-
|
|
2580
2125
|
if (nodeType === "OptionalIndexedAccessType") {
|
|
2581
2126
|
if (typeof opts === "undefined") {
|
|
2582
2127
|
return true;
|
|
@@ -2584,14 +2129,11 @@ function isOptionalIndexedAccessType(node, opts) {
|
|
|
2584
2129
|
return (0, _shallowEqual.default)(node, opts);
|
|
2585
2130
|
}
|
|
2586
2131
|
}
|
|
2587
|
-
|
|
2588
2132
|
return false;
|
|
2589
2133
|
}
|
|
2590
|
-
|
|
2591
2134
|
function isJSXAttribute(node, opts) {
|
|
2592
2135
|
if (!node) return false;
|
|
2593
2136
|
const nodeType = node.type;
|
|
2594
|
-
|
|
2595
2137
|
if (nodeType === "JSXAttribute") {
|
|
2596
2138
|
if (typeof opts === "undefined") {
|
|
2597
2139
|
return true;
|
|
@@ -2599,14 +2141,11 @@ function isJSXAttribute(node, opts) {
|
|
|
2599
2141
|
return (0, _shallowEqual.default)(node, opts);
|
|
2600
2142
|
}
|
|
2601
2143
|
}
|
|
2602
|
-
|
|
2603
2144
|
return false;
|
|
2604
2145
|
}
|
|
2605
|
-
|
|
2606
2146
|
function isJSXClosingElement(node, opts) {
|
|
2607
2147
|
if (!node) return false;
|
|
2608
2148
|
const nodeType = node.type;
|
|
2609
|
-
|
|
2610
2149
|
if (nodeType === "JSXClosingElement") {
|
|
2611
2150
|
if (typeof opts === "undefined") {
|
|
2612
2151
|
return true;
|
|
@@ -2614,14 +2153,11 @@ function isJSXClosingElement(node, opts) {
|
|
|
2614
2153
|
return (0, _shallowEqual.default)(node, opts);
|
|
2615
2154
|
}
|
|
2616
2155
|
}
|
|
2617
|
-
|
|
2618
2156
|
return false;
|
|
2619
2157
|
}
|
|
2620
|
-
|
|
2621
2158
|
function isJSXElement(node, opts) {
|
|
2622
2159
|
if (!node) return false;
|
|
2623
2160
|
const nodeType = node.type;
|
|
2624
|
-
|
|
2625
2161
|
if (nodeType === "JSXElement") {
|
|
2626
2162
|
if (typeof opts === "undefined") {
|
|
2627
2163
|
return true;
|
|
@@ -2629,14 +2165,11 @@ function isJSXElement(node, opts) {
|
|
|
2629
2165
|
return (0, _shallowEqual.default)(node, opts);
|
|
2630
2166
|
}
|
|
2631
2167
|
}
|
|
2632
|
-
|
|
2633
2168
|
return false;
|
|
2634
2169
|
}
|
|
2635
|
-
|
|
2636
2170
|
function isJSXEmptyExpression(node, opts) {
|
|
2637
2171
|
if (!node) return false;
|
|
2638
2172
|
const nodeType = node.type;
|
|
2639
|
-
|
|
2640
2173
|
if (nodeType === "JSXEmptyExpression") {
|
|
2641
2174
|
if (typeof opts === "undefined") {
|
|
2642
2175
|
return true;
|
|
@@ -2644,14 +2177,11 @@ function isJSXEmptyExpression(node, opts) {
|
|
|
2644
2177
|
return (0, _shallowEqual.default)(node, opts);
|
|
2645
2178
|
}
|
|
2646
2179
|
}
|
|
2647
|
-
|
|
2648
2180
|
return false;
|
|
2649
2181
|
}
|
|
2650
|
-
|
|
2651
2182
|
function isJSXExpressionContainer(node, opts) {
|
|
2652
2183
|
if (!node) return false;
|
|
2653
2184
|
const nodeType = node.type;
|
|
2654
|
-
|
|
2655
2185
|
if (nodeType === "JSXExpressionContainer") {
|
|
2656
2186
|
if (typeof opts === "undefined") {
|
|
2657
2187
|
return true;
|
|
@@ -2659,14 +2189,11 @@ function isJSXExpressionContainer(node, opts) {
|
|
|
2659
2189
|
return (0, _shallowEqual.default)(node, opts);
|
|
2660
2190
|
}
|
|
2661
2191
|
}
|
|
2662
|
-
|
|
2663
2192
|
return false;
|
|
2664
2193
|
}
|
|
2665
|
-
|
|
2666
2194
|
function isJSXSpreadChild(node, opts) {
|
|
2667
2195
|
if (!node) return false;
|
|
2668
2196
|
const nodeType = node.type;
|
|
2669
|
-
|
|
2670
2197
|
if (nodeType === "JSXSpreadChild") {
|
|
2671
2198
|
if (typeof opts === "undefined") {
|
|
2672
2199
|
return true;
|
|
@@ -2674,14 +2201,11 @@ function isJSXSpreadChild(node, opts) {
|
|
|
2674
2201
|
return (0, _shallowEqual.default)(node, opts);
|
|
2675
2202
|
}
|
|
2676
2203
|
}
|
|
2677
|
-
|
|
2678
2204
|
return false;
|
|
2679
2205
|
}
|
|
2680
|
-
|
|
2681
2206
|
function isJSXIdentifier(node, opts) {
|
|
2682
2207
|
if (!node) return false;
|
|
2683
2208
|
const nodeType = node.type;
|
|
2684
|
-
|
|
2685
2209
|
if (nodeType === "JSXIdentifier") {
|
|
2686
2210
|
if (typeof opts === "undefined") {
|
|
2687
2211
|
return true;
|
|
@@ -2689,14 +2213,11 @@ function isJSXIdentifier(node, opts) {
|
|
|
2689
2213
|
return (0, _shallowEqual.default)(node, opts);
|
|
2690
2214
|
}
|
|
2691
2215
|
}
|
|
2692
|
-
|
|
2693
2216
|
return false;
|
|
2694
2217
|
}
|
|
2695
|
-
|
|
2696
2218
|
function isJSXMemberExpression(node, opts) {
|
|
2697
2219
|
if (!node) return false;
|
|
2698
2220
|
const nodeType = node.type;
|
|
2699
|
-
|
|
2700
2221
|
if (nodeType === "JSXMemberExpression") {
|
|
2701
2222
|
if (typeof opts === "undefined") {
|
|
2702
2223
|
return true;
|
|
@@ -2704,14 +2225,11 @@ function isJSXMemberExpression(node, opts) {
|
|
|
2704
2225
|
return (0, _shallowEqual.default)(node, opts);
|
|
2705
2226
|
}
|
|
2706
2227
|
}
|
|
2707
|
-
|
|
2708
2228
|
return false;
|
|
2709
2229
|
}
|
|
2710
|
-
|
|
2711
2230
|
function isJSXNamespacedName(node, opts) {
|
|
2712
2231
|
if (!node) return false;
|
|
2713
2232
|
const nodeType = node.type;
|
|
2714
|
-
|
|
2715
2233
|
if (nodeType === "JSXNamespacedName") {
|
|
2716
2234
|
if (typeof opts === "undefined") {
|
|
2717
2235
|
return true;
|
|
@@ -2719,14 +2237,11 @@ function isJSXNamespacedName(node, opts) {
|
|
|
2719
2237
|
return (0, _shallowEqual.default)(node, opts);
|
|
2720
2238
|
}
|
|
2721
2239
|
}
|
|
2722
|
-
|
|
2723
2240
|
return false;
|
|
2724
2241
|
}
|
|
2725
|
-
|
|
2726
2242
|
function isJSXOpeningElement(node, opts) {
|
|
2727
2243
|
if (!node) return false;
|
|
2728
2244
|
const nodeType = node.type;
|
|
2729
|
-
|
|
2730
2245
|
if (nodeType === "JSXOpeningElement") {
|
|
2731
2246
|
if (typeof opts === "undefined") {
|
|
2732
2247
|
return true;
|
|
@@ -2734,14 +2249,11 @@ function isJSXOpeningElement(node, opts) {
|
|
|
2734
2249
|
return (0, _shallowEqual.default)(node, opts);
|
|
2735
2250
|
}
|
|
2736
2251
|
}
|
|
2737
|
-
|
|
2738
2252
|
return false;
|
|
2739
2253
|
}
|
|
2740
|
-
|
|
2741
2254
|
function isJSXSpreadAttribute(node, opts) {
|
|
2742
2255
|
if (!node) return false;
|
|
2743
2256
|
const nodeType = node.type;
|
|
2744
|
-
|
|
2745
2257
|
if (nodeType === "JSXSpreadAttribute") {
|
|
2746
2258
|
if (typeof opts === "undefined") {
|
|
2747
2259
|
return true;
|
|
@@ -2749,14 +2261,11 @@ function isJSXSpreadAttribute(node, opts) {
|
|
|
2749
2261
|
return (0, _shallowEqual.default)(node, opts);
|
|
2750
2262
|
}
|
|
2751
2263
|
}
|
|
2752
|
-
|
|
2753
2264
|
return false;
|
|
2754
2265
|
}
|
|
2755
|
-
|
|
2756
2266
|
function isJSXText(node, opts) {
|
|
2757
2267
|
if (!node) return false;
|
|
2758
2268
|
const nodeType = node.type;
|
|
2759
|
-
|
|
2760
2269
|
if (nodeType === "JSXText") {
|
|
2761
2270
|
if (typeof opts === "undefined") {
|
|
2762
2271
|
return true;
|
|
@@ -2764,14 +2273,11 @@ function isJSXText(node, opts) {
|
|
|
2764
2273
|
return (0, _shallowEqual.default)(node, opts);
|
|
2765
2274
|
}
|
|
2766
2275
|
}
|
|
2767
|
-
|
|
2768
2276
|
return false;
|
|
2769
2277
|
}
|
|
2770
|
-
|
|
2771
2278
|
function isJSXFragment(node, opts) {
|
|
2772
2279
|
if (!node) return false;
|
|
2773
2280
|
const nodeType = node.type;
|
|
2774
|
-
|
|
2775
2281
|
if (nodeType === "JSXFragment") {
|
|
2776
2282
|
if (typeof opts === "undefined") {
|
|
2777
2283
|
return true;
|
|
@@ -2779,14 +2285,11 @@ function isJSXFragment(node, opts) {
|
|
|
2779
2285
|
return (0, _shallowEqual.default)(node, opts);
|
|
2780
2286
|
}
|
|
2781
2287
|
}
|
|
2782
|
-
|
|
2783
2288
|
return false;
|
|
2784
2289
|
}
|
|
2785
|
-
|
|
2786
2290
|
function isJSXOpeningFragment(node, opts) {
|
|
2787
2291
|
if (!node) return false;
|
|
2788
2292
|
const nodeType = node.type;
|
|
2789
|
-
|
|
2790
2293
|
if (nodeType === "JSXOpeningFragment") {
|
|
2791
2294
|
if (typeof opts === "undefined") {
|
|
2792
2295
|
return true;
|
|
@@ -2794,14 +2297,11 @@ function isJSXOpeningFragment(node, opts) {
|
|
|
2794
2297
|
return (0, _shallowEqual.default)(node, opts);
|
|
2795
2298
|
}
|
|
2796
2299
|
}
|
|
2797
|
-
|
|
2798
2300
|
return false;
|
|
2799
2301
|
}
|
|
2800
|
-
|
|
2801
2302
|
function isJSXClosingFragment(node, opts) {
|
|
2802
2303
|
if (!node) return false;
|
|
2803
2304
|
const nodeType = node.type;
|
|
2804
|
-
|
|
2805
2305
|
if (nodeType === "JSXClosingFragment") {
|
|
2806
2306
|
if (typeof opts === "undefined") {
|
|
2807
2307
|
return true;
|
|
@@ -2809,14 +2309,11 @@ function isJSXClosingFragment(node, opts) {
|
|
|
2809
2309
|
return (0, _shallowEqual.default)(node, opts);
|
|
2810
2310
|
}
|
|
2811
2311
|
}
|
|
2812
|
-
|
|
2813
2312
|
return false;
|
|
2814
2313
|
}
|
|
2815
|
-
|
|
2816
2314
|
function isNoop(node, opts) {
|
|
2817
2315
|
if (!node) return false;
|
|
2818
2316
|
const nodeType = node.type;
|
|
2819
|
-
|
|
2820
2317
|
if (nodeType === "Noop") {
|
|
2821
2318
|
if (typeof opts === "undefined") {
|
|
2822
2319
|
return true;
|
|
@@ -2824,14 +2321,11 @@ function isNoop(node, opts) {
|
|
|
2824
2321
|
return (0, _shallowEqual.default)(node, opts);
|
|
2825
2322
|
}
|
|
2826
2323
|
}
|
|
2827
|
-
|
|
2828
2324
|
return false;
|
|
2829
2325
|
}
|
|
2830
|
-
|
|
2831
2326
|
function isPlaceholder(node, opts) {
|
|
2832
2327
|
if (!node) return false;
|
|
2833
2328
|
const nodeType = node.type;
|
|
2834
|
-
|
|
2835
2329
|
if (nodeType === "Placeholder") {
|
|
2836
2330
|
if (typeof opts === "undefined") {
|
|
2837
2331
|
return true;
|
|
@@ -2839,14 +2333,11 @@ function isPlaceholder(node, opts) {
|
|
|
2839
2333
|
return (0, _shallowEqual.default)(node, opts);
|
|
2840
2334
|
}
|
|
2841
2335
|
}
|
|
2842
|
-
|
|
2843
2336
|
return false;
|
|
2844
2337
|
}
|
|
2845
|
-
|
|
2846
2338
|
function isV8IntrinsicIdentifier(node, opts) {
|
|
2847
2339
|
if (!node) return false;
|
|
2848
2340
|
const nodeType = node.type;
|
|
2849
|
-
|
|
2850
2341
|
if (nodeType === "V8IntrinsicIdentifier") {
|
|
2851
2342
|
if (typeof opts === "undefined") {
|
|
2852
2343
|
return true;
|
|
@@ -2854,14 +2345,11 @@ function isV8IntrinsicIdentifier(node, opts) {
|
|
|
2854
2345
|
return (0, _shallowEqual.default)(node, opts);
|
|
2855
2346
|
}
|
|
2856
2347
|
}
|
|
2857
|
-
|
|
2858
2348
|
return false;
|
|
2859
2349
|
}
|
|
2860
|
-
|
|
2861
2350
|
function isArgumentPlaceholder(node, opts) {
|
|
2862
2351
|
if (!node) return false;
|
|
2863
2352
|
const nodeType = node.type;
|
|
2864
|
-
|
|
2865
2353
|
if (nodeType === "ArgumentPlaceholder") {
|
|
2866
2354
|
if (typeof opts === "undefined") {
|
|
2867
2355
|
return true;
|
|
@@ -2869,14 +2357,11 @@ function isArgumentPlaceholder(node, opts) {
|
|
|
2869
2357
|
return (0, _shallowEqual.default)(node, opts);
|
|
2870
2358
|
}
|
|
2871
2359
|
}
|
|
2872
|
-
|
|
2873
2360
|
return false;
|
|
2874
2361
|
}
|
|
2875
|
-
|
|
2876
2362
|
function isBindExpression(node, opts) {
|
|
2877
2363
|
if (!node) return false;
|
|
2878
2364
|
const nodeType = node.type;
|
|
2879
|
-
|
|
2880
2365
|
if (nodeType === "BindExpression") {
|
|
2881
2366
|
if (typeof opts === "undefined") {
|
|
2882
2367
|
return true;
|
|
@@ -2884,14 +2369,11 @@ function isBindExpression(node, opts) {
|
|
|
2884
2369
|
return (0, _shallowEqual.default)(node, opts);
|
|
2885
2370
|
}
|
|
2886
2371
|
}
|
|
2887
|
-
|
|
2888
2372
|
return false;
|
|
2889
2373
|
}
|
|
2890
|
-
|
|
2891
2374
|
function isImportAttribute(node, opts) {
|
|
2892
2375
|
if (!node) return false;
|
|
2893
2376
|
const nodeType = node.type;
|
|
2894
|
-
|
|
2895
2377
|
if (nodeType === "ImportAttribute") {
|
|
2896
2378
|
if (typeof opts === "undefined") {
|
|
2897
2379
|
return true;
|
|
@@ -2899,14 +2381,11 @@ function isImportAttribute(node, opts) {
|
|
|
2899
2381
|
return (0, _shallowEqual.default)(node, opts);
|
|
2900
2382
|
}
|
|
2901
2383
|
}
|
|
2902
|
-
|
|
2903
2384
|
return false;
|
|
2904
2385
|
}
|
|
2905
|
-
|
|
2906
2386
|
function isDecorator(node, opts) {
|
|
2907
2387
|
if (!node) return false;
|
|
2908
2388
|
const nodeType = node.type;
|
|
2909
|
-
|
|
2910
2389
|
if (nodeType === "Decorator") {
|
|
2911
2390
|
if (typeof opts === "undefined") {
|
|
2912
2391
|
return true;
|
|
@@ -2914,14 +2393,11 @@ function isDecorator(node, opts) {
|
|
|
2914
2393
|
return (0, _shallowEqual.default)(node, opts);
|
|
2915
2394
|
}
|
|
2916
2395
|
}
|
|
2917
|
-
|
|
2918
2396
|
return false;
|
|
2919
2397
|
}
|
|
2920
|
-
|
|
2921
2398
|
function isDoExpression(node, opts) {
|
|
2922
2399
|
if (!node) return false;
|
|
2923
2400
|
const nodeType = node.type;
|
|
2924
|
-
|
|
2925
2401
|
if (nodeType === "DoExpression") {
|
|
2926
2402
|
if (typeof opts === "undefined") {
|
|
2927
2403
|
return true;
|
|
@@ -2929,14 +2405,11 @@ function isDoExpression(node, opts) {
|
|
|
2929
2405
|
return (0, _shallowEqual.default)(node, opts);
|
|
2930
2406
|
}
|
|
2931
2407
|
}
|
|
2932
|
-
|
|
2933
2408
|
return false;
|
|
2934
2409
|
}
|
|
2935
|
-
|
|
2936
2410
|
function isExportDefaultSpecifier(node, opts) {
|
|
2937
2411
|
if (!node) return false;
|
|
2938
2412
|
const nodeType = node.type;
|
|
2939
|
-
|
|
2940
2413
|
if (nodeType === "ExportDefaultSpecifier") {
|
|
2941
2414
|
if (typeof opts === "undefined") {
|
|
2942
2415
|
return true;
|
|
@@ -2944,14 +2417,11 @@ function isExportDefaultSpecifier(node, opts) {
|
|
|
2944
2417
|
return (0, _shallowEqual.default)(node, opts);
|
|
2945
2418
|
}
|
|
2946
2419
|
}
|
|
2947
|
-
|
|
2948
2420
|
return false;
|
|
2949
2421
|
}
|
|
2950
|
-
|
|
2951
2422
|
function isRecordExpression(node, opts) {
|
|
2952
2423
|
if (!node) return false;
|
|
2953
2424
|
const nodeType = node.type;
|
|
2954
|
-
|
|
2955
2425
|
if (nodeType === "RecordExpression") {
|
|
2956
2426
|
if (typeof opts === "undefined") {
|
|
2957
2427
|
return true;
|
|
@@ -2959,14 +2429,11 @@ function isRecordExpression(node, opts) {
|
|
|
2959
2429
|
return (0, _shallowEqual.default)(node, opts);
|
|
2960
2430
|
}
|
|
2961
2431
|
}
|
|
2962
|
-
|
|
2963
2432
|
return false;
|
|
2964
2433
|
}
|
|
2965
|
-
|
|
2966
2434
|
function isTupleExpression(node, opts) {
|
|
2967
2435
|
if (!node) return false;
|
|
2968
2436
|
const nodeType = node.type;
|
|
2969
|
-
|
|
2970
2437
|
if (nodeType === "TupleExpression") {
|
|
2971
2438
|
if (typeof opts === "undefined") {
|
|
2972
2439
|
return true;
|
|
@@ -2974,14 +2441,11 @@ function isTupleExpression(node, opts) {
|
|
|
2974
2441
|
return (0, _shallowEqual.default)(node, opts);
|
|
2975
2442
|
}
|
|
2976
2443
|
}
|
|
2977
|
-
|
|
2978
2444
|
return false;
|
|
2979
2445
|
}
|
|
2980
|
-
|
|
2981
2446
|
function isDecimalLiteral(node, opts) {
|
|
2982
2447
|
if (!node) return false;
|
|
2983
2448
|
const nodeType = node.type;
|
|
2984
|
-
|
|
2985
2449
|
if (nodeType === "DecimalLiteral") {
|
|
2986
2450
|
if (typeof opts === "undefined") {
|
|
2987
2451
|
return true;
|
|
@@ -2989,14 +2453,11 @@ function isDecimalLiteral(node, opts) {
|
|
|
2989
2453
|
return (0, _shallowEqual.default)(node, opts);
|
|
2990
2454
|
}
|
|
2991
2455
|
}
|
|
2992
|
-
|
|
2993
2456
|
return false;
|
|
2994
2457
|
}
|
|
2995
|
-
|
|
2996
2458
|
function isModuleExpression(node, opts) {
|
|
2997
2459
|
if (!node) return false;
|
|
2998
2460
|
const nodeType = node.type;
|
|
2999
|
-
|
|
3000
2461
|
if (nodeType === "ModuleExpression") {
|
|
3001
2462
|
if (typeof opts === "undefined") {
|
|
3002
2463
|
return true;
|
|
@@ -3004,14 +2465,11 @@ function isModuleExpression(node, opts) {
|
|
|
3004
2465
|
return (0, _shallowEqual.default)(node, opts);
|
|
3005
2466
|
}
|
|
3006
2467
|
}
|
|
3007
|
-
|
|
3008
2468
|
return false;
|
|
3009
2469
|
}
|
|
3010
|
-
|
|
3011
2470
|
function isTopicReference(node, opts) {
|
|
3012
2471
|
if (!node) return false;
|
|
3013
2472
|
const nodeType = node.type;
|
|
3014
|
-
|
|
3015
2473
|
if (nodeType === "TopicReference") {
|
|
3016
2474
|
if (typeof opts === "undefined") {
|
|
3017
2475
|
return true;
|
|
@@ -3019,14 +2477,11 @@ function isTopicReference(node, opts) {
|
|
|
3019
2477
|
return (0, _shallowEqual.default)(node, opts);
|
|
3020
2478
|
}
|
|
3021
2479
|
}
|
|
3022
|
-
|
|
3023
2480
|
return false;
|
|
3024
2481
|
}
|
|
3025
|
-
|
|
3026
2482
|
function isPipelineTopicExpression(node, opts) {
|
|
3027
2483
|
if (!node) return false;
|
|
3028
2484
|
const nodeType = node.type;
|
|
3029
|
-
|
|
3030
2485
|
if (nodeType === "PipelineTopicExpression") {
|
|
3031
2486
|
if (typeof opts === "undefined") {
|
|
3032
2487
|
return true;
|
|
@@ -3034,14 +2489,11 @@ function isPipelineTopicExpression(node, opts) {
|
|
|
3034
2489
|
return (0, _shallowEqual.default)(node, opts);
|
|
3035
2490
|
}
|
|
3036
2491
|
}
|
|
3037
|
-
|
|
3038
2492
|
return false;
|
|
3039
2493
|
}
|
|
3040
|
-
|
|
3041
2494
|
function isPipelineBareFunction(node, opts) {
|
|
3042
2495
|
if (!node) return false;
|
|
3043
2496
|
const nodeType = node.type;
|
|
3044
|
-
|
|
3045
2497
|
if (nodeType === "PipelineBareFunction") {
|
|
3046
2498
|
if (typeof opts === "undefined") {
|
|
3047
2499
|
return true;
|
|
@@ -3049,14 +2501,11 @@ function isPipelineBareFunction(node, opts) {
|
|
|
3049
2501
|
return (0, _shallowEqual.default)(node, opts);
|
|
3050
2502
|
}
|
|
3051
2503
|
}
|
|
3052
|
-
|
|
3053
2504
|
return false;
|
|
3054
2505
|
}
|
|
3055
|
-
|
|
3056
2506
|
function isPipelinePrimaryTopicReference(node, opts) {
|
|
3057
2507
|
if (!node) return false;
|
|
3058
2508
|
const nodeType = node.type;
|
|
3059
|
-
|
|
3060
2509
|
if (nodeType === "PipelinePrimaryTopicReference") {
|
|
3061
2510
|
if (typeof opts === "undefined") {
|
|
3062
2511
|
return true;
|
|
@@ -3064,14 +2513,11 @@ function isPipelinePrimaryTopicReference(node, opts) {
|
|
|
3064
2513
|
return (0, _shallowEqual.default)(node, opts);
|
|
3065
2514
|
}
|
|
3066
2515
|
}
|
|
3067
|
-
|
|
3068
2516
|
return false;
|
|
3069
2517
|
}
|
|
3070
|
-
|
|
3071
2518
|
function isTSParameterProperty(node, opts) {
|
|
3072
2519
|
if (!node) return false;
|
|
3073
2520
|
const nodeType = node.type;
|
|
3074
|
-
|
|
3075
2521
|
if (nodeType === "TSParameterProperty") {
|
|
3076
2522
|
if (typeof opts === "undefined") {
|
|
3077
2523
|
return true;
|
|
@@ -3079,14 +2525,11 @@ function isTSParameterProperty(node, opts) {
|
|
|
3079
2525
|
return (0, _shallowEqual.default)(node, opts);
|
|
3080
2526
|
}
|
|
3081
2527
|
}
|
|
3082
|
-
|
|
3083
2528
|
return false;
|
|
3084
2529
|
}
|
|
3085
|
-
|
|
3086
2530
|
function isTSDeclareFunction(node, opts) {
|
|
3087
2531
|
if (!node) return false;
|
|
3088
2532
|
const nodeType = node.type;
|
|
3089
|
-
|
|
3090
2533
|
if (nodeType === "TSDeclareFunction") {
|
|
3091
2534
|
if (typeof opts === "undefined") {
|
|
3092
2535
|
return true;
|
|
@@ -3094,14 +2537,11 @@ function isTSDeclareFunction(node, opts) {
|
|
|
3094
2537
|
return (0, _shallowEqual.default)(node, opts);
|
|
3095
2538
|
}
|
|
3096
2539
|
}
|
|
3097
|
-
|
|
3098
2540
|
return false;
|
|
3099
2541
|
}
|
|
3100
|
-
|
|
3101
2542
|
function isTSDeclareMethod(node, opts) {
|
|
3102
2543
|
if (!node) return false;
|
|
3103
2544
|
const nodeType = node.type;
|
|
3104
|
-
|
|
3105
2545
|
if (nodeType === "TSDeclareMethod") {
|
|
3106
2546
|
if (typeof opts === "undefined") {
|
|
3107
2547
|
return true;
|
|
@@ -3109,14 +2549,11 @@ function isTSDeclareMethod(node, opts) {
|
|
|
3109
2549
|
return (0, _shallowEqual.default)(node, opts);
|
|
3110
2550
|
}
|
|
3111
2551
|
}
|
|
3112
|
-
|
|
3113
2552
|
return false;
|
|
3114
2553
|
}
|
|
3115
|
-
|
|
3116
2554
|
function isTSQualifiedName(node, opts) {
|
|
3117
2555
|
if (!node) return false;
|
|
3118
2556
|
const nodeType = node.type;
|
|
3119
|
-
|
|
3120
2557
|
if (nodeType === "TSQualifiedName") {
|
|
3121
2558
|
if (typeof opts === "undefined") {
|
|
3122
2559
|
return true;
|
|
@@ -3124,14 +2561,11 @@ function isTSQualifiedName(node, opts) {
|
|
|
3124
2561
|
return (0, _shallowEqual.default)(node, opts);
|
|
3125
2562
|
}
|
|
3126
2563
|
}
|
|
3127
|
-
|
|
3128
2564
|
return false;
|
|
3129
2565
|
}
|
|
3130
|
-
|
|
3131
2566
|
function isTSCallSignatureDeclaration(node, opts) {
|
|
3132
2567
|
if (!node) return false;
|
|
3133
2568
|
const nodeType = node.type;
|
|
3134
|
-
|
|
3135
2569
|
if (nodeType === "TSCallSignatureDeclaration") {
|
|
3136
2570
|
if (typeof opts === "undefined") {
|
|
3137
2571
|
return true;
|
|
@@ -3139,14 +2573,11 @@ function isTSCallSignatureDeclaration(node, opts) {
|
|
|
3139
2573
|
return (0, _shallowEqual.default)(node, opts);
|
|
3140
2574
|
}
|
|
3141
2575
|
}
|
|
3142
|
-
|
|
3143
2576
|
return false;
|
|
3144
2577
|
}
|
|
3145
|
-
|
|
3146
2578
|
function isTSConstructSignatureDeclaration(node, opts) {
|
|
3147
2579
|
if (!node) return false;
|
|
3148
2580
|
const nodeType = node.type;
|
|
3149
|
-
|
|
3150
2581
|
if (nodeType === "TSConstructSignatureDeclaration") {
|
|
3151
2582
|
if (typeof opts === "undefined") {
|
|
3152
2583
|
return true;
|
|
@@ -3154,14 +2585,11 @@ function isTSConstructSignatureDeclaration(node, opts) {
|
|
|
3154
2585
|
return (0, _shallowEqual.default)(node, opts);
|
|
3155
2586
|
}
|
|
3156
2587
|
}
|
|
3157
|
-
|
|
3158
2588
|
return false;
|
|
3159
2589
|
}
|
|
3160
|
-
|
|
3161
2590
|
function isTSPropertySignature(node, opts) {
|
|
3162
2591
|
if (!node) return false;
|
|
3163
2592
|
const nodeType = node.type;
|
|
3164
|
-
|
|
3165
2593
|
if (nodeType === "TSPropertySignature") {
|
|
3166
2594
|
if (typeof opts === "undefined") {
|
|
3167
2595
|
return true;
|
|
@@ -3169,14 +2597,11 @@ function isTSPropertySignature(node, opts) {
|
|
|
3169
2597
|
return (0, _shallowEqual.default)(node, opts);
|
|
3170
2598
|
}
|
|
3171
2599
|
}
|
|
3172
|
-
|
|
3173
2600
|
return false;
|
|
3174
2601
|
}
|
|
3175
|
-
|
|
3176
2602
|
function isTSMethodSignature(node, opts) {
|
|
3177
2603
|
if (!node) return false;
|
|
3178
2604
|
const nodeType = node.type;
|
|
3179
|
-
|
|
3180
2605
|
if (nodeType === "TSMethodSignature") {
|
|
3181
2606
|
if (typeof opts === "undefined") {
|
|
3182
2607
|
return true;
|
|
@@ -3184,14 +2609,11 @@ function isTSMethodSignature(node, opts) {
|
|
|
3184
2609
|
return (0, _shallowEqual.default)(node, opts);
|
|
3185
2610
|
}
|
|
3186
2611
|
}
|
|
3187
|
-
|
|
3188
2612
|
return false;
|
|
3189
2613
|
}
|
|
3190
|
-
|
|
3191
2614
|
function isTSIndexSignature(node, opts) {
|
|
3192
2615
|
if (!node) return false;
|
|
3193
2616
|
const nodeType = node.type;
|
|
3194
|
-
|
|
3195
2617
|
if (nodeType === "TSIndexSignature") {
|
|
3196
2618
|
if (typeof opts === "undefined") {
|
|
3197
2619
|
return true;
|
|
@@ -3199,14 +2621,11 @@ function isTSIndexSignature(node, opts) {
|
|
|
3199
2621
|
return (0, _shallowEqual.default)(node, opts);
|
|
3200
2622
|
}
|
|
3201
2623
|
}
|
|
3202
|
-
|
|
3203
2624
|
return false;
|
|
3204
2625
|
}
|
|
3205
|
-
|
|
3206
2626
|
function isTSAnyKeyword(node, opts) {
|
|
3207
2627
|
if (!node) return false;
|
|
3208
2628
|
const nodeType = node.type;
|
|
3209
|
-
|
|
3210
2629
|
if (nodeType === "TSAnyKeyword") {
|
|
3211
2630
|
if (typeof opts === "undefined") {
|
|
3212
2631
|
return true;
|
|
@@ -3214,14 +2633,11 @@ function isTSAnyKeyword(node, opts) {
|
|
|
3214
2633
|
return (0, _shallowEqual.default)(node, opts);
|
|
3215
2634
|
}
|
|
3216
2635
|
}
|
|
3217
|
-
|
|
3218
2636
|
return false;
|
|
3219
2637
|
}
|
|
3220
|
-
|
|
3221
2638
|
function isTSBooleanKeyword(node, opts) {
|
|
3222
2639
|
if (!node) return false;
|
|
3223
2640
|
const nodeType = node.type;
|
|
3224
|
-
|
|
3225
2641
|
if (nodeType === "TSBooleanKeyword") {
|
|
3226
2642
|
if (typeof opts === "undefined") {
|
|
3227
2643
|
return true;
|
|
@@ -3229,14 +2645,11 @@ function isTSBooleanKeyword(node, opts) {
|
|
|
3229
2645
|
return (0, _shallowEqual.default)(node, opts);
|
|
3230
2646
|
}
|
|
3231
2647
|
}
|
|
3232
|
-
|
|
3233
2648
|
return false;
|
|
3234
2649
|
}
|
|
3235
|
-
|
|
3236
2650
|
function isTSBigIntKeyword(node, opts) {
|
|
3237
2651
|
if (!node) return false;
|
|
3238
2652
|
const nodeType = node.type;
|
|
3239
|
-
|
|
3240
2653
|
if (nodeType === "TSBigIntKeyword") {
|
|
3241
2654
|
if (typeof opts === "undefined") {
|
|
3242
2655
|
return true;
|
|
@@ -3244,14 +2657,11 @@ function isTSBigIntKeyword(node, opts) {
|
|
|
3244
2657
|
return (0, _shallowEqual.default)(node, opts);
|
|
3245
2658
|
}
|
|
3246
2659
|
}
|
|
3247
|
-
|
|
3248
2660
|
return false;
|
|
3249
2661
|
}
|
|
3250
|
-
|
|
3251
2662
|
function isTSIntrinsicKeyword(node, opts) {
|
|
3252
2663
|
if (!node) return false;
|
|
3253
2664
|
const nodeType = node.type;
|
|
3254
|
-
|
|
3255
2665
|
if (nodeType === "TSIntrinsicKeyword") {
|
|
3256
2666
|
if (typeof opts === "undefined") {
|
|
3257
2667
|
return true;
|
|
@@ -3259,14 +2669,11 @@ function isTSIntrinsicKeyword(node, opts) {
|
|
|
3259
2669
|
return (0, _shallowEqual.default)(node, opts);
|
|
3260
2670
|
}
|
|
3261
2671
|
}
|
|
3262
|
-
|
|
3263
2672
|
return false;
|
|
3264
2673
|
}
|
|
3265
|
-
|
|
3266
2674
|
function isTSNeverKeyword(node, opts) {
|
|
3267
2675
|
if (!node) return false;
|
|
3268
2676
|
const nodeType = node.type;
|
|
3269
|
-
|
|
3270
2677
|
if (nodeType === "TSNeverKeyword") {
|
|
3271
2678
|
if (typeof opts === "undefined") {
|
|
3272
2679
|
return true;
|
|
@@ -3274,14 +2681,11 @@ function isTSNeverKeyword(node, opts) {
|
|
|
3274
2681
|
return (0, _shallowEqual.default)(node, opts);
|
|
3275
2682
|
}
|
|
3276
2683
|
}
|
|
3277
|
-
|
|
3278
2684
|
return false;
|
|
3279
2685
|
}
|
|
3280
|
-
|
|
3281
2686
|
function isTSNullKeyword(node, opts) {
|
|
3282
2687
|
if (!node) return false;
|
|
3283
2688
|
const nodeType = node.type;
|
|
3284
|
-
|
|
3285
2689
|
if (nodeType === "TSNullKeyword") {
|
|
3286
2690
|
if (typeof opts === "undefined") {
|
|
3287
2691
|
return true;
|
|
@@ -3289,14 +2693,11 @@ function isTSNullKeyword(node, opts) {
|
|
|
3289
2693
|
return (0, _shallowEqual.default)(node, opts);
|
|
3290
2694
|
}
|
|
3291
2695
|
}
|
|
3292
|
-
|
|
3293
2696
|
return false;
|
|
3294
2697
|
}
|
|
3295
|
-
|
|
3296
2698
|
function isTSNumberKeyword(node, opts) {
|
|
3297
2699
|
if (!node) return false;
|
|
3298
2700
|
const nodeType = node.type;
|
|
3299
|
-
|
|
3300
2701
|
if (nodeType === "TSNumberKeyword") {
|
|
3301
2702
|
if (typeof opts === "undefined") {
|
|
3302
2703
|
return true;
|
|
@@ -3304,14 +2705,11 @@ function isTSNumberKeyword(node, opts) {
|
|
|
3304
2705
|
return (0, _shallowEqual.default)(node, opts);
|
|
3305
2706
|
}
|
|
3306
2707
|
}
|
|
3307
|
-
|
|
3308
2708
|
return false;
|
|
3309
2709
|
}
|
|
3310
|
-
|
|
3311
2710
|
function isTSObjectKeyword(node, opts) {
|
|
3312
2711
|
if (!node) return false;
|
|
3313
2712
|
const nodeType = node.type;
|
|
3314
|
-
|
|
3315
2713
|
if (nodeType === "TSObjectKeyword") {
|
|
3316
2714
|
if (typeof opts === "undefined") {
|
|
3317
2715
|
return true;
|
|
@@ -3319,14 +2717,11 @@ function isTSObjectKeyword(node, opts) {
|
|
|
3319
2717
|
return (0, _shallowEqual.default)(node, opts);
|
|
3320
2718
|
}
|
|
3321
2719
|
}
|
|
3322
|
-
|
|
3323
2720
|
return false;
|
|
3324
2721
|
}
|
|
3325
|
-
|
|
3326
2722
|
function isTSStringKeyword(node, opts) {
|
|
3327
2723
|
if (!node) return false;
|
|
3328
2724
|
const nodeType = node.type;
|
|
3329
|
-
|
|
3330
2725
|
if (nodeType === "TSStringKeyword") {
|
|
3331
2726
|
if (typeof opts === "undefined") {
|
|
3332
2727
|
return true;
|
|
@@ -3334,14 +2729,11 @@ function isTSStringKeyword(node, opts) {
|
|
|
3334
2729
|
return (0, _shallowEqual.default)(node, opts);
|
|
3335
2730
|
}
|
|
3336
2731
|
}
|
|
3337
|
-
|
|
3338
2732
|
return false;
|
|
3339
2733
|
}
|
|
3340
|
-
|
|
3341
2734
|
function isTSSymbolKeyword(node, opts) {
|
|
3342
2735
|
if (!node) return false;
|
|
3343
2736
|
const nodeType = node.type;
|
|
3344
|
-
|
|
3345
2737
|
if (nodeType === "TSSymbolKeyword") {
|
|
3346
2738
|
if (typeof opts === "undefined") {
|
|
3347
2739
|
return true;
|
|
@@ -3349,14 +2741,11 @@ function isTSSymbolKeyword(node, opts) {
|
|
|
3349
2741
|
return (0, _shallowEqual.default)(node, opts);
|
|
3350
2742
|
}
|
|
3351
2743
|
}
|
|
3352
|
-
|
|
3353
2744
|
return false;
|
|
3354
2745
|
}
|
|
3355
|
-
|
|
3356
2746
|
function isTSUndefinedKeyword(node, opts) {
|
|
3357
2747
|
if (!node) return false;
|
|
3358
2748
|
const nodeType = node.type;
|
|
3359
|
-
|
|
3360
2749
|
if (nodeType === "TSUndefinedKeyword") {
|
|
3361
2750
|
if (typeof opts === "undefined") {
|
|
3362
2751
|
return true;
|
|
@@ -3364,14 +2753,11 @@ function isTSUndefinedKeyword(node, opts) {
|
|
|
3364
2753
|
return (0, _shallowEqual.default)(node, opts);
|
|
3365
2754
|
}
|
|
3366
2755
|
}
|
|
3367
|
-
|
|
3368
2756
|
return false;
|
|
3369
2757
|
}
|
|
3370
|
-
|
|
3371
2758
|
function isTSUnknownKeyword(node, opts) {
|
|
3372
2759
|
if (!node) return false;
|
|
3373
2760
|
const nodeType = node.type;
|
|
3374
|
-
|
|
3375
2761
|
if (nodeType === "TSUnknownKeyword") {
|
|
3376
2762
|
if (typeof opts === "undefined") {
|
|
3377
2763
|
return true;
|
|
@@ -3379,14 +2765,11 @@ function isTSUnknownKeyword(node, opts) {
|
|
|
3379
2765
|
return (0, _shallowEqual.default)(node, opts);
|
|
3380
2766
|
}
|
|
3381
2767
|
}
|
|
3382
|
-
|
|
3383
2768
|
return false;
|
|
3384
2769
|
}
|
|
3385
|
-
|
|
3386
2770
|
function isTSVoidKeyword(node, opts) {
|
|
3387
2771
|
if (!node) return false;
|
|
3388
2772
|
const nodeType = node.type;
|
|
3389
|
-
|
|
3390
2773
|
if (nodeType === "TSVoidKeyword") {
|
|
3391
2774
|
if (typeof opts === "undefined") {
|
|
3392
2775
|
return true;
|
|
@@ -3394,14 +2777,11 @@ function isTSVoidKeyword(node, opts) {
|
|
|
3394
2777
|
return (0, _shallowEqual.default)(node, opts);
|
|
3395
2778
|
}
|
|
3396
2779
|
}
|
|
3397
|
-
|
|
3398
2780
|
return false;
|
|
3399
2781
|
}
|
|
3400
|
-
|
|
3401
2782
|
function isTSThisType(node, opts) {
|
|
3402
2783
|
if (!node) return false;
|
|
3403
2784
|
const nodeType = node.type;
|
|
3404
|
-
|
|
3405
2785
|
if (nodeType === "TSThisType") {
|
|
3406
2786
|
if (typeof opts === "undefined") {
|
|
3407
2787
|
return true;
|
|
@@ -3409,14 +2789,11 @@ function isTSThisType(node, opts) {
|
|
|
3409
2789
|
return (0, _shallowEqual.default)(node, opts);
|
|
3410
2790
|
}
|
|
3411
2791
|
}
|
|
3412
|
-
|
|
3413
2792
|
return false;
|
|
3414
2793
|
}
|
|
3415
|
-
|
|
3416
2794
|
function isTSFunctionType(node, opts) {
|
|
3417
2795
|
if (!node) return false;
|
|
3418
2796
|
const nodeType = node.type;
|
|
3419
|
-
|
|
3420
2797
|
if (nodeType === "TSFunctionType") {
|
|
3421
2798
|
if (typeof opts === "undefined") {
|
|
3422
2799
|
return true;
|
|
@@ -3424,14 +2801,11 @@ function isTSFunctionType(node, opts) {
|
|
|
3424
2801
|
return (0, _shallowEqual.default)(node, opts);
|
|
3425
2802
|
}
|
|
3426
2803
|
}
|
|
3427
|
-
|
|
3428
2804
|
return false;
|
|
3429
2805
|
}
|
|
3430
|
-
|
|
3431
2806
|
function isTSConstructorType(node, opts) {
|
|
3432
2807
|
if (!node) return false;
|
|
3433
2808
|
const nodeType = node.type;
|
|
3434
|
-
|
|
3435
2809
|
if (nodeType === "TSConstructorType") {
|
|
3436
2810
|
if (typeof opts === "undefined") {
|
|
3437
2811
|
return true;
|
|
@@ -3439,14 +2813,11 @@ function isTSConstructorType(node, opts) {
|
|
|
3439
2813
|
return (0, _shallowEqual.default)(node, opts);
|
|
3440
2814
|
}
|
|
3441
2815
|
}
|
|
3442
|
-
|
|
3443
2816
|
return false;
|
|
3444
2817
|
}
|
|
3445
|
-
|
|
3446
2818
|
function isTSTypeReference(node, opts) {
|
|
3447
2819
|
if (!node) return false;
|
|
3448
2820
|
const nodeType = node.type;
|
|
3449
|
-
|
|
3450
2821
|
if (nodeType === "TSTypeReference") {
|
|
3451
2822
|
if (typeof opts === "undefined") {
|
|
3452
2823
|
return true;
|
|
@@ -3454,14 +2825,11 @@ function isTSTypeReference(node, opts) {
|
|
|
3454
2825
|
return (0, _shallowEqual.default)(node, opts);
|
|
3455
2826
|
}
|
|
3456
2827
|
}
|
|
3457
|
-
|
|
3458
2828
|
return false;
|
|
3459
2829
|
}
|
|
3460
|
-
|
|
3461
2830
|
function isTSTypePredicate(node, opts) {
|
|
3462
2831
|
if (!node) return false;
|
|
3463
2832
|
const nodeType = node.type;
|
|
3464
|
-
|
|
3465
2833
|
if (nodeType === "TSTypePredicate") {
|
|
3466
2834
|
if (typeof opts === "undefined") {
|
|
3467
2835
|
return true;
|
|
@@ -3469,14 +2837,11 @@ function isTSTypePredicate(node, opts) {
|
|
|
3469
2837
|
return (0, _shallowEqual.default)(node, opts);
|
|
3470
2838
|
}
|
|
3471
2839
|
}
|
|
3472
|
-
|
|
3473
2840
|
return false;
|
|
3474
2841
|
}
|
|
3475
|
-
|
|
3476
2842
|
function isTSTypeQuery(node, opts) {
|
|
3477
2843
|
if (!node) return false;
|
|
3478
2844
|
const nodeType = node.type;
|
|
3479
|
-
|
|
3480
2845
|
if (nodeType === "TSTypeQuery") {
|
|
3481
2846
|
if (typeof opts === "undefined") {
|
|
3482
2847
|
return true;
|
|
@@ -3484,14 +2849,11 @@ function isTSTypeQuery(node, opts) {
|
|
|
3484
2849
|
return (0, _shallowEqual.default)(node, opts);
|
|
3485
2850
|
}
|
|
3486
2851
|
}
|
|
3487
|
-
|
|
3488
2852
|
return false;
|
|
3489
2853
|
}
|
|
3490
|
-
|
|
3491
2854
|
function isTSTypeLiteral(node, opts) {
|
|
3492
2855
|
if (!node) return false;
|
|
3493
2856
|
const nodeType = node.type;
|
|
3494
|
-
|
|
3495
2857
|
if (nodeType === "TSTypeLiteral") {
|
|
3496
2858
|
if (typeof opts === "undefined") {
|
|
3497
2859
|
return true;
|
|
@@ -3499,14 +2861,11 @@ function isTSTypeLiteral(node, opts) {
|
|
|
3499
2861
|
return (0, _shallowEqual.default)(node, opts);
|
|
3500
2862
|
}
|
|
3501
2863
|
}
|
|
3502
|
-
|
|
3503
2864
|
return false;
|
|
3504
2865
|
}
|
|
3505
|
-
|
|
3506
2866
|
function isTSArrayType(node, opts) {
|
|
3507
2867
|
if (!node) return false;
|
|
3508
2868
|
const nodeType = node.type;
|
|
3509
|
-
|
|
3510
2869
|
if (nodeType === "TSArrayType") {
|
|
3511
2870
|
if (typeof opts === "undefined") {
|
|
3512
2871
|
return true;
|
|
@@ -3514,14 +2873,11 @@ function isTSArrayType(node, opts) {
|
|
|
3514
2873
|
return (0, _shallowEqual.default)(node, opts);
|
|
3515
2874
|
}
|
|
3516
2875
|
}
|
|
3517
|
-
|
|
3518
2876
|
return false;
|
|
3519
2877
|
}
|
|
3520
|
-
|
|
3521
2878
|
function isTSTupleType(node, opts) {
|
|
3522
2879
|
if (!node) return false;
|
|
3523
2880
|
const nodeType = node.type;
|
|
3524
|
-
|
|
3525
2881
|
if (nodeType === "TSTupleType") {
|
|
3526
2882
|
if (typeof opts === "undefined") {
|
|
3527
2883
|
return true;
|
|
@@ -3529,14 +2885,11 @@ function isTSTupleType(node, opts) {
|
|
|
3529
2885
|
return (0, _shallowEqual.default)(node, opts);
|
|
3530
2886
|
}
|
|
3531
2887
|
}
|
|
3532
|
-
|
|
3533
2888
|
return false;
|
|
3534
2889
|
}
|
|
3535
|
-
|
|
3536
2890
|
function isTSOptionalType(node, opts) {
|
|
3537
2891
|
if (!node) return false;
|
|
3538
2892
|
const nodeType = node.type;
|
|
3539
|
-
|
|
3540
2893
|
if (nodeType === "TSOptionalType") {
|
|
3541
2894
|
if (typeof opts === "undefined") {
|
|
3542
2895
|
return true;
|
|
@@ -3544,14 +2897,11 @@ function isTSOptionalType(node, opts) {
|
|
|
3544
2897
|
return (0, _shallowEqual.default)(node, opts);
|
|
3545
2898
|
}
|
|
3546
2899
|
}
|
|
3547
|
-
|
|
3548
2900
|
return false;
|
|
3549
2901
|
}
|
|
3550
|
-
|
|
3551
2902
|
function isTSRestType(node, opts) {
|
|
3552
2903
|
if (!node) return false;
|
|
3553
2904
|
const nodeType = node.type;
|
|
3554
|
-
|
|
3555
2905
|
if (nodeType === "TSRestType") {
|
|
3556
2906
|
if (typeof opts === "undefined") {
|
|
3557
2907
|
return true;
|
|
@@ -3559,14 +2909,11 @@ function isTSRestType(node, opts) {
|
|
|
3559
2909
|
return (0, _shallowEqual.default)(node, opts);
|
|
3560
2910
|
}
|
|
3561
2911
|
}
|
|
3562
|
-
|
|
3563
2912
|
return false;
|
|
3564
2913
|
}
|
|
3565
|
-
|
|
3566
2914
|
function isTSNamedTupleMember(node, opts) {
|
|
3567
2915
|
if (!node) return false;
|
|
3568
2916
|
const nodeType = node.type;
|
|
3569
|
-
|
|
3570
2917
|
if (nodeType === "TSNamedTupleMember") {
|
|
3571
2918
|
if (typeof opts === "undefined") {
|
|
3572
2919
|
return true;
|
|
@@ -3574,14 +2921,11 @@ function isTSNamedTupleMember(node, opts) {
|
|
|
3574
2921
|
return (0, _shallowEqual.default)(node, opts);
|
|
3575
2922
|
}
|
|
3576
2923
|
}
|
|
3577
|
-
|
|
3578
2924
|
return false;
|
|
3579
2925
|
}
|
|
3580
|
-
|
|
3581
2926
|
function isTSUnionType(node, opts) {
|
|
3582
2927
|
if (!node) return false;
|
|
3583
2928
|
const nodeType = node.type;
|
|
3584
|
-
|
|
3585
2929
|
if (nodeType === "TSUnionType") {
|
|
3586
2930
|
if (typeof opts === "undefined") {
|
|
3587
2931
|
return true;
|
|
@@ -3589,14 +2933,11 @@ function isTSUnionType(node, opts) {
|
|
|
3589
2933
|
return (0, _shallowEqual.default)(node, opts);
|
|
3590
2934
|
}
|
|
3591
2935
|
}
|
|
3592
|
-
|
|
3593
2936
|
return false;
|
|
3594
2937
|
}
|
|
3595
|
-
|
|
3596
2938
|
function isTSIntersectionType(node, opts) {
|
|
3597
2939
|
if (!node) return false;
|
|
3598
2940
|
const nodeType = node.type;
|
|
3599
|
-
|
|
3600
2941
|
if (nodeType === "TSIntersectionType") {
|
|
3601
2942
|
if (typeof opts === "undefined") {
|
|
3602
2943
|
return true;
|
|
@@ -3604,14 +2945,11 @@ function isTSIntersectionType(node, opts) {
|
|
|
3604
2945
|
return (0, _shallowEqual.default)(node, opts);
|
|
3605
2946
|
}
|
|
3606
2947
|
}
|
|
3607
|
-
|
|
3608
2948
|
return false;
|
|
3609
2949
|
}
|
|
3610
|
-
|
|
3611
2950
|
function isTSConditionalType(node, opts) {
|
|
3612
2951
|
if (!node) return false;
|
|
3613
2952
|
const nodeType = node.type;
|
|
3614
|
-
|
|
3615
2953
|
if (nodeType === "TSConditionalType") {
|
|
3616
2954
|
if (typeof opts === "undefined") {
|
|
3617
2955
|
return true;
|
|
@@ -3619,14 +2957,11 @@ function isTSConditionalType(node, opts) {
|
|
|
3619
2957
|
return (0, _shallowEqual.default)(node, opts);
|
|
3620
2958
|
}
|
|
3621
2959
|
}
|
|
3622
|
-
|
|
3623
2960
|
return false;
|
|
3624
2961
|
}
|
|
3625
|
-
|
|
3626
2962
|
function isTSInferType(node, opts) {
|
|
3627
2963
|
if (!node) return false;
|
|
3628
2964
|
const nodeType = node.type;
|
|
3629
|
-
|
|
3630
2965
|
if (nodeType === "TSInferType") {
|
|
3631
2966
|
if (typeof opts === "undefined") {
|
|
3632
2967
|
return true;
|
|
@@ -3634,14 +2969,11 @@ function isTSInferType(node, opts) {
|
|
|
3634
2969
|
return (0, _shallowEqual.default)(node, opts);
|
|
3635
2970
|
}
|
|
3636
2971
|
}
|
|
3637
|
-
|
|
3638
2972
|
return false;
|
|
3639
2973
|
}
|
|
3640
|
-
|
|
3641
2974
|
function isTSParenthesizedType(node, opts) {
|
|
3642
2975
|
if (!node) return false;
|
|
3643
2976
|
const nodeType = node.type;
|
|
3644
|
-
|
|
3645
2977
|
if (nodeType === "TSParenthesizedType") {
|
|
3646
2978
|
if (typeof opts === "undefined") {
|
|
3647
2979
|
return true;
|
|
@@ -3649,14 +2981,11 @@ function isTSParenthesizedType(node, opts) {
|
|
|
3649
2981
|
return (0, _shallowEqual.default)(node, opts);
|
|
3650
2982
|
}
|
|
3651
2983
|
}
|
|
3652
|
-
|
|
3653
2984
|
return false;
|
|
3654
2985
|
}
|
|
3655
|
-
|
|
3656
2986
|
function isTSTypeOperator(node, opts) {
|
|
3657
2987
|
if (!node) return false;
|
|
3658
2988
|
const nodeType = node.type;
|
|
3659
|
-
|
|
3660
2989
|
if (nodeType === "TSTypeOperator") {
|
|
3661
2990
|
if (typeof opts === "undefined") {
|
|
3662
2991
|
return true;
|
|
@@ -3664,14 +2993,11 @@ function isTSTypeOperator(node, opts) {
|
|
|
3664
2993
|
return (0, _shallowEqual.default)(node, opts);
|
|
3665
2994
|
}
|
|
3666
2995
|
}
|
|
3667
|
-
|
|
3668
2996
|
return false;
|
|
3669
2997
|
}
|
|
3670
|
-
|
|
3671
2998
|
function isTSIndexedAccessType(node, opts) {
|
|
3672
2999
|
if (!node) return false;
|
|
3673
3000
|
const nodeType = node.type;
|
|
3674
|
-
|
|
3675
3001
|
if (nodeType === "TSIndexedAccessType") {
|
|
3676
3002
|
if (typeof opts === "undefined") {
|
|
3677
3003
|
return true;
|
|
@@ -3679,14 +3005,11 @@ function isTSIndexedAccessType(node, opts) {
|
|
|
3679
3005
|
return (0, _shallowEqual.default)(node, opts);
|
|
3680
3006
|
}
|
|
3681
3007
|
}
|
|
3682
|
-
|
|
3683
3008
|
return false;
|
|
3684
3009
|
}
|
|
3685
|
-
|
|
3686
3010
|
function isTSMappedType(node, opts) {
|
|
3687
3011
|
if (!node) return false;
|
|
3688
3012
|
const nodeType = node.type;
|
|
3689
|
-
|
|
3690
3013
|
if (nodeType === "TSMappedType") {
|
|
3691
3014
|
if (typeof opts === "undefined") {
|
|
3692
3015
|
return true;
|
|
@@ -3694,14 +3017,11 @@ function isTSMappedType(node, opts) {
|
|
|
3694
3017
|
return (0, _shallowEqual.default)(node, opts);
|
|
3695
3018
|
}
|
|
3696
3019
|
}
|
|
3697
|
-
|
|
3698
3020
|
return false;
|
|
3699
3021
|
}
|
|
3700
|
-
|
|
3701
3022
|
function isTSLiteralType(node, opts) {
|
|
3702
3023
|
if (!node) return false;
|
|
3703
3024
|
const nodeType = node.type;
|
|
3704
|
-
|
|
3705
3025
|
if (nodeType === "TSLiteralType") {
|
|
3706
3026
|
if (typeof opts === "undefined") {
|
|
3707
3027
|
return true;
|
|
@@ -3709,14 +3029,11 @@ function isTSLiteralType(node, opts) {
|
|
|
3709
3029
|
return (0, _shallowEqual.default)(node, opts);
|
|
3710
3030
|
}
|
|
3711
3031
|
}
|
|
3712
|
-
|
|
3713
3032
|
return false;
|
|
3714
3033
|
}
|
|
3715
|
-
|
|
3716
3034
|
function isTSExpressionWithTypeArguments(node, opts) {
|
|
3717
3035
|
if (!node) return false;
|
|
3718
3036
|
const nodeType = node.type;
|
|
3719
|
-
|
|
3720
3037
|
if (nodeType === "TSExpressionWithTypeArguments") {
|
|
3721
3038
|
if (typeof opts === "undefined") {
|
|
3722
3039
|
return true;
|
|
@@ -3724,14 +3041,11 @@ function isTSExpressionWithTypeArguments(node, opts) {
|
|
|
3724
3041
|
return (0, _shallowEqual.default)(node, opts);
|
|
3725
3042
|
}
|
|
3726
3043
|
}
|
|
3727
|
-
|
|
3728
3044
|
return false;
|
|
3729
3045
|
}
|
|
3730
|
-
|
|
3731
3046
|
function isTSInterfaceDeclaration(node, opts) {
|
|
3732
3047
|
if (!node) return false;
|
|
3733
3048
|
const nodeType = node.type;
|
|
3734
|
-
|
|
3735
3049
|
if (nodeType === "TSInterfaceDeclaration") {
|
|
3736
3050
|
if (typeof opts === "undefined") {
|
|
3737
3051
|
return true;
|
|
@@ -3739,14 +3053,11 @@ function isTSInterfaceDeclaration(node, opts) {
|
|
|
3739
3053
|
return (0, _shallowEqual.default)(node, opts);
|
|
3740
3054
|
}
|
|
3741
3055
|
}
|
|
3742
|
-
|
|
3743
3056
|
return false;
|
|
3744
3057
|
}
|
|
3745
|
-
|
|
3746
3058
|
function isTSInterfaceBody(node, opts) {
|
|
3747
3059
|
if (!node) return false;
|
|
3748
3060
|
const nodeType = node.type;
|
|
3749
|
-
|
|
3750
3061
|
if (nodeType === "TSInterfaceBody") {
|
|
3751
3062
|
if (typeof opts === "undefined") {
|
|
3752
3063
|
return true;
|
|
@@ -3754,14 +3065,11 @@ function isTSInterfaceBody(node, opts) {
|
|
|
3754
3065
|
return (0, _shallowEqual.default)(node, opts);
|
|
3755
3066
|
}
|
|
3756
3067
|
}
|
|
3757
|
-
|
|
3758
3068
|
return false;
|
|
3759
3069
|
}
|
|
3760
|
-
|
|
3761
3070
|
function isTSTypeAliasDeclaration(node, opts) {
|
|
3762
3071
|
if (!node) return false;
|
|
3763
3072
|
const nodeType = node.type;
|
|
3764
|
-
|
|
3765
3073
|
if (nodeType === "TSTypeAliasDeclaration") {
|
|
3766
3074
|
if (typeof opts === "undefined") {
|
|
3767
3075
|
return true;
|
|
@@ -3769,14 +3077,11 @@ function isTSTypeAliasDeclaration(node, opts) {
|
|
|
3769
3077
|
return (0, _shallowEqual.default)(node, opts);
|
|
3770
3078
|
}
|
|
3771
3079
|
}
|
|
3772
|
-
|
|
3773
3080
|
return false;
|
|
3774
3081
|
}
|
|
3775
|
-
|
|
3776
3082
|
function isTSInstantiationExpression(node, opts) {
|
|
3777
3083
|
if (!node) return false;
|
|
3778
3084
|
const nodeType = node.type;
|
|
3779
|
-
|
|
3780
3085
|
if (nodeType === "TSInstantiationExpression") {
|
|
3781
3086
|
if (typeof opts === "undefined") {
|
|
3782
3087
|
return true;
|
|
@@ -3784,14 +3089,11 @@ function isTSInstantiationExpression(node, opts) {
|
|
|
3784
3089
|
return (0, _shallowEqual.default)(node, opts);
|
|
3785
3090
|
}
|
|
3786
3091
|
}
|
|
3787
|
-
|
|
3788
3092
|
return false;
|
|
3789
3093
|
}
|
|
3790
|
-
|
|
3791
3094
|
function isTSAsExpression(node, opts) {
|
|
3792
3095
|
if (!node) return false;
|
|
3793
3096
|
const nodeType = node.type;
|
|
3794
|
-
|
|
3795
3097
|
if (nodeType === "TSAsExpression") {
|
|
3796
3098
|
if (typeof opts === "undefined") {
|
|
3797
3099
|
return true;
|
|
@@ -3799,14 +3101,11 @@ function isTSAsExpression(node, opts) {
|
|
|
3799
3101
|
return (0, _shallowEqual.default)(node, opts);
|
|
3800
3102
|
}
|
|
3801
3103
|
}
|
|
3802
|
-
|
|
3803
3104
|
return false;
|
|
3804
3105
|
}
|
|
3805
|
-
|
|
3806
3106
|
function isTSSatisfiesExpression(node, opts) {
|
|
3807
3107
|
if (!node) return false;
|
|
3808
3108
|
const nodeType = node.type;
|
|
3809
|
-
|
|
3810
3109
|
if (nodeType === "TSSatisfiesExpression") {
|
|
3811
3110
|
if (typeof opts === "undefined") {
|
|
3812
3111
|
return true;
|
|
@@ -3814,14 +3113,11 @@ function isTSSatisfiesExpression(node, opts) {
|
|
|
3814
3113
|
return (0, _shallowEqual.default)(node, opts);
|
|
3815
3114
|
}
|
|
3816
3115
|
}
|
|
3817
|
-
|
|
3818
3116
|
return false;
|
|
3819
3117
|
}
|
|
3820
|
-
|
|
3821
3118
|
function isTSTypeAssertion(node, opts) {
|
|
3822
3119
|
if (!node) return false;
|
|
3823
3120
|
const nodeType = node.type;
|
|
3824
|
-
|
|
3825
3121
|
if (nodeType === "TSTypeAssertion") {
|
|
3826
3122
|
if (typeof opts === "undefined") {
|
|
3827
3123
|
return true;
|
|
@@ -3829,14 +3125,11 @@ function isTSTypeAssertion(node, opts) {
|
|
|
3829
3125
|
return (0, _shallowEqual.default)(node, opts);
|
|
3830
3126
|
}
|
|
3831
3127
|
}
|
|
3832
|
-
|
|
3833
3128
|
return false;
|
|
3834
3129
|
}
|
|
3835
|
-
|
|
3836
3130
|
function isTSEnumDeclaration(node, opts) {
|
|
3837
3131
|
if (!node) return false;
|
|
3838
3132
|
const nodeType = node.type;
|
|
3839
|
-
|
|
3840
3133
|
if (nodeType === "TSEnumDeclaration") {
|
|
3841
3134
|
if (typeof opts === "undefined") {
|
|
3842
3135
|
return true;
|
|
@@ -3844,14 +3137,11 @@ function isTSEnumDeclaration(node, opts) {
|
|
|
3844
3137
|
return (0, _shallowEqual.default)(node, opts);
|
|
3845
3138
|
}
|
|
3846
3139
|
}
|
|
3847
|
-
|
|
3848
3140
|
return false;
|
|
3849
3141
|
}
|
|
3850
|
-
|
|
3851
3142
|
function isTSEnumMember(node, opts) {
|
|
3852
3143
|
if (!node) return false;
|
|
3853
3144
|
const nodeType = node.type;
|
|
3854
|
-
|
|
3855
3145
|
if (nodeType === "TSEnumMember") {
|
|
3856
3146
|
if (typeof opts === "undefined") {
|
|
3857
3147
|
return true;
|
|
@@ -3859,14 +3149,11 @@ function isTSEnumMember(node, opts) {
|
|
|
3859
3149
|
return (0, _shallowEqual.default)(node, opts);
|
|
3860
3150
|
}
|
|
3861
3151
|
}
|
|
3862
|
-
|
|
3863
3152
|
return false;
|
|
3864
3153
|
}
|
|
3865
|
-
|
|
3866
3154
|
function isTSModuleDeclaration(node, opts) {
|
|
3867
3155
|
if (!node) return false;
|
|
3868
3156
|
const nodeType = node.type;
|
|
3869
|
-
|
|
3870
3157
|
if (nodeType === "TSModuleDeclaration") {
|
|
3871
3158
|
if (typeof opts === "undefined") {
|
|
3872
3159
|
return true;
|
|
@@ -3874,14 +3161,11 @@ function isTSModuleDeclaration(node, opts) {
|
|
|
3874
3161
|
return (0, _shallowEqual.default)(node, opts);
|
|
3875
3162
|
}
|
|
3876
3163
|
}
|
|
3877
|
-
|
|
3878
3164
|
return false;
|
|
3879
3165
|
}
|
|
3880
|
-
|
|
3881
3166
|
function isTSModuleBlock(node, opts) {
|
|
3882
3167
|
if (!node) return false;
|
|
3883
3168
|
const nodeType = node.type;
|
|
3884
|
-
|
|
3885
3169
|
if (nodeType === "TSModuleBlock") {
|
|
3886
3170
|
if (typeof opts === "undefined") {
|
|
3887
3171
|
return true;
|
|
@@ -3889,14 +3173,11 @@ function isTSModuleBlock(node, opts) {
|
|
|
3889
3173
|
return (0, _shallowEqual.default)(node, opts);
|
|
3890
3174
|
}
|
|
3891
3175
|
}
|
|
3892
|
-
|
|
3893
3176
|
return false;
|
|
3894
3177
|
}
|
|
3895
|
-
|
|
3896
3178
|
function isTSImportType(node, opts) {
|
|
3897
3179
|
if (!node) return false;
|
|
3898
3180
|
const nodeType = node.type;
|
|
3899
|
-
|
|
3900
3181
|
if (nodeType === "TSImportType") {
|
|
3901
3182
|
if (typeof opts === "undefined") {
|
|
3902
3183
|
return true;
|
|
@@ -3904,14 +3185,11 @@ function isTSImportType(node, opts) {
|
|
|
3904
3185
|
return (0, _shallowEqual.default)(node, opts);
|
|
3905
3186
|
}
|
|
3906
3187
|
}
|
|
3907
|
-
|
|
3908
3188
|
return false;
|
|
3909
3189
|
}
|
|
3910
|
-
|
|
3911
3190
|
function isTSImportEqualsDeclaration(node, opts) {
|
|
3912
3191
|
if (!node) return false;
|
|
3913
3192
|
const nodeType = node.type;
|
|
3914
|
-
|
|
3915
3193
|
if (nodeType === "TSImportEqualsDeclaration") {
|
|
3916
3194
|
if (typeof opts === "undefined") {
|
|
3917
3195
|
return true;
|
|
@@ -3919,14 +3197,11 @@ function isTSImportEqualsDeclaration(node, opts) {
|
|
|
3919
3197
|
return (0, _shallowEqual.default)(node, opts);
|
|
3920
3198
|
}
|
|
3921
3199
|
}
|
|
3922
|
-
|
|
3923
3200
|
return false;
|
|
3924
3201
|
}
|
|
3925
|
-
|
|
3926
3202
|
function isTSExternalModuleReference(node, opts) {
|
|
3927
3203
|
if (!node) return false;
|
|
3928
3204
|
const nodeType = node.type;
|
|
3929
|
-
|
|
3930
3205
|
if (nodeType === "TSExternalModuleReference") {
|
|
3931
3206
|
if (typeof opts === "undefined") {
|
|
3932
3207
|
return true;
|
|
@@ -3934,14 +3209,11 @@ function isTSExternalModuleReference(node, opts) {
|
|
|
3934
3209
|
return (0, _shallowEqual.default)(node, opts);
|
|
3935
3210
|
}
|
|
3936
3211
|
}
|
|
3937
|
-
|
|
3938
3212
|
return false;
|
|
3939
3213
|
}
|
|
3940
|
-
|
|
3941
3214
|
function isTSNonNullExpression(node, opts) {
|
|
3942
3215
|
if (!node) return false;
|
|
3943
3216
|
const nodeType = node.type;
|
|
3944
|
-
|
|
3945
3217
|
if (nodeType === "TSNonNullExpression") {
|
|
3946
3218
|
if (typeof opts === "undefined") {
|
|
3947
3219
|
return true;
|
|
@@ -3949,14 +3221,11 @@ function isTSNonNullExpression(node, opts) {
|
|
|
3949
3221
|
return (0, _shallowEqual.default)(node, opts);
|
|
3950
3222
|
}
|
|
3951
3223
|
}
|
|
3952
|
-
|
|
3953
3224
|
return false;
|
|
3954
3225
|
}
|
|
3955
|
-
|
|
3956
3226
|
function isTSExportAssignment(node, opts) {
|
|
3957
3227
|
if (!node) return false;
|
|
3958
3228
|
const nodeType = node.type;
|
|
3959
|
-
|
|
3960
3229
|
if (nodeType === "TSExportAssignment") {
|
|
3961
3230
|
if (typeof opts === "undefined") {
|
|
3962
3231
|
return true;
|
|
@@ -3964,14 +3233,11 @@ function isTSExportAssignment(node, opts) {
|
|
|
3964
3233
|
return (0, _shallowEqual.default)(node, opts);
|
|
3965
3234
|
}
|
|
3966
3235
|
}
|
|
3967
|
-
|
|
3968
3236
|
return false;
|
|
3969
3237
|
}
|
|
3970
|
-
|
|
3971
3238
|
function isTSNamespaceExportDeclaration(node, opts) {
|
|
3972
3239
|
if (!node) return false;
|
|
3973
3240
|
const nodeType = node.type;
|
|
3974
|
-
|
|
3975
3241
|
if (nodeType === "TSNamespaceExportDeclaration") {
|
|
3976
3242
|
if (typeof opts === "undefined") {
|
|
3977
3243
|
return true;
|
|
@@ -3979,14 +3245,11 @@ function isTSNamespaceExportDeclaration(node, opts) {
|
|
|
3979
3245
|
return (0, _shallowEqual.default)(node, opts);
|
|
3980
3246
|
}
|
|
3981
3247
|
}
|
|
3982
|
-
|
|
3983
3248
|
return false;
|
|
3984
3249
|
}
|
|
3985
|
-
|
|
3986
3250
|
function isTSTypeAnnotation(node, opts) {
|
|
3987
3251
|
if (!node) return false;
|
|
3988
3252
|
const nodeType = node.type;
|
|
3989
|
-
|
|
3990
3253
|
if (nodeType === "TSTypeAnnotation") {
|
|
3991
3254
|
if (typeof opts === "undefined") {
|
|
3992
3255
|
return true;
|
|
@@ -3994,14 +3257,11 @@ function isTSTypeAnnotation(node, opts) {
|
|
|
3994
3257
|
return (0, _shallowEqual.default)(node, opts);
|
|
3995
3258
|
}
|
|
3996
3259
|
}
|
|
3997
|
-
|
|
3998
3260
|
return false;
|
|
3999
3261
|
}
|
|
4000
|
-
|
|
4001
3262
|
function isTSTypeParameterInstantiation(node, opts) {
|
|
4002
3263
|
if (!node) return false;
|
|
4003
3264
|
const nodeType = node.type;
|
|
4004
|
-
|
|
4005
3265
|
if (nodeType === "TSTypeParameterInstantiation") {
|
|
4006
3266
|
if (typeof opts === "undefined") {
|
|
4007
3267
|
return true;
|
|
@@ -4009,14 +3269,11 @@ function isTSTypeParameterInstantiation(node, opts) {
|
|
|
4009
3269
|
return (0, _shallowEqual.default)(node, opts);
|
|
4010
3270
|
}
|
|
4011
3271
|
}
|
|
4012
|
-
|
|
4013
3272
|
return false;
|
|
4014
3273
|
}
|
|
4015
|
-
|
|
4016
3274
|
function isTSTypeParameterDeclaration(node, opts) {
|
|
4017
3275
|
if (!node) return false;
|
|
4018
3276
|
const nodeType = node.type;
|
|
4019
|
-
|
|
4020
3277
|
if (nodeType === "TSTypeParameterDeclaration") {
|
|
4021
3278
|
if (typeof opts === "undefined") {
|
|
4022
3279
|
return true;
|
|
@@ -4024,14 +3281,11 @@ function isTSTypeParameterDeclaration(node, opts) {
|
|
|
4024
3281
|
return (0, _shallowEqual.default)(node, opts);
|
|
4025
3282
|
}
|
|
4026
3283
|
}
|
|
4027
|
-
|
|
4028
3284
|
return false;
|
|
4029
3285
|
}
|
|
4030
|
-
|
|
4031
3286
|
function isTSTypeParameter(node, opts) {
|
|
4032
3287
|
if (!node) return false;
|
|
4033
3288
|
const nodeType = node.type;
|
|
4034
|
-
|
|
4035
3289
|
if (nodeType === "TSTypeParameter") {
|
|
4036
3290
|
if (typeof opts === "undefined") {
|
|
4037
3291
|
return true;
|
|
@@ -4039,14 +3293,11 @@ function isTSTypeParameter(node, opts) {
|
|
|
4039
3293
|
return (0, _shallowEqual.default)(node, opts);
|
|
4040
3294
|
}
|
|
4041
3295
|
}
|
|
4042
|
-
|
|
4043
3296
|
return false;
|
|
4044
3297
|
}
|
|
4045
|
-
|
|
4046
3298
|
function isStandardized(node, opts) {
|
|
4047
3299
|
if (!node) return false;
|
|
4048
3300
|
const nodeType = node.type;
|
|
4049
|
-
|
|
4050
3301
|
if ("ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "InterpreterDirective" === nodeType || "Directive" === nodeType || "DirectiveLiteral" === nodeType || "BlockStatement" === nodeType || "BreakStatement" === nodeType || "CallExpression" === nodeType || "CatchClause" === nodeType || "ConditionalExpression" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "File" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "Program" === nodeType || "ObjectExpression" === nodeType || "ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "RestElement" === nodeType || "ReturnStatement" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "SwitchCase" === nodeType || "SwitchStatement" === nodeType || "ThisExpression" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "VariableDeclaration" === nodeType || "VariableDeclarator" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassBody" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ExportSpecifier" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "MetaProperty" === nodeType || "ClassMethod" === nodeType || "ObjectPattern" === nodeType || "SpreadElement" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateElement" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType || "Import" === nodeType || "BigIntLiteral" === nodeType || "ExportNamespaceSpecifier" === nodeType || "OptionalMemberExpression" === nodeType || "OptionalCallExpression" === nodeType || "ClassProperty" === nodeType || "ClassAccessorProperty" === nodeType || "ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType || "StaticBlock" === nodeType || nodeType === "Placeholder" && ("Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode || "BlockStatement" === node.expectedNode || "ClassBody" === node.expectedNode)) {
|
|
4051
3302
|
if (typeof opts === "undefined") {
|
|
4052
3303
|
return true;
|
|
@@ -4054,14 +3305,11 @@ function isStandardized(node, opts) {
|
|
|
4054
3305
|
return (0, _shallowEqual.default)(node, opts);
|
|
4055
3306
|
}
|
|
4056
3307
|
}
|
|
4057
|
-
|
|
4058
3308
|
return false;
|
|
4059
3309
|
}
|
|
4060
|
-
|
|
4061
3310
|
function isExpression(node, opts) {
|
|
4062
3311
|
if (!node) return false;
|
|
4063
3312
|
const nodeType = node.type;
|
|
4064
|
-
|
|
4065
3313
|
if ("ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType || "Import" === nodeType || "BigIntLiteral" === nodeType || "OptionalMemberExpression" === nodeType || "OptionalCallExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "BindExpression" === nodeType || "DoExpression" === nodeType || "RecordExpression" === nodeType || "TupleExpression" === nodeType || "DecimalLiteral" === nodeType || "ModuleExpression" === nodeType || "TopicReference" === nodeType || "PipelineTopicExpression" === nodeType || "PipelineBareFunction" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "TSInstantiationExpression" === nodeType || "TSAsExpression" === nodeType || "TSSatisfiesExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) {
|
|
4066
3314
|
if (typeof opts === "undefined") {
|
|
4067
3315
|
return true;
|
|
@@ -4069,14 +3317,11 @@ function isExpression(node, opts) {
|
|
|
4069
3317
|
return (0, _shallowEqual.default)(node, opts);
|
|
4070
3318
|
}
|
|
4071
3319
|
}
|
|
4072
|
-
|
|
4073
3320
|
return false;
|
|
4074
3321
|
}
|
|
4075
|
-
|
|
4076
3322
|
function isBinary(node, opts) {
|
|
4077
3323
|
if (!node) return false;
|
|
4078
3324
|
const nodeType = node.type;
|
|
4079
|
-
|
|
4080
3325
|
if ("BinaryExpression" === nodeType || "LogicalExpression" === nodeType) {
|
|
4081
3326
|
if (typeof opts === "undefined") {
|
|
4082
3327
|
return true;
|
|
@@ -4084,14 +3329,11 @@ function isBinary(node, opts) {
|
|
|
4084
3329
|
return (0, _shallowEqual.default)(node, opts);
|
|
4085
3330
|
}
|
|
4086
3331
|
}
|
|
4087
|
-
|
|
4088
3332
|
return false;
|
|
4089
3333
|
}
|
|
4090
|
-
|
|
4091
3334
|
function isScopable(node, opts) {
|
|
4092
3335
|
if (!node) return false;
|
|
4093
3336
|
const nodeType = node.type;
|
|
4094
|
-
|
|
4095
3337
|
if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
|
|
4096
3338
|
if (typeof opts === "undefined") {
|
|
4097
3339
|
return true;
|
|
@@ -4099,14 +3341,11 @@ function isScopable(node, opts) {
|
|
|
4099
3341
|
return (0, _shallowEqual.default)(node, opts);
|
|
4100
3342
|
}
|
|
4101
3343
|
}
|
|
4102
|
-
|
|
4103
3344
|
return false;
|
|
4104
3345
|
}
|
|
4105
|
-
|
|
4106
3346
|
function isBlockParent(node, opts) {
|
|
4107
3347
|
if (!node) return false;
|
|
4108
3348
|
const nodeType = node.type;
|
|
4109
|
-
|
|
4110
3349
|
if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
|
|
4111
3350
|
if (typeof opts === "undefined") {
|
|
4112
3351
|
return true;
|
|
@@ -4114,14 +3353,11 @@ function isBlockParent(node, opts) {
|
|
|
4114
3353
|
return (0, _shallowEqual.default)(node, opts);
|
|
4115
3354
|
}
|
|
4116
3355
|
}
|
|
4117
|
-
|
|
4118
3356
|
return false;
|
|
4119
3357
|
}
|
|
4120
|
-
|
|
4121
3358
|
function isBlock(node, opts) {
|
|
4122
3359
|
if (!node) return false;
|
|
4123
3360
|
const nodeType = node.type;
|
|
4124
|
-
|
|
4125
3361
|
if ("BlockStatement" === nodeType || "Program" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
|
|
4126
3362
|
if (typeof opts === "undefined") {
|
|
4127
3363
|
return true;
|
|
@@ -4129,14 +3365,11 @@ function isBlock(node, opts) {
|
|
|
4129
3365
|
return (0, _shallowEqual.default)(node, opts);
|
|
4130
3366
|
}
|
|
4131
3367
|
}
|
|
4132
|
-
|
|
4133
3368
|
return false;
|
|
4134
3369
|
}
|
|
4135
|
-
|
|
4136
3370
|
function isStatement(node, opts) {
|
|
4137
3371
|
if (!node) return false;
|
|
4138
3372
|
const nodeType = node.type;
|
|
4139
|
-
|
|
4140
3373
|
if ("BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node.expectedNode || "Declaration" === node.expectedNode || "BlockStatement" === node.expectedNode)) {
|
|
4141
3374
|
if (typeof opts === "undefined") {
|
|
4142
3375
|
return true;
|
|
@@ -4144,14 +3377,11 @@ function isStatement(node, opts) {
|
|
|
4144
3377
|
return (0, _shallowEqual.default)(node, opts);
|
|
4145
3378
|
}
|
|
4146
3379
|
}
|
|
4147
|
-
|
|
4148
3380
|
return false;
|
|
4149
3381
|
}
|
|
4150
|
-
|
|
4151
3382
|
function isTerminatorless(node, opts) {
|
|
4152
3383
|
if (!node) return false;
|
|
4153
3384
|
const nodeType = node.type;
|
|
4154
|
-
|
|
4155
3385
|
if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) {
|
|
4156
3386
|
if (typeof opts === "undefined") {
|
|
4157
3387
|
return true;
|
|
@@ -4159,14 +3389,11 @@ function isTerminatorless(node, opts) {
|
|
|
4159
3389
|
return (0, _shallowEqual.default)(node, opts);
|
|
4160
3390
|
}
|
|
4161
3391
|
}
|
|
4162
|
-
|
|
4163
3392
|
return false;
|
|
4164
3393
|
}
|
|
4165
|
-
|
|
4166
3394
|
function isCompletionStatement(node, opts) {
|
|
4167
3395
|
if (!node) return false;
|
|
4168
3396
|
const nodeType = node.type;
|
|
4169
|
-
|
|
4170
3397
|
if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) {
|
|
4171
3398
|
if (typeof opts === "undefined") {
|
|
4172
3399
|
return true;
|
|
@@ -4174,14 +3401,11 @@ function isCompletionStatement(node, opts) {
|
|
|
4174
3401
|
return (0, _shallowEqual.default)(node, opts);
|
|
4175
3402
|
}
|
|
4176
3403
|
}
|
|
4177
|
-
|
|
4178
3404
|
return false;
|
|
4179
3405
|
}
|
|
4180
|
-
|
|
4181
3406
|
function isConditional(node, opts) {
|
|
4182
3407
|
if (!node) return false;
|
|
4183
3408
|
const nodeType = node.type;
|
|
4184
|
-
|
|
4185
3409
|
if ("ConditionalExpression" === nodeType || "IfStatement" === nodeType) {
|
|
4186
3410
|
if (typeof opts === "undefined") {
|
|
4187
3411
|
return true;
|
|
@@ -4189,14 +3413,11 @@ function isConditional(node, opts) {
|
|
|
4189
3413
|
return (0, _shallowEqual.default)(node, opts);
|
|
4190
3414
|
}
|
|
4191
3415
|
}
|
|
4192
|
-
|
|
4193
3416
|
return false;
|
|
4194
3417
|
}
|
|
4195
|
-
|
|
4196
3418
|
function isLoop(node, opts) {
|
|
4197
3419
|
if (!node) return false;
|
|
4198
3420
|
const nodeType = node.type;
|
|
4199
|
-
|
|
4200
3421
|
if ("DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) {
|
|
4201
3422
|
if (typeof opts === "undefined") {
|
|
4202
3423
|
return true;
|
|
@@ -4204,14 +3425,11 @@ function isLoop(node, opts) {
|
|
|
4204
3425
|
return (0, _shallowEqual.default)(node, opts);
|
|
4205
3426
|
}
|
|
4206
3427
|
}
|
|
4207
|
-
|
|
4208
3428
|
return false;
|
|
4209
3429
|
}
|
|
4210
|
-
|
|
4211
3430
|
function isWhile(node, opts) {
|
|
4212
3431
|
if (!node) return false;
|
|
4213
3432
|
const nodeType = node.type;
|
|
4214
|
-
|
|
4215
3433
|
if ("DoWhileStatement" === nodeType || "WhileStatement" === nodeType) {
|
|
4216
3434
|
if (typeof opts === "undefined") {
|
|
4217
3435
|
return true;
|
|
@@ -4219,14 +3437,11 @@ function isWhile(node, opts) {
|
|
|
4219
3437
|
return (0, _shallowEqual.default)(node, opts);
|
|
4220
3438
|
}
|
|
4221
3439
|
}
|
|
4222
|
-
|
|
4223
3440
|
return false;
|
|
4224
3441
|
}
|
|
4225
|
-
|
|
4226
3442
|
function isExpressionWrapper(node, opts) {
|
|
4227
3443
|
if (!node) return false;
|
|
4228
3444
|
const nodeType = node.type;
|
|
4229
|
-
|
|
4230
3445
|
if ("ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) {
|
|
4231
3446
|
if (typeof opts === "undefined") {
|
|
4232
3447
|
return true;
|
|
@@ -4234,14 +3449,11 @@ function isExpressionWrapper(node, opts) {
|
|
|
4234
3449
|
return (0, _shallowEqual.default)(node, opts);
|
|
4235
3450
|
}
|
|
4236
3451
|
}
|
|
4237
|
-
|
|
4238
3452
|
return false;
|
|
4239
3453
|
}
|
|
4240
|
-
|
|
4241
3454
|
function isFor(node, opts) {
|
|
4242
3455
|
if (!node) return false;
|
|
4243
3456
|
const nodeType = node.type;
|
|
4244
|
-
|
|
4245
3457
|
if ("ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) {
|
|
4246
3458
|
if (typeof opts === "undefined") {
|
|
4247
3459
|
return true;
|
|
@@ -4249,14 +3461,11 @@ function isFor(node, opts) {
|
|
|
4249
3461
|
return (0, _shallowEqual.default)(node, opts);
|
|
4250
3462
|
}
|
|
4251
3463
|
}
|
|
4252
|
-
|
|
4253
3464
|
return false;
|
|
4254
3465
|
}
|
|
4255
|
-
|
|
4256
3466
|
function isForXStatement(node, opts) {
|
|
4257
3467
|
if (!node) return false;
|
|
4258
3468
|
const nodeType = node.type;
|
|
4259
|
-
|
|
4260
3469
|
if ("ForInStatement" === nodeType || "ForOfStatement" === nodeType) {
|
|
4261
3470
|
if (typeof opts === "undefined") {
|
|
4262
3471
|
return true;
|
|
@@ -4264,14 +3473,11 @@ function isForXStatement(node, opts) {
|
|
|
4264
3473
|
return (0, _shallowEqual.default)(node, opts);
|
|
4265
3474
|
}
|
|
4266
3475
|
}
|
|
4267
|
-
|
|
4268
3476
|
return false;
|
|
4269
3477
|
}
|
|
4270
|
-
|
|
4271
3478
|
function isFunction(node, opts) {
|
|
4272
3479
|
if (!node) return false;
|
|
4273
3480
|
const nodeType = node.type;
|
|
4274
|
-
|
|
4275
3481
|
if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
|
|
4276
3482
|
if (typeof opts === "undefined") {
|
|
4277
3483
|
return true;
|
|
@@ -4279,14 +3485,11 @@ function isFunction(node, opts) {
|
|
|
4279
3485
|
return (0, _shallowEqual.default)(node, opts);
|
|
4280
3486
|
}
|
|
4281
3487
|
}
|
|
4282
|
-
|
|
4283
3488
|
return false;
|
|
4284
3489
|
}
|
|
4285
|
-
|
|
4286
3490
|
function isFunctionParent(node, opts) {
|
|
4287
3491
|
if (!node) return false;
|
|
4288
3492
|
const nodeType = node.type;
|
|
4289
|
-
|
|
4290
3493
|
if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType) {
|
|
4291
3494
|
if (typeof opts === "undefined") {
|
|
4292
3495
|
return true;
|
|
@@ -4294,14 +3497,11 @@ function isFunctionParent(node, opts) {
|
|
|
4294
3497
|
return (0, _shallowEqual.default)(node, opts);
|
|
4295
3498
|
}
|
|
4296
3499
|
}
|
|
4297
|
-
|
|
4298
3500
|
return false;
|
|
4299
3501
|
}
|
|
4300
|
-
|
|
4301
3502
|
function isPureish(node, opts) {
|
|
4302
3503
|
if (!node) return false;
|
|
4303
3504
|
const nodeType = node.type;
|
|
4304
|
-
|
|
4305
3505
|
if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
|
|
4306
3506
|
if (typeof opts === "undefined") {
|
|
4307
3507
|
return true;
|
|
@@ -4309,14 +3509,11 @@ function isPureish(node, opts) {
|
|
|
4309
3509
|
return (0, _shallowEqual.default)(node, opts);
|
|
4310
3510
|
}
|
|
4311
3511
|
}
|
|
4312
|
-
|
|
4313
3512
|
return false;
|
|
4314
3513
|
}
|
|
4315
|
-
|
|
4316
3514
|
function isDeclaration(node, opts) {
|
|
4317
3515
|
if (!node) return false;
|
|
4318
3516
|
const nodeType = node.type;
|
|
4319
|
-
|
|
4320
3517
|
if ("FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node.expectedNode) {
|
|
4321
3518
|
if (typeof opts === "undefined") {
|
|
4322
3519
|
return true;
|
|
@@ -4324,14 +3521,11 @@ function isDeclaration(node, opts) {
|
|
|
4324
3521
|
return (0, _shallowEqual.default)(node, opts);
|
|
4325
3522
|
}
|
|
4326
3523
|
}
|
|
4327
|
-
|
|
4328
3524
|
return false;
|
|
4329
3525
|
}
|
|
4330
|
-
|
|
4331
3526
|
function isPatternLike(node, opts) {
|
|
4332
3527
|
if (!node) return false;
|
|
4333
3528
|
const nodeType = node.type;
|
|
4334
|
-
|
|
4335
3529
|
if ("Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSAsExpression" === nodeType || "TSSatisfiesExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
|
|
4336
3530
|
if (typeof opts === "undefined") {
|
|
4337
3531
|
return true;
|
|
@@ -4339,14 +3533,11 @@ function isPatternLike(node, opts) {
|
|
|
4339
3533
|
return (0, _shallowEqual.default)(node, opts);
|
|
4340
3534
|
}
|
|
4341
3535
|
}
|
|
4342
|
-
|
|
4343
3536
|
return false;
|
|
4344
3537
|
}
|
|
4345
|
-
|
|
4346
3538
|
function isLVal(node, opts) {
|
|
4347
3539
|
if (!node) return false;
|
|
4348
3540
|
const nodeType = node.type;
|
|
4349
|
-
|
|
4350
3541
|
if ("Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || "TSAsExpression" === nodeType || "TSSatisfiesExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
|
|
4351
3542
|
if (typeof opts === "undefined") {
|
|
4352
3543
|
return true;
|
|
@@ -4354,14 +3545,11 @@ function isLVal(node, opts) {
|
|
|
4354
3545
|
return (0, _shallowEqual.default)(node, opts);
|
|
4355
3546
|
}
|
|
4356
3547
|
}
|
|
4357
|
-
|
|
4358
3548
|
return false;
|
|
4359
3549
|
}
|
|
4360
|
-
|
|
4361
3550
|
function isTSEntityName(node, opts) {
|
|
4362
3551
|
if (!node) return false;
|
|
4363
3552
|
const nodeType = node.type;
|
|
4364
|
-
|
|
4365
3553
|
if ("Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) {
|
|
4366
3554
|
if (typeof opts === "undefined") {
|
|
4367
3555
|
return true;
|
|
@@ -4369,14 +3557,11 @@ function isTSEntityName(node, opts) {
|
|
|
4369
3557
|
return (0, _shallowEqual.default)(node, opts);
|
|
4370
3558
|
}
|
|
4371
3559
|
}
|
|
4372
|
-
|
|
4373
3560
|
return false;
|
|
4374
3561
|
}
|
|
4375
|
-
|
|
4376
3562
|
function isLiteral(node, opts) {
|
|
4377
3563
|
if (!node) return false;
|
|
4378
3564
|
const nodeType = node.type;
|
|
4379
|
-
|
|
4380
3565
|
if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
|
|
4381
3566
|
if (typeof opts === "undefined") {
|
|
4382
3567
|
return true;
|
|
@@ -4384,14 +3569,11 @@ function isLiteral(node, opts) {
|
|
|
4384
3569
|
return (0, _shallowEqual.default)(node, opts);
|
|
4385
3570
|
}
|
|
4386
3571
|
}
|
|
4387
|
-
|
|
4388
3572
|
return false;
|
|
4389
3573
|
}
|
|
4390
|
-
|
|
4391
3574
|
function isImmutable(node, opts) {
|
|
4392
3575
|
if (!node) return false;
|
|
4393
3576
|
const nodeType = node.type;
|
|
4394
|
-
|
|
4395
3577
|
if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "BigIntLiteral" === nodeType || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXOpeningElement" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
|
|
4396
3578
|
if (typeof opts === "undefined") {
|
|
4397
3579
|
return true;
|
|
@@ -4399,14 +3581,11 @@ function isImmutable(node, opts) {
|
|
|
4399
3581
|
return (0, _shallowEqual.default)(node, opts);
|
|
4400
3582
|
}
|
|
4401
3583
|
}
|
|
4402
|
-
|
|
4403
3584
|
return false;
|
|
4404
3585
|
}
|
|
4405
|
-
|
|
4406
3586
|
function isUserWhitespacable(node, opts) {
|
|
4407
3587
|
if (!node) return false;
|
|
4408
3588
|
const nodeType = node.type;
|
|
4409
|
-
|
|
4410
3589
|
if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) {
|
|
4411
3590
|
if (typeof opts === "undefined") {
|
|
4412
3591
|
return true;
|
|
@@ -4414,14 +3593,11 @@ function isUserWhitespacable(node, opts) {
|
|
|
4414
3593
|
return (0, _shallowEqual.default)(node, opts);
|
|
4415
3594
|
}
|
|
4416
3595
|
}
|
|
4417
|
-
|
|
4418
3596
|
return false;
|
|
4419
3597
|
}
|
|
4420
|
-
|
|
4421
3598
|
function isMethod(node, opts) {
|
|
4422
3599
|
if (!node) return false;
|
|
4423
3600
|
const nodeType = node.type;
|
|
4424
|
-
|
|
4425
3601
|
if ("ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
|
|
4426
3602
|
if (typeof opts === "undefined") {
|
|
4427
3603
|
return true;
|
|
@@ -4429,14 +3605,11 @@ function isMethod(node, opts) {
|
|
|
4429
3605
|
return (0, _shallowEqual.default)(node, opts);
|
|
4430
3606
|
}
|
|
4431
3607
|
}
|
|
4432
|
-
|
|
4433
3608
|
return false;
|
|
4434
3609
|
}
|
|
4435
|
-
|
|
4436
3610
|
function isObjectMember(node, opts) {
|
|
4437
3611
|
if (!node) return false;
|
|
4438
3612
|
const nodeType = node.type;
|
|
4439
|
-
|
|
4440
3613
|
if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType) {
|
|
4441
3614
|
if (typeof opts === "undefined") {
|
|
4442
3615
|
return true;
|
|
@@ -4444,14 +3617,11 @@ function isObjectMember(node, opts) {
|
|
|
4444
3617
|
return (0, _shallowEqual.default)(node, opts);
|
|
4445
3618
|
}
|
|
4446
3619
|
}
|
|
4447
|
-
|
|
4448
3620
|
return false;
|
|
4449
3621
|
}
|
|
4450
|
-
|
|
4451
3622
|
function isProperty(node, opts) {
|
|
4452
3623
|
if (!node) return false;
|
|
4453
3624
|
const nodeType = node.type;
|
|
4454
|
-
|
|
4455
3625
|
if ("ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassAccessorProperty" === nodeType || "ClassPrivateProperty" === nodeType) {
|
|
4456
3626
|
if (typeof opts === "undefined") {
|
|
4457
3627
|
return true;
|
|
@@ -4459,14 +3629,11 @@ function isProperty(node, opts) {
|
|
|
4459
3629
|
return (0, _shallowEqual.default)(node, opts);
|
|
4460
3630
|
}
|
|
4461
3631
|
}
|
|
4462
|
-
|
|
4463
3632
|
return false;
|
|
4464
3633
|
}
|
|
4465
|
-
|
|
4466
3634
|
function isUnaryLike(node, opts) {
|
|
4467
3635
|
if (!node) return false;
|
|
4468
3636
|
const nodeType = node.type;
|
|
4469
|
-
|
|
4470
3637
|
if ("UnaryExpression" === nodeType || "SpreadElement" === nodeType) {
|
|
4471
3638
|
if (typeof opts === "undefined") {
|
|
4472
3639
|
return true;
|
|
@@ -4474,14 +3641,11 @@ function isUnaryLike(node, opts) {
|
|
|
4474
3641
|
return (0, _shallowEqual.default)(node, opts);
|
|
4475
3642
|
}
|
|
4476
3643
|
}
|
|
4477
|
-
|
|
4478
3644
|
return false;
|
|
4479
3645
|
}
|
|
4480
|
-
|
|
4481
3646
|
function isPattern(node, opts) {
|
|
4482
3647
|
if (!node) return false;
|
|
4483
3648
|
const nodeType = node.type;
|
|
4484
|
-
|
|
4485
3649
|
if ("AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) {
|
|
4486
3650
|
if (typeof opts === "undefined") {
|
|
4487
3651
|
return true;
|
|
@@ -4489,14 +3653,11 @@ function isPattern(node, opts) {
|
|
|
4489
3653
|
return (0, _shallowEqual.default)(node, opts);
|
|
4490
3654
|
}
|
|
4491
3655
|
}
|
|
4492
|
-
|
|
4493
3656
|
return false;
|
|
4494
3657
|
}
|
|
4495
|
-
|
|
4496
3658
|
function isClass(node, opts) {
|
|
4497
3659
|
if (!node) return false;
|
|
4498
3660
|
const nodeType = node.type;
|
|
4499
|
-
|
|
4500
3661
|
if ("ClassExpression" === nodeType || "ClassDeclaration" === nodeType) {
|
|
4501
3662
|
if (typeof opts === "undefined") {
|
|
4502
3663
|
return true;
|
|
@@ -4504,14 +3665,11 @@ function isClass(node, opts) {
|
|
|
4504
3665
|
return (0, _shallowEqual.default)(node, opts);
|
|
4505
3666
|
}
|
|
4506
3667
|
}
|
|
4507
|
-
|
|
4508
3668
|
return false;
|
|
4509
3669
|
}
|
|
4510
|
-
|
|
4511
3670
|
function isModuleDeclaration(node, opts) {
|
|
4512
3671
|
if (!node) return false;
|
|
4513
3672
|
const nodeType = node.type;
|
|
4514
|
-
|
|
4515
3673
|
if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) {
|
|
4516
3674
|
if (typeof opts === "undefined") {
|
|
4517
3675
|
return true;
|
|
@@ -4519,14 +3677,11 @@ function isModuleDeclaration(node, opts) {
|
|
|
4519
3677
|
return (0, _shallowEqual.default)(node, opts);
|
|
4520
3678
|
}
|
|
4521
3679
|
}
|
|
4522
|
-
|
|
4523
3680
|
return false;
|
|
4524
3681
|
}
|
|
4525
|
-
|
|
4526
3682
|
function isExportDeclaration(node, opts) {
|
|
4527
3683
|
if (!node) return false;
|
|
4528
3684
|
const nodeType = node.type;
|
|
4529
|
-
|
|
4530
3685
|
if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) {
|
|
4531
3686
|
if (typeof opts === "undefined") {
|
|
4532
3687
|
return true;
|
|
@@ -4534,14 +3689,11 @@ function isExportDeclaration(node, opts) {
|
|
|
4534
3689
|
return (0, _shallowEqual.default)(node, opts);
|
|
4535
3690
|
}
|
|
4536
3691
|
}
|
|
4537
|
-
|
|
4538
3692
|
return false;
|
|
4539
3693
|
}
|
|
4540
|
-
|
|
4541
3694
|
function isModuleSpecifier(node, opts) {
|
|
4542
3695
|
if (!node) return false;
|
|
4543
3696
|
const nodeType = node.type;
|
|
4544
|
-
|
|
4545
3697
|
if ("ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType) {
|
|
4546
3698
|
if (typeof opts === "undefined") {
|
|
4547
3699
|
return true;
|
|
@@ -4549,14 +3701,11 @@ function isModuleSpecifier(node, opts) {
|
|
|
4549
3701
|
return (0, _shallowEqual.default)(node, opts);
|
|
4550
3702
|
}
|
|
4551
3703
|
}
|
|
4552
|
-
|
|
4553
3704
|
return false;
|
|
4554
3705
|
}
|
|
4555
|
-
|
|
4556
3706
|
function isAccessor(node, opts) {
|
|
4557
3707
|
if (!node) return false;
|
|
4558
3708
|
const nodeType = node.type;
|
|
4559
|
-
|
|
4560
3709
|
if ("ClassAccessorProperty" === nodeType) {
|
|
4561
3710
|
if (typeof opts === "undefined") {
|
|
4562
3711
|
return true;
|
|
@@ -4564,14 +3713,11 @@ function isAccessor(node, opts) {
|
|
|
4564
3713
|
return (0, _shallowEqual.default)(node, opts);
|
|
4565
3714
|
}
|
|
4566
3715
|
}
|
|
4567
|
-
|
|
4568
3716
|
return false;
|
|
4569
3717
|
}
|
|
4570
|
-
|
|
4571
3718
|
function isPrivate(node, opts) {
|
|
4572
3719
|
if (!node) return false;
|
|
4573
3720
|
const nodeType = node.type;
|
|
4574
|
-
|
|
4575
3721
|
if ("ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) {
|
|
4576
3722
|
if (typeof opts === "undefined") {
|
|
4577
3723
|
return true;
|
|
@@ -4579,14 +3725,11 @@ function isPrivate(node, opts) {
|
|
|
4579
3725
|
return (0, _shallowEqual.default)(node, opts);
|
|
4580
3726
|
}
|
|
4581
3727
|
}
|
|
4582
|
-
|
|
4583
3728
|
return false;
|
|
4584
3729
|
}
|
|
4585
|
-
|
|
4586
3730
|
function isFlow(node, opts) {
|
|
4587
3731
|
if (!node) return false;
|
|
4588
3732
|
const nodeType = node.type;
|
|
4589
|
-
|
|
4590
3733
|
if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType || "EnumDeclaration" === nodeType || "EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType || "EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
|
|
4591
3734
|
if (typeof opts === "undefined") {
|
|
4592
3735
|
return true;
|
|
@@ -4594,14 +3737,11 @@ function isFlow(node, opts) {
|
|
|
4594
3737
|
return (0, _shallowEqual.default)(node, opts);
|
|
4595
3738
|
}
|
|
4596
3739
|
}
|
|
4597
|
-
|
|
4598
3740
|
return false;
|
|
4599
3741
|
}
|
|
4600
|
-
|
|
4601
3742
|
function isFlowType(node, opts) {
|
|
4602
3743
|
if (!node) return false;
|
|
4603
3744
|
const nodeType = node.type;
|
|
4604
|
-
|
|
4605
3745
|
if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
|
|
4606
3746
|
if (typeof opts === "undefined") {
|
|
4607
3747
|
return true;
|
|
@@ -4609,14 +3749,11 @@ function isFlowType(node, opts) {
|
|
|
4609
3749
|
return (0, _shallowEqual.default)(node, opts);
|
|
4610
3750
|
}
|
|
4611
3751
|
}
|
|
4612
|
-
|
|
4613
3752
|
return false;
|
|
4614
3753
|
}
|
|
4615
|
-
|
|
4616
3754
|
function isFlowBaseAnnotation(node, opts) {
|
|
4617
3755
|
if (!node) return false;
|
|
4618
3756
|
const nodeType = node.type;
|
|
4619
|
-
|
|
4620
3757
|
if ("AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) {
|
|
4621
3758
|
if (typeof opts === "undefined") {
|
|
4622
3759
|
return true;
|
|
@@ -4624,14 +3761,11 @@ function isFlowBaseAnnotation(node, opts) {
|
|
|
4624
3761
|
return (0, _shallowEqual.default)(node, opts);
|
|
4625
3762
|
}
|
|
4626
3763
|
}
|
|
4627
|
-
|
|
4628
3764
|
return false;
|
|
4629
3765
|
}
|
|
4630
|
-
|
|
4631
3766
|
function isFlowDeclaration(node, opts) {
|
|
4632
3767
|
if (!node) return false;
|
|
4633
3768
|
const nodeType = node.type;
|
|
4634
|
-
|
|
4635
3769
|
if ("DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) {
|
|
4636
3770
|
if (typeof opts === "undefined") {
|
|
4637
3771
|
return true;
|
|
@@ -4639,14 +3773,11 @@ function isFlowDeclaration(node, opts) {
|
|
|
4639
3773
|
return (0, _shallowEqual.default)(node, opts);
|
|
4640
3774
|
}
|
|
4641
3775
|
}
|
|
4642
|
-
|
|
4643
3776
|
return false;
|
|
4644
3777
|
}
|
|
4645
|
-
|
|
4646
3778
|
function isFlowPredicate(node, opts) {
|
|
4647
3779
|
if (!node) return false;
|
|
4648
3780
|
const nodeType = node.type;
|
|
4649
|
-
|
|
4650
3781
|
if ("DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) {
|
|
4651
3782
|
if (typeof opts === "undefined") {
|
|
4652
3783
|
return true;
|
|
@@ -4654,14 +3785,11 @@ function isFlowPredicate(node, opts) {
|
|
|
4654
3785
|
return (0, _shallowEqual.default)(node, opts);
|
|
4655
3786
|
}
|
|
4656
3787
|
}
|
|
4657
|
-
|
|
4658
3788
|
return false;
|
|
4659
3789
|
}
|
|
4660
|
-
|
|
4661
3790
|
function isEnumBody(node, opts) {
|
|
4662
3791
|
if (!node) return false;
|
|
4663
3792
|
const nodeType = node.type;
|
|
4664
|
-
|
|
4665
3793
|
if ("EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType) {
|
|
4666
3794
|
if (typeof opts === "undefined") {
|
|
4667
3795
|
return true;
|
|
@@ -4669,14 +3797,11 @@ function isEnumBody(node, opts) {
|
|
|
4669
3797
|
return (0, _shallowEqual.default)(node, opts);
|
|
4670
3798
|
}
|
|
4671
3799
|
}
|
|
4672
|
-
|
|
4673
3800
|
return false;
|
|
4674
3801
|
}
|
|
4675
|
-
|
|
4676
3802
|
function isEnumMember(node, opts) {
|
|
4677
3803
|
if (!node) return false;
|
|
4678
3804
|
const nodeType = node.type;
|
|
4679
|
-
|
|
4680
3805
|
if ("EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType) {
|
|
4681
3806
|
if (typeof opts === "undefined") {
|
|
4682
3807
|
return true;
|
|
@@ -4684,14 +3809,11 @@ function isEnumMember(node, opts) {
|
|
|
4684
3809
|
return (0, _shallowEqual.default)(node, opts);
|
|
4685
3810
|
}
|
|
4686
3811
|
}
|
|
4687
|
-
|
|
4688
3812
|
return false;
|
|
4689
3813
|
}
|
|
4690
|
-
|
|
4691
3814
|
function isJSX(node, opts) {
|
|
4692
3815
|
if (!node) return false;
|
|
4693
3816
|
const nodeType = node.type;
|
|
4694
|
-
|
|
4695
3817
|
if ("JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) {
|
|
4696
3818
|
if (typeof opts === "undefined") {
|
|
4697
3819
|
return true;
|
|
@@ -4699,14 +3821,11 @@ function isJSX(node, opts) {
|
|
|
4699
3821
|
return (0, _shallowEqual.default)(node, opts);
|
|
4700
3822
|
}
|
|
4701
3823
|
}
|
|
4702
|
-
|
|
4703
3824
|
return false;
|
|
4704
3825
|
}
|
|
4705
|
-
|
|
4706
3826
|
function isMiscellaneous(node, opts) {
|
|
4707
3827
|
if (!node) return false;
|
|
4708
3828
|
const nodeType = node.type;
|
|
4709
|
-
|
|
4710
3829
|
if ("Noop" === nodeType || "Placeholder" === nodeType || "V8IntrinsicIdentifier" === nodeType) {
|
|
4711
3830
|
if (typeof opts === "undefined") {
|
|
4712
3831
|
return true;
|
|
@@ -4714,14 +3833,11 @@ function isMiscellaneous(node, opts) {
|
|
|
4714
3833
|
return (0, _shallowEqual.default)(node, opts);
|
|
4715
3834
|
}
|
|
4716
3835
|
}
|
|
4717
|
-
|
|
4718
3836
|
return false;
|
|
4719
3837
|
}
|
|
4720
|
-
|
|
4721
3838
|
function isTypeScript(node, opts) {
|
|
4722
3839
|
if (!node) return false;
|
|
4723
3840
|
const nodeType = node.type;
|
|
4724
|
-
|
|
4725
3841
|
if ("TSParameterProperty" === nodeType || "TSDeclareFunction" === nodeType || "TSDeclareMethod" === nodeType || "TSQualifiedName" === nodeType || "TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType || "TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSNamedTupleMember" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSInterfaceBody" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSInstantiationExpression" === nodeType || "TSAsExpression" === nodeType || "TSSatisfiesExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSEnumDeclaration" === nodeType || "TSEnumMember" === nodeType || "TSModuleDeclaration" === nodeType || "TSModuleBlock" === nodeType || "TSImportType" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExternalModuleReference" === nodeType || "TSNonNullExpression" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || "TSTypeAnnotation" === nodeType || "TSTypeParameterInstantiation" === nodeType || "TSTypeParameterDeclaration" === nodeType || "TSTypeParameter" === nodeType) {
|
|
4726
3842
|
if (typeof opts === "undefined") {
|
|
4727
3843
|
return true;
|
|
@@ -4729,14 +3845,11 @@ function isTypeScript(node, opts) {
|
|
|
4729
3845
|
return (0, _shallowEqual.default)(node, opts);
|
|
4730
3846
|
}
|
|
4731
3847
|
}
|
|
4732
|
-
|
|
4733
3848
|
return false;
|
|
4734
3849
|
}
|
|
4735
|
-
|
|
4736
3850
|
function isTSTypeElement(node, opts) {
|
|
4737
3851
|
if (!node) return false;
|
|
4738
3852
|
const nodeType = node.type;
|
|
4739
|
-
|
|
4740
3853
|
if ("TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) {
|
|
4741
3854
|
if (typeof opts === "undefined") {
|
|
4742
3855
|
return true;
|
|
@@ -4744,14 +3857,11 @@ function isTSTypeElement(node, opts) {
|
|
|
4744
3857
|
return (0, _shallowEqual.default)(node, opts);
|
|
4745
3858
|
}
|
|
4746
3859
|
}
|
|
4747
|
-
|
|
4748
3860
|
return false;
|
|
4749
3861
|
}
|
|
4750
|
-
|
|
4751
3862
|
function isTSType(node, opts) {
|
|
4752
3863
|
if (!node) return false;
|
|
4753
3864
|
const nodeType = node.type;
|
|
4754
|
-
|
|
4755
3865
|
if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) {
|
|
4756
3866
|
if (typeof opts === "undefined") {
|
|
4757
3867
|
return true;
|
|
@@ -4759,14 +3869,11 @@ function isTSType(node, opts) {
|
|
|
4759
3869
|
return (0, _shallowEqual.default)(node, opts);
|
|
4760
3870
|
}
|
|
4761
3871
|
}
|
|
4762
|
-
|
|
4763
3872
|
return false;
|
|
4764
3873
|
}
|
|
4765
|
-
|
|
4766
3874
|
function isTSBaseType(node, opts) {
|
|
4767
3875
|
if (!node) return false;
|
|
4768
3876
|
const nodeType = node.type;
|
|
4769
|
-
|
|
4770
3877
|
if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSLiteralType" === nodeType) {
|
|
4771
3878
|
if (typeof opts === "undefined") {
|
|
4772
3879
|
return true;
|
|
@@ -4774,15 +3881,12 @@ function isTSBaseType(node, opts) {
|
|
|
4774
3881
|
return (0, _shallowEqual.default)(node, opts);
|
|
4775
3882
|
}
|
|
4776
3883
|
}
|
|
4777
|
-
|
|
4778
3884
|
return false;
|
|
4779
3885
|
}
|
|
4780
|
-
|
|
4781
3886
|
function isNumberLiteral(node, opts) {
|
|
4782
3887
|
console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
|
|
4783
3888
|
if (!node) return false;
|
|
4784
3889
|
const nodeType = node.type;
|
|
4785
|
-
|
|
4786
3890
|
if (nodeType === "NumberLiteral") {
|
|
4787
3891
|
if (typeof opts === "undefined") {
|
|
4788
3892
|
return true;
|
|
@@ -4790,15 +3894,12 @@ function isNumberLiteral(node, opts) {
|
|
|
4790
3894
|
return (0, _shallowEqual.default)(node, opts);
|
|
4791
3895
|
}
|
|
4792
3896
|
}
|
|
4793
|
-
|
|
4794
3897
|
return false;
|
|
4795
3898
|
}
|
|
4796
|
-
|
|
4797
3899
|
function isRegexLiteral(node, opts) {
|
|
4798
3900
|
console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
|
|
4799
3901
|
if (!node) return false;
|
|
4800
3902
|
const nodeType = node.type;
|
|
4801
|
-
|
|
4802
3903
|
if (nodeType === "RegexLiteral") {
|
|
4803
3904
|
if (typeof opts === "undefined") {
|
|
4804
3905
|
return true;
|
|
@@ -4806,15 +3907,12 @@ function isRegexLiteral(node, opts) {
|
|
|
4806
3907
|
return (0, _shallowEqual.default)(node, opts);
|
|
4807
3908
|
}
|
|
4808
3909
|
}
|
|
4809
|
-
|
|
4810
3910
|
return false;
|
|
4811
3911
|
}
|
|
4812
|
-
|
|
4813
3912
|
function isRestProperty(node, opts) {
|
|
4814
3913
|
console.trace("The node type RestProperty has been renamed to RestElement");
|
|
4815
3914
|
if (!node) return false;
|
|
4816
3915
|
const nodeType = node.type;
|
|
4817
|
-
|
|
4818
3916
|
if (nodeType === "RestProperty") {
|
|
4819
3917
|
if (typeof opts === "undefined") {
|
|
4820
3918
|
return true;
|
|
@@ -4822,15 +3920,12 @@ function isRestProperty(node, opts) {
|
|
|
4822
3920
|
return (0, _shallowEqual.default)(node, opts);
|
|
4823
3921
|
}
|
|
4824
3922
|
}
|
|
4825
|
-
|
|
4826
3923
|
return false;
|
|
4827
3924
|
}
|
|
4828
|
-
|
|
4829
3925
|
function isSpreadProperty(node, opts) {
|
|
4830
3926
|
console.trace("The node type SpreadProperty has been renamed to SpreadElement");
|
|
4831
3927
|
if (!node) return false;
|
|
4832
3928
|
const nodeType = node.type;
|
|
4833
|
-
|
|
4834
3929
|
if (nodeType === "SpreadProperty") {
|
|
4835
3930
|
if (typeof opts === "undefined") {
|
|
4836
3931
|
return true;
|
|
@@ -4838,7 +3933,6 @@ function isSpreadProperty(node, opts) {
|
|
|
4838
3933
|
return (0, _shallowEqual.default)(node, opts);
|
|
4839
3934
|
}
|
|
4840
3935
|
}
|
|
4841
|
-
|
|
4842
3936
|
return false;
|
|
4843
3937
|
}
|
|
4844
3938
|
|