typescript-eslint-parser
Advanced tools
Comparing version 17.0.0 to 17.0.1
@@ -0,1 +1,5 @@ | ||
v17.0.1 - July 26, 2018 | ||
* f1d7de3 Chore: Replace removed API with public flags (fixes #498) (#505) (Texas Toland) | ||
v17.0.0 - July 26, 2018 | ||
@@ -2,0 +6,0 @@ |
@@ -128,26 +128,2 @@ /** | ||
/** | ||
* Returns true if the given TSNode is a let variable declaration | ||
* @param {TSNode} node The TSNode | ||
* @returns {boolean} whether or not the given node is a let variable declaration | ||
*/ | ||
function isLet(node) { | ||
/** | ||
* TODO: Remove dependency on private TypeScript method | ||
*/ | ||
return ts.isLet(node); | ||
} | ||
/** | ||
* Returns true if the given TSNode is a const variable declaration | ||
* @param {TSNode} node The TSNode | ||
* @returns {boolean} whether or not the given node is a const variable declaration | ||
*/ | ||
function isConst(node) { | ||
/** | ||
* TODO: Remove dependency on private TypeScript method | ||
*/ | ||
return ts.isConst(node); | ||
} | ||
//------------------------------------------------------------------------------ | ||
@@ -183,3 +159,2 @@ // Public | ||
hasJSXAncestor, | ||
unescapeIdentifier, | ||
unescapeStringLiteralText, | ||
@@ -371,20 +346,16 @@ isComputedProperty, | ||
function getDeclarationKind(node) { | ||
let varDeclarationKind; | ||
switch (node.kind) { | ||
case SyntaxKind.TypeAliasDeclaration: | ||
varDeclarationKind = "type"; | ||
break; | ||
return "type"; | ||
case SyntaxKind.VariableDeclarationList: | ||
if (isLet(node)) { | ||
varDeclarationKind = "let"; | ||
} else if (isConst(node)) { | ||
varDeclarationKind = "const"; | ||
} else { | ||
varDeclarationKind = "var"; | ||
if (node.flags & ts.NodeFlags.Let) { | ||
return "let"; | ||
} | ||
break; | ||
if (node.flags & ts.NodeFlags.Const) { | ||
return "const"; | ||
} | ||
return "var"; | ||
default: | ||
throw "Unable to determine declaration kind."; | ||
} | ||
return varDeclarationKind; | ||
} | ||
@@ -509,11 +480,2 @@ | ||
/** | ||
* Remove extra underscore from escaped identifier text content. | ||
* @param {string} identifier The escaped identifier text. | ||
* @returns {string} The unescaped identifier text. | ||
*/ | ||
function unescapeIdentifier(identifier) { | ||
return ts.unescapeIdentifier(identifier); | ||
} | ||
/** | ||
* Unescape the text content of string literals, e.g. & -> & | ||
@@ -520,0 +482,0 @@ * @param {string} text The escaped string literal text. |
@@ -7,3 +7,3 @@ { | ||
"main": "parser.js", | ||
"version": "17.0.0", | ||
"version": "17.0.1", | ||
"files": [ | ||
@@ -10,0 +10,0 @@ "lib", |
Sorry, the diff of this file is too big to display
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
153718
3089