github / github/codeql

Question: How to make getType() work in TypeScript

Ouverte
#16,849 5 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
question
Langage dominant
CodeQL
Étoiles
10.1k
Forks
2.1k
Merge moyen
2 j 15 h
PR mergées (30 j)
141

Description

Hello, I was hoping to get some help about using `getType()` in Typescript files. The docs say the following:
```
Static type information
Static type information and global name binding is available for projects with “full” TypeScript extraction enabled. This option is enabled by default when you create databases with the CodeQL CLI.
```

I don't seem to be able to get any calls to `.getType()` to work. Am I missing a setup process to enable the "full" TypeScript extraction? How should I set that up?

For more context, the following query does not return anything:
```codeql
from Type t
select t
```

I believe this is the reason why `.getType()` isn't returning anything, since there are no `Type` classes to be found. What is the `Type` class and what makes a TypeScript codebase have one?

Thank you!

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.