Skip to content

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

Draft
arcanis with Copilot wants to merge 6 commits into
masterfrom
copilot/update-ts2742-error-message
Draft

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

Conversation

Copilot AI commented Feb 27, 2026

Copy link
Copy Markdown

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 and others added 2 commits February 27, 2026 13:25
Co-authored-by: arcanis <1037931+arcanis@users.noreply.github.com>
Co-authored-by: arcanis <1037931+arcanis@users.noreply.github.com>
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
…ithout symbol name

Co-authored-by: arcanis <1037931+arcanis@users.noreply.github.com>
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
Co-authored-by: arcanis <1037931+arcanis@users.noreply.github.com>
Copilot AI changed the title Include symbol name in TS2742 error message Reuse TS2742 for unsafe import error; make symbolName required Feb 27, 2026
…l.escapedName)

Co-authored-by: arcanis <1037931+arcanis@users.noreply.github.com>
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