github / github/codeql

Question: How to make getType() work in TypeScript

Abierto
#16,849 5 comentarios 0 reacciones 0 asignados Ver en GitHub
question
Lenguaje dominante
CodeQL
Estrellas
10.1k
Forks
2.1k
Merge medio
2 d 15 h
PR fusionados (30 d)
141

Descripción

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!

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con la opción de extracción “full” de TypeScript documentada y la consulta de CodeQL mostrada en el issue. Determina qué configuración produce instancias de Type y permite que getType() devuelva resultados, y aclara la documentación con el proceso necesario y un ejemplo funcional.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
typescript
Área
documentation
Tipo de issue
Documentación
Dificultad
2/5
Tiempo estimado
1-3 horas
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
30/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.