Question: How to make getType() work in TypeScript
- Linguagem predominante
- CodeQL
- Estrelas
- 10.1k
- Forks
- 2.1k
- Merge médio
- 2d 15h
- PRs com merge (30d)
- 141
Descrição
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!
Guia de contribuição
Direção de pesquisa
Start with the documented “full” TypeScript extraction option and the CodeQL query shown in the issue. Determine what setup produces Type instances and allows getType() to return results, then clarify the documentation with the required process and a working example.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- typescript
- Domínio
- documentation
- Tipo de issue
- Documentação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Status de atividade
- Estagnada
- Clareza
- Precisa de esclarecimento
- Facilidade para iniciantes
- 30/100