hermes-estree
Advanced tools
Comparing version 0.18.1 to 0.18.2
@@ -65,2 +65,3 @@ /** | ||
// $FlowFixMe[deprecated-type] | ||
function isClass(node) { | ||
@@ -70,6 +71,8 @@ return (0, _predicates.isClassDeclaration)(node) || (0, _predicates.isClassExpression)(node); | ||
function isPropertyDefinitionWithNonComputedName(node) { | ||
function isPropertyDefinitionWithNonComputedName(node // $FlowFixMe[deprecated-type] | ||
) { | ||
return (0, _predicates.isPropertyDefinition)(node) && node.computed === false; | ||
} | ||
} // $FlowFixMe[deprecated-type] | ||
function isClassMember(node) { | ||
@@ -79,10 +82,13 @@ return (0, _predicates.isPropertyDefinition)(node) || (0, _predicates.isMethodDefinition)(node); | ||
function isClassMemberWithNonComputedName(node) { | ||
function isClassMemberWithNonComputedName(node // $FlowFixMe[deprecated-type] | ||
) { | ||
return isClassMember(node) && node.computed === false; | ||
} | ||
} // $FlowFixMe[deprecated-type] | ||
function isComment(node) { | ||
return (0, _predicates.isBlockComment)(node) || (0, _predicates.isLineComment)(node); | ||
} | ||
} // $FlowFixMe[deprecated-type] | ||
function isFunction(node) { | ||
@@ -92,14 +98,18 @@ return (0, _predicates.isArrowFunctionExpression)(node) || (0, _predicates.isFunctionDeclaration)(node) || (0, _predicates.isFunctionExpression)(node); | ||
function isMethodDefinitionWithNonComputedName(node) { | ||
function isMethodDefinitionWithNonComputedName(node // $FlowFixMe[deprecated-type] | ||
) { | ||
return (0, _predicates.isMethodDefinition)(node) && node.computed === false; | ||
} | ||
function isMemberExpressionWithNonComputedProperty(node) { | ||
function isMemberExpressionWithNonComputedProperty(node // $FlowFixMe[deprecated-type] | ||
) { | ||
return (0, _predicates.isMemberExpression)(node) && node.computed === false; | ||
} | ||
function isOptionalMemberExpressionWithNonComputedProperty(node) { | ||
function isOptionalMemberExpressionWithNonComputedProperty(node // $FlowFixMe[deprecated-type] | ||
) { | ||
return (0, _predicates.isMemberExpression)(node) && node.computed === false; | ||
} | ||
} // $FlowFixMe[deprecated-type] | ||
function isObjectPropertyWithShorthand(node) { | ||
@@ -109,36 +119,45 @@ return (0, _predicates.isProperty)(node) && node.shorthand === true; | ||
function isObjectPropertyWithNonComputedName(node) { | ||
function isObjectPropertyWithNonComputedName(node // $FlowFixMe[deprecated-type] | ||
) { | ||
return (0, _predicates.isProperty)(node) && node.computed === false; | ||
} | ||
} // $FlowFixMe[deprecated-type] | ||
function isBigIntLiteral(node) { | ||
return (0, _predicates.isLiteral)(node) && node.literalType === 'bigint'; | ||
} | ||
} // $FlowFixMe[deprecated-type] | ||
function isBooleanLiteral(node) { | ||
return (0, _predicates.isLiteral)(node) && node.literalType === 'boolean'; | ||
} | ||
} // $FlowFixMe[deprecated-type] | ||
function isNullLiteral(node) { | ||
return (0, _predicates.isLiteral)(node) && node.literalType === 'null'; | ||
} | ||
} // $FlowFixMe[deprecated-type] | ||
function isNumericLiteral(node) { | ||
return (0, _predicates.isLiteral)(node) && node.literalType === 'numeric'; | ||
} | ||
} // $FlowFixMe[deprecated-type] | ||
function isRegExpLiteral(node) { | ||
return (0, _predicates.isLiteral)(node) && node.literalType === 'regexp'; | ||
} | ||
} // $FlowFixMe[deprecated-type] | ||
function isStringLiteral(node) { | ||
return (0, _predicates.isLiteral)(node) && node.literalType === 'string'; | ||
} | ||
} // $FlowFixMe[deprecated-type] | ||
function isExpression(node) { | ||
return (0, _predicates.isThisExpression)(node) || (0, _predicates.isArrayExpression)(node) || (0, _predicates.isObjectExpression)(node) || (0, _predicates.isFunctionExpression)(node) || (0, _predicates.isArrowFunctionExpression)(node) || (0, _predicates.isYieldExpression)(node) || (0, _predicates.isLiteral)(node) || (0, _predicates.isUnaryExpression)(node) || (0, _predicates.isUpdateExpression)(node) || (0, _predicates.isBinaryExpression)(node) || (0, _predicates.isAssignmentExpression)(node) || (0, _predicates.isLogicalExpression)(node) || (0, _predicates.isMemberExpression)(node) || (0, _predicates.isConditionalExpression)(node) || (0, _predicates.isCallExpression)(node) || (0, _predicates.isNewExpression)(node) || (0, _predicates.isSequenceExpression)(node) || (0, _predicates.isTemplateLiteral)(node) || (0, _predicates.isTaggedTemplateExpression)(node) || (0, _predicates.isClassExpression)(node) || (0, _predicates.isMetaProperty)(node) || (0, _predicates.isIdentifier)(node) || (0, _predicates.isAwaitExpression)(node) || (0, _predicates.isImportExpression)(node) || (0, _predicates.isChainExpression)(node) || (0, _predicates.isTypeCastExpression)(node) || (0, _predicates.isJSXFragment)(node) || (0, _predicates.isJSXElement)(node); | ||
} | ||
} // $FlowFixMe[deprecated-type] | ||
function isStatement(node) { | ||
return (0, _predicates.isBlockStatement)(node) || (0, _predicates.isBreakStatement)(node) || (0, _predicates.isClassDeclaration)(node) || (0, _predicates.isContinueStatement)(node) || (0, _predicates.isDebuggerStatement)(node) || (0, _predicates.isDeclareClass)(node) || (0, _predicates.isDeclareVariable)(node) || (0, _predicates.isDeclareFunction)(node) || (0, _predicates.isDeclareInterface)(node) || (0, _predicates.isDeclareModule)(node) || (0, _predicates.isDeclareOpaqueType)(node) || (0, _predicates.isDeclareTypeAlias)(node) || (0, _predicates.isDoWhileStatement)(node) || (0, _predicates.isEmptyStatement)(node) || (0, _predicates.isEnumDeclaration)(node) || (0, _predicates.isExpressionStatement)(node) || (0, _predicates.isForInStatement)(node) || (0, _predicates.isForOfStatement)(node) || (0, _predicates.isForStatement)(node) || (0, _predicates.isFunctionDeclaration)(node) || (0, _predicates.isIfStatement)(node) || (0, _predicates.isInterfaceDeclaration)(node) || (0, _predicates.isLabeledStatement)(node) || (0, _predicates.isOpaqueType)(node) || (0, _predicates.isReturnStatement)(node) || (0, _predicates.isSwitchStatement)(node) || (0, _predicates.isThrowStatement)(node) || (0, _predicates.isTryStatement)(node) || (0, _predicates.isTypeAlias)(node) || (0, _predicates.isVariableDeclaration)(node) || (0, _predicates.isWhileStatement)(node) || (0, _predicates.isWithStatement)(node); | ||
} |
{ | ||
"name": "hermes-estree", | ||
"version": "0.18.1", | ||
"version": "0.18.2", | ||
"description": "Flow types for the Flow-ESTree spec produced by the hermes parser", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
323625
2604