mirror of
https://github.com/github/codeql.git
synced 2026-04-29 02:35:15 +02:00
Merge pull request #20374 from asgerf/js/typescript-5.9
JS: Support TypeScript 5.9 and support 'import defer' syntax
This commit is contained in:
@@ -151,6 +151,14 @@ class ImportDeclaration extends Stmt, Import, @import_declaration {
|
||||
/** Holds if this is declared with the `type` keyword, so it only imports types. */
|
||||
predicate isTypeOnly() { has_type_keyword(this) }
|
||||
|
||||
/**
|
||||
* Holds if this is declared with the `defer` keyword, for example:
|
||||
* ```ts
|
||||
* import defer * as f from "somewhere";
|
||||
* ```
|
||||
*/
|
||||
predicate isDeferredImport() { has_defer_keyword(this) }
|
||||
|
||||
override string getAPrimaryQlClass() { result = "ImportDeclaration" }
|
||||
}
|
||||
|
||||
|
||||
@@ -516,6 +516,7 @@ has_private_keyword (int id: @property ref);
|
||||
has_protected_keyword (int id: @property ref);
|
||||
has_readonly_keyword (int id: @property ref);
|
||||
has_type_keyword (int id: @type_keyword_operand ref);
|
||||
has_defer_keyword (int id: @import_declaration ref);
|
||||
is_optional_member (int id: @property ref);
|
||||
has_definite_assignment_assertion (int id: @field_or_vardeclarator ref);
|
||||
is_optional_parameter_declaration (unique int parameter: @pattern ref);
|
||||
|
||||
@@ -4319,6 +4319,17 @@
|
||||
<dependencies/>
|
||||
</relation>
|
||||
<relation>
|
||||
<name>has_defer_keyword</name>
|
||||
<cardinality>1000</cardinality>
|
||||
<columnsizes>
|
||||
<e>
|
||||
<k>id</k>
|
||||
<v>1000</v>
|
||||
</e>
|
||||
</columnsizes>
|
||||
<dependencies/>
|
||||
</relation>
|
||||
<relation>
|
||||
<name>is_optional_member</name>
|
||||
<cardinality>3668</cardinality>
|
||||
<columnsizes>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,2 @@
|
||||
description: add support for deferred imports
|
||||
compatibility: backwards
|
||||
Reference in New Issue
Block a user