Skip to content

PlayerLanguageService / XLRService type conflict when both @player-lang and @player-tools json-language-service are in dependency tree #6

@shahabdsh

Description

@shahabdsh

Repro branch

repro/player-language-service-type-conflict on fork: https://github.com/shahabdsh/xlr/tree/repro/player-language-service-type-conflict

git clone https://github.com/shahabdsh/xlr.git
cd xlr
git checkout repro/player-language-service-type-conflict
pnpm install
pnpm exec tsc --noEmit -p repro/tsconfig.json   # Expected: exit code 2
pnpm exec vitest run player-language-service-type-conflict  # Expected: passes

Error

Types of property 'XLRService' are incompatible.
  Types have separate declarations of a private property 'baseTypes'.

Root cause

Both @player-lang/json-language-service and @player-tools/json-language-service ship their own XLRService class with a private baseTypes property. TypeScript treats these as distinct types because private members contribute to nominal typing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions