From 80d64755126913536cb19deb96799b7220c84c3d Mon Sep 17 00:00:00 2001 From: Matthieu Riegler Date: Mon, 24 Apr 2023 01:42:22 +0200 Subject: [PATCH] refactor(compiler-cli): remove unecessary type assertion microsoft/TypeScript#43966 was fixed in 4.3.1 --- packages/compiler-cli/src/ngtsc/scope/src/dependency.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/compiler-cli/src/ngtsc/scope/src/dependency.ts b/packages/compiler-cli/src/ngtsc/scope/src/dependency.ts index 9f04e635b37e6..47bffa30a604e 100644 --- a/packages/compiler-cli/src/ngtsc/scope/src/dependency.ts +++ b/packages/compiler-cli/src/ngtsc/scope/src/dependency.ts @@ -139,12 +139,9 @@ export class MetadataDtsModuleScopeResolver implements DtsModuleScopeResolver { return dirOrPipe; } - // TypeScript incorrectly narrows the type here: - // https://github.com/microsoft/TypeScript/issues/43966. - // TODO: Remove/Update once https://github.com/microsoft/TypeScript/issues/43966 is resolved. return { ...dirOrPipe, ref: ref.cloneWithAlias(alias), - } as T; + }; } }