From 4f15a3ce70f2925be93790e3aa2822a832d96bb5 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Mon, 16 Jan 2023 14:38:44 -0800 Subject: [PATCH] Use ts.getCheckFlags to fix TS 5.0 --- apps/api-extractor/src/analyzer/TypeScriptInternals.ts | 2 +- .../api-extractor/check-flags_2023-01-16-22-41.json | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 common/changes/@microsoft/api-extractor/check-flags_2023-01-16-22-41.json diff --git a/apps/api-extractor/src/analyzer/TypeScriptInternals.ts b/apps/api-extractor/src/analyzer/TypeScriptInternals.ts index 32ab70795bd..e8b74f8844a 100644 --- a/apps/api-extractor/src/analyzer/TypeScriptInternals.ts +++ b/apps/api-extractor/src/analyzer/TypeScriptInternals.ts @@ -48,7 +48,7 @@ export class TypeScriptInternals { if ( // eslint-disable-next-line no-bitwise symbol.flags & ts.SymbolFlags.Transient && - (symbol as any).checkFlags === (ts as any).CheckFlags.Late + (ts as any).getCheckFlags(symbol) === (ts as any).CheckFlags.Late ) { return true; } diff --git a/common/changes/@microsoft/api-extractor/check-flags_2023-01-16-22-41.json b/common/changes/@microsoft/api-extractor/check-flags_2023-01-16-22-41.json new file mode 100644 index 00000000000..917484fe346 --- /dev/null +++ b/common/changes/@microsoft/api-extractor/check-flags_2023-01-16-22-41.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/api-extractor", + "comment": "Use ts.getCheckFlags to fix TS 5.0", + "type": "patch" + } + ], + "packageName": "@microsoft/api-extractor" +} \ No newline at end of file