mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +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.
|
* Returns `null` if we do not support extraction of this type.
|
||||||
*/
|
*/
|
||||||
public getId(type: ts.Type, unfoldAlias: boolean): number | null {
|
public getId(type: ts.Type, unfoldAlias: boolean): number | null {
|
||||||
|
if (this.skipExtractingTypes) return null;
|
||||||
let cached = this.idCache.get(type) ?? [undefined, undefined];
|
let cached = this.idCache.get(type) ?? [undefined, undefined];
|
||||||
let cachedValue = cached[unfoldAlias ? 1 : 0];
|
let cachedValue = cached[unfoldAlias ? 1 : 0];
|
||||||
if (cachedValue !== undefined) return cachedValue;
|
if (cachedValue !== undefined) return cachedValue;
|
||||||
|
|||||||
Reference in New Issue
Block a user