I was thinking of something like this:

type MyType{ myName: string where size > 8, year: number where number > 2000 }

Then, whenever this type is used, at compile time, an evaluation is done to ensure that the type restrictions are enforced.