Skip to content

Commit

Permalink
Merge pull request #17831 from erik-krogh/skip-more-types
Browse files Browse the repository at this point in the history
JS: have getId always return null if skipExtractingTypes is set
  • Loading branch information
erik-krogh authored Oct 24, 2024
2 parents e16f354 + 073d6d8 commit 7bbd4a1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions javascript/extractor/lib/typescript/src/type_table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7bbd4a1

Please sign in to comment.