Remix.run Logo
jerf 7 hours ago

No, because the LSP is specifically about inheritance, or subtyping more generally. No inheritance/subtyping, no LSP.

It is true that an interface defines certain requirements of things that claim to implement it, but merely having an interface lacks the critical essence of the LSP. The LSP is not merely a banal statement that "a thing that claims to implement an interface ought to actually implement it". It is richer and more subtle than that, though perhaps from an academic perspective, still fairly basic. In the real world a lot of code technically violates it in one way or another, though.