mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
renamed "hasTypeKeyword" to "has_type_keyword"
This commit is contained in:
@@ -1575,7 +1575,7 @@ public class ASTExtractor {
|
||||
IdContext.export;
|
||||
visitAll(nd.getSpecifiers(), lbl, childContext, 0);
|
||||
if (nd.hasTypeKeyword()) {
|
||||
trapwriter.addTuple("hasTypeKeyword", lbl);
|
||||
trapwriter.addTuple("has_type_keyword", lbl);
|
||||
}
|
||||
return lbl;
|
||||
}
|
||||
@@ -1596,7 +1596,7 @@ public class ASTExtractor {
|
||||
visitAll(nd.getSpecifiers(), lbl, childContext, 0);
|
||||
emitNodeSymbol(nd, lbl);
|
||||
if (nd.hasTypeKeyword()) {
|
||||
trapwriter.addTuple("hasTypeKeyword", lbl);
|
||||
trapwriter.addTuple("has_type_keyword", lbl);
|
||||
}
|
||||
return lbl;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ class ASTNode extends @ast_node, NodeInStmtContainer {
|
||||
or
|
||||
has_declare_keyword(this)
|
||||
or
|
||||
hasTypeKeyword(this)
|
||||
has_type_keyword(this)
|
||||
or
|
||||
// An export such as `export declare function f()` should be seen as ambient.
|
||||
has_declare_keyword(this.(ExportNamedDeclaration).getOperand())
|
||||
|
||||
@@ -190,3 +190,8 @@ deprecated predicate hasProtectedKeyword(Property prop) { has_protected_keyword(
|
||||
* Use `FieldDeclaration#isReadonly()` instead.
|
||||
*/
|
||||
deprecated predicate hasReadonlyKeyword(Property prop) { has_readonly_keyword(prop) }
|
||||
/**
|
||||
* Alias for the predicate `has_type_keyword` defined in the .dbscheme.
|
||||
* Use the `isTypeOnly` method on the `ImportDeclaration`/`ExportDeclaration` classes instead.
|
||||
*/
|
||||
deprecated predicate hasTypeKeyword(ASTNode id) { has_type_keyword(id) }
|
||||
|
||||
@@ -78,7 +78,7 @@ class ImportDeclaration extends Stmt, Import, @importdeclaration {
|
||||
}
|
||||
|
||||
/** Holds if this is declared with the `type` keyword, so it only imports types. */
|
||||
predicate isTypeOnly() { hasTypeKeyword(this) }
|
||||
predicate isTypeOnly() { has_type_keyword(this) }
|
||||
}
|
||||
|
||||
/** A literal path expression appearing in an `import` declaration. */
|
||||
@@ -261,7 +261,7 @@ abstract class ExportDeclaration extends Stmt, @exportdeclaration {
|
||||
abstract DataFlow::Node getSourceNode(string name);
|
||||
|
||||
/** Holds if is declared with the `type` keyword, so only types are exported. */
|
||||
predicate isTypeOnly() { hasTypeKeyword(this) }
|
||||
predicate isTypeOnly() { has_type_keyword(this) }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -524,7 +524,7 @@ has_public_keyword (int id: @property ref);
|
||||
has_private_keyword (int id: @property ref);
|
||||
has_protected_keyword (int id: @property ref);
|
||||
has_readonly_keyword (int id: @property ref);
|
||||
hasTypeKeyword (int id: @import_or_export_declaration ref);
|
||||
has_type_keyword (int id: @import_or_export_declaration ref);
|
||||
isOptionalMember (int id: @property ref);
|
||||
hasDefiniteAssignmentAssertion (int id: @field_or_vardeclarator ref);
|
||||
isOptionalParameterDeclaration (unique int parameter: @pattern ref);
|
||||
|
||||
@@ -7996,7 +7996,7 @@
|
||||
<dependencies/>
|
||||
</relation>
|
||||
<relation>
|
||||
<name>hasTypeKeyword</name>
|
||||
<name>has_type_keyword</name>
|
||||
<cardinality>1000</cardinality>
|
||||
<columnsizes>
|
||||
<e>
|
||||
|
||||
@@ -50,3 +50,5 @@ has_protected_keyword.rel: reorder hasProtectedKeyword.rel(int prop) prop
|
||||
hasProtectedKeyword.rel: delete
|
||||
has_readonly_keyword.rel: reorder hasReadonlyKeyword.rel(int prop) prop
|
||||
hasReadonlyKeyword.rel: delete
|
||||
has_type_keyword.rel: reorder hasTypeKeyword.rel(int id) id
|
||||
hasTypeKeyword.rel: delete
|
||||
|
||||
Reference in New Issue
Block a user