mirror of
https://github.com/github/codeql.git
synced 2026-05-04 21:25:44 +02:00
aggregate the tests in library-tests/TypeScript/ExternalTypes into a single .ql file
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
| LegacyGlobals.LegacySubclass | LegacySubclass |
|
||||
| Modern.ModernClass | ModernClass |
|
||||
| ModernGlobals.ModernSubclass | ModernSubclass |
|
||||
| __Legacy.LegacyClass | LegacyClass |
|
||||
@@ -1,7 +0,0 @@
|
||||
import javascript
|
||||
|
||||
from TypeReference type, string globalName
|
||||
where
|
||||
type.hasQualifiedName(globalName) and
|
||||
not type.hasTypeArguments()
|
||||
select globalName, type
|
||||
@@ -1,8 +0,0 @@
|
||||
| esmodule | Augmentation | Augmentation |
|
||||
| esmodule | ExternalType1 | ExternalType1 |
|
||||
| esmodule | ExternalType2 | ExternalType2 |
|
||||
| esmodule/otherfile | OtherClass | OtherClass |
|
||||
| esmodule/util | UtilClass | UtilClass |
|
||||
| esmodule/util/extra | UtilExtraClass | UtilExtraClass |
|
||||
| legacy | LegacyClass | LegacyClass |
|
||||
| modern | ModernClass | ModernClass |
|
||||
@@ -1,7 +0,0 @@
|
||||
import javascript
|
||||
|
||||
from TypeReference type, string moduleName, string exportedName
|
||||
where
|
||||
type.hasQualifiedName(moduleName, exportedName) and
|
||||
not type.hasTypeArguments()
|
||||
select moduleName, exportedName, type
|
||||
@@ -1,4 +0,0 @@
|
||||
| external | ExternalType1 | ExternalType1 |
|
||||
| external | ExternalType2 | ExternalType2 |
|
||||
| legacy | MyClass | MyClass |
|
||||
| modern | MyClass | MyClass |
|
||||
@@ -1,11 +0,0 @@
|
||||
| Augmentation | defined in augmentation.ts |
|
||||
| ExternalType1 | has no definition |
|
||||
| ExternalType2 | has no definition |
|
||||
| InternalType | defined in client_esmodule.ts |
|
||||
| LegacyClass | has no definition |
|
||||
| LegacySubclass | has no definition |
|
||||
| ModernClass | has no definition |
|
||||
| ModernSubclass | has no definition |
|
||||
| OtherClass | has no definition |
|
||||
| UtilClass | has no definition |
|
||||
| UtilExtraClass | has no definition |
|
||||
@@ -1,11 +0,0 @@
|
||||
import javascript
|
||||
|
||||
string getDefinition(TypeReference ref) {
|
||||
if exists(ref.getADefinition())
|
||||
then result = "defined in " + ref.getADefinition().getFile().getBaseName()
|
||||
else result = "has no definition"
|
||||
}
|
||||
|
||||
from TypeReference type
|
||||
where not type.hasTypeArguments()
|
||||
select type, getDefinition(type)
|
||||
@@ -1 +0,0 @@
|
||||
| typeof externalSymbol | esmodule | externalSymbol |
|
||||
@@ -1,5 +0,0 @@
|
||||
import javascript
|
||||
|
||||
from UniqueSymbolType symbol, string moduleName, string exportedName
|
||||
where symbol.hasQualifiedName(moduleName, exportedName)
|
||||
select symbol, moduleName, exportedName
|
||||
@@ -0,0 +1,28 @@
|
||||
globalQualifiedNames
|
||||
| LegacyClass | __Legacy.LegacyClass |
|
||||
| LegacySubclass | LegacyGlobals.LegacySubclass |
|
||||
| ModernClass | Modern.ModernClass |
|
||||
| ModernSubclass | ModernGlobals.ModernSubclass |
|
||||
moduleQualifiedName
|
||||
| Augmentation | esmodule | Augmentation |
|
||||
| ExternalType1 | esmodule | ExternalType1 |
|
||||
| ExternalType2 | esmodule | ExternalType2 |
|
||||
| LegacyClass | legacy | LegacyClass |
|
||||
| ModernClass | modern | ModernClass |
|
||||
| OtherClass | esmodule/otherfile | OtherClass |
|
||||
| UtilClass | esmodule/util | UtilClass |
|
||||
| UtilExtraClass | esmodule/util/extra | UtilExtraClass |
|
||||
types
|
||||
| Augmentation | defined in augmentation.ts |
|
||||
| ExternalType1 | has no definition |
|
||||
| ExternalType2 | has no definition |
|
||||
| InternalType | defined in client_esmodule.ts |
|
||||
| LegacyClass | has no definition |
|
||||
| LegacySubclass | has no definition |
|
||||
| ModernClass | has no definition |
|
||||
| ModernSubclass | has no definition |
|
||||
| OtherClass | has no definition |
|
||||
| UtilClass | has no definition |
|
||||
| UtilExtraClass | has no definition |
|
||||
uniqueSymbols
|
||||
| typeof externalSymbol | esmodule | externalSymbol |
|
||||
@@ -0,0 +1,26 @@
|
||||
import javascript
|
||||
|
||||
query predicate globalQualifiedNames(TypeReference type, string globalName) {
|
||||
type.hasQualifiedName(globalName) and
|
||||
not type.hasTypeArguments()
|
||||
}
|
||||
|
||||
query predicate moduleQualifiedName(TypeReference type, string moduleName, string exportedName) {
|
||||
type.hasQualifiedName(moduleName, exportedName) and
|
||||
not type.hasTypeArguments()
|
||||
}
|
||||
|
||||
string getDefinition(TypeReference ref) {
|
||||
if exists(ref.getADefinition())
|
||||
then result = "defined in " + ref.getADefinition().getFile().getBaseName()
|
||||
else result = "has no definition"
|
||||
}
|
||||
|
||||
query predicate types(TypeReference type, string def) {
|
||||
not type.hasTypeArguments() and
|
||||
def = getDefinition(type)
|
||||
}
|
||||
|
||||
query predicate uniqueSymbols(UniqueSymbolType symbol, string moduleName, string exportedName) {
|
||||
symbol.hasQualifiedName(moduleName, exportedName)
|
||||
}
|
||||
Reference in New Issue
Block a user