mirror of
https://github.com/github/codeql.git
synced 2026-05-02 12:15:17 +02:00
renamed "hasTypeKeyword" to "has_type_keyword"
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user