Repository navigation
Conversation
…language service Extract shouldReportTemplateDiagnostic(code, tcbText, startOffset) from shouldReportDiagnostic in packages/compiler-cli/src/ngtsc/typecheck/src/diagnostics.ts (keeping shouldReportDiagnostic as a thin wrapper) and export it from @angular/compiler-cli/private/hybrid_analysis. Previously, packages/compiler-cli/preprocessor/language-service/src/diagnostic_mapping.ts duplicated a hardcoded IGNORED_DIAGNOSTIC_CODES set and did not filter TS2341 private member reads on this. Delegating shouldReportDiagnostic to shouldReportTemplateDiagnostic and passing tcbCode and startOffset from mapDiagnostics removes the duplicate code list and aligns TS2341 filtering with ngtsc, suppressing errors on this. or (this). private member reads while still reporting them on other receivers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extract
shouldReportTemplateDiagnostic(code, tcbText, startOffset)fromshouldReportDiagnosticinpackages/compiler-cli/src/ngtsc/typecheck/src/diagnostics.ts(keepingshouldReportDiagnosticas a thin wrapper) and export it from@angular/compiler-cli/private/hybrid_analysis.Previously,
packages/compiler-cli/preprocessor/language-service/src/diagnostic_mapping.tsduplicated a hardcodedIGNORED_DIAGNOSTIC_CODESset and did not filter TS2341 private member reads onthis. DelegatingshouldReportDiagnostictoshouldReportTemplateDiagnosticand passingtcbCodeandstartOffsetfrommapDiagnosticsremoves the duplicate code list and aligns TS2341 filtering withngtsc, suppressing errors onthis.or(this).private member reads while still reporting them on other receivers. Includes a behavioral test indiagnostics_spec.tscovering both cases.