Skip to content

Commit

Permalink
fix(compiler-cli): use @ts-ignore. (#47636)
Browse files Browse the repository at this point in the history
The previous commit 2e1ddde used `@ts-expect-error` to suppress the
current error, with the intent of being informed once that's no longer
an error, ie. when we updated to an upstream TS version that includes
this change.

However this unfortunately means the change is incompatible with the
fixed version, which prevents it from working with an updated TS version
in google3.

This change reverts back to the original `@ts-ignore` which is forwards
and backwards compatible, avoiding that problem (but unfortunately
losing the benefit of being notified once fixed).

PR Close #47636
  • Loading branch information
mprobst authored and thePunderWoman committed Oct 5, 2022
1 parent 7b89d95 commit 19ad498
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/compiler-cli/src/ngtsc/core/src/host.ts
Expand Up @@ -68,7 +68,7 @@ export class DelegatingCompilerHost implements
useCaseSensitiveFileNames = this.delegateMethod('useCaseSensitiveFileNames');
writeFile = this.delegateMethod('writeFile');
getModuleResolutionCache = this.delegateMethod('getModuleResolutionCache');
// @ts-expect-error 'hasInvalidatedResolutions' is visible (and thus required here) in latest TSC
// @ts-ignore 'hasInvalidatedResolutions' is visible (and thus required here) in latest TSC
// main. It's already present, so the code works at runtime.
// TODO: remove this comment including the suppression once Angular uses a TSC version that
// includes this change (github.com/microsoft/TypeScript@a455955).
Expand Down
Expand Up @@ -52,7 +52,7 @@ export class DelegatingCompilerHost implements
trace = this.delegateMethod('trace');
useCaseSensitiveFileNames = this.delegateMethod('useCaseSensitiveFileNames');
getModuleResolutionCache = this.delegateMethod('getModuleResolutionCache');
// @ts-expect-error 'hasInvalidatedResolutions' is visible (and thus required here) in latest TSC
// @ts-ignore 'hasInvalidatedResolutions' is visible (and thus required here) in latest TSC
// main. It's already present, so the code works at runtime.
// TODO: remove this comment including the suppression once Angular uses a TSC version that
// includes this change (github.com/microsoft/TypeScript@a455955).
Expand Down

0 comments on commit 19ad498

Please sign in to comment.