Skip to content

Conversation

Copy link

Copilot AI commented Jan 23, 2026

The TokenSpan interface was defined identically in both ls-utils.ts and diagnostics.ts, creating a maintenance liability.

Changes

  • Removed duplicate TokenSpan interface from diagnostics.ts
  • Updated import in diagnostics.ts to reference ls-utils.ts
  • Updated import in language-service.ts to reference ls-utils.ts

The interface is now defined once in ls-utils.ts and imported where needed.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: Sander-Toonen <5106372+Sander-Toonen@users.noreply.github.com>
Copilot AI changed the title [WIP] Update documentation based on feedback from PR #37 Deduplicate TokenSpan interface definition Jan 23, 2026
Copilot AI requested a review from Sander-Toonen January 23, 2026 20:33
@Sander-Toonen Sander-Toonen marked this pull request as ready for review January 23, 2026 20:33
Copilot AI review requested due to automatic review settings January 23, 2026 20:33
@Sander-Toonen Sander-Toonen merged commit bbca4b8 into improve-docs Jan 23, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes a duplicated TokenSpan interface definition by consolidating it in ls-utils.ts and updating consumers to import it from there.

Changes:

  • Removed the duplicate TokenSpan interface from diagnostics.ts.
  • Updated diagnostics.ts to import TokenSpan from ls-utils.ts.
  • Updated language-service.ts to import TokenSpan from ls-utils.ts instead of diagnostics.ts.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/language-service/language-service.ts Switches TokenSpan import source to the single canonical definition in ls-utils.ts.
src/language-service/diagnostics.ts Removes the local TokenSpan interface and imports the shared type from ls-utils.ts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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