mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge pull request #17831 from erik-krogh/skip-more-types
JS: have getId always return null if skipExtractingTypes is set
This commit is contained in:
@@ -435,6 +435,7 @@ export class TypeTable {
|
||||
* Returns `null` if we do not support extraction of this type.
|
||||
*/
|
||||
public getId(type: ts.Type, unfoldAlias: boolean): number | null {
|
||||
if (this.skipExtractingTypes) return null;
|
||||
let cached = this.idCache.get(type) ?? [undefined, undefined];
|
||||
let cachedValue = cached[unfoldAlias ? 1 : 0];
|
||||
if (cachedValue !== undefined) return cachedValue;
|
||||
|
||||
Reference in New Issue
Block a user