Referential Integrity refers to the consistency in associations between components in a system that are linked “by reference”. Basically it’s to do with whether or not data are dynamically linked, or hard-coded. Referential Integrity is also why TypeScript exists. Type-checking enforces referential integrity, and it’s why the tooling of TypeScript helps so much more than standard JavaScript (not counting the benefits reaped through the usage of JSDoc with VSCode’s tooling).
Referential Integrity is always a good thing. Systems that enforce RI are more durable, more adaptable, and allow for better agility in response to needed changes.