Skip to content

Make symbolName required in reportLikelyUnsafeImportRequiredError, use symbolName() utility#11

Draft
Copilot wants to merge 6 commits intomasterfrom
copilot/update-ts2742-error-message
Draft

Make symbolName required in reportLikelyUnsafeImportRequiredError, use symbolName() utility#11
Copilot wants to merge 6 commits intomasterfrom
copilot/update-ts2742-error-message

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 27, 2026

reportLikelyUnsafeImportRequiredError accepted symbolName?: string, but the implementation used symbolName ?? specifier — meaning undefined would silently produce wrong diagnostic output. The parameter should be required since the function is meaningless without it.

  • types.ts: SymbolTracker.reportLikelyUnsafeImportRequiredErrorsymbolName?: stringsymbolName: string
  • checker.ts: Both call sites now use symbolName() utility instead of unescapeLeadingUnderscores(symbol.escapedName); getModuleSpecifierOverride call site guards on nodeSymbol truthiness before calling
  • checker.ts (SymbolTrackerImpl): Signature updated to match interface
  • declarations.ts: Signature updated, removed ?? specifier fallback

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Update TS2742 error to include symbol name Include symbol name in TS2742 error when available from symbolToTypeNode Feb 27, 2026
Copilot AI changed the title Include symbol name in TS2742 error when available from symbolToTypeNode Include symbol name in TS2742 error message Feb 27, 2026
Copilot AI changed the title Include symbol name in TS2742 error message Reuse TS2742 for unsafe import error; make symbolName required Feb 27, 2026
Copilot AI changed the title Reuse TS2742 for unsafe import error; make symbolName required Make symbolName required in reportLikelyUnsafeImportRequiredError, use symbolName() utility Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants