Comment

Comment by zeugmasyllepsis

Not without modifying the existing type. Since Interfaces rely on nominal typing, each type implementing an interface must explicitly declare that they do so. On the other hand, since Protocols are checked structurally you can declare a protocol after several types already implement it, and type checking will pass without having to modify the implementing types.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton