You need to type gurd this
type Uni = "A" | "B"
type Fa = {
contentType : Uni
}
const a: Fa["contentType"] = "A"
a // a is "A" | "B"
Make a separate mold from the beginning
type Uni2<T> = T extends "A" ? "A" : "B"
type Fa2<T extends Uni> = {
contentType : Uni2<T>
}
const a2:Fa2<"A">["contentType"] = "A"
a2 // "A"