That's what I'm thinking. "making invalid states unrepresentable" is about avoiding variable data that shouldn't be possible by designing your types to not allow it.

A dumb example is something like a light bulb data structure

In psuedocode

Light(color: string, on:bool, off:bool)

above is bad because you have a string (which could be anything) and on and off which could both be true of false.

This is better (if your lang allows it) because no invalid state is possible

Light(color:red|blue|green, on:bool)