github / github/codeql

Question: How to make getType() work in TypeScript

未關閉
#16,849 5 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
question
主要語言
CodeQL
星號
10.1k
分支
2.1k
平均合併
2 天 15 小時
30 天內合併 PR
141

描述

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!

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。