Well, it’s not exactly an objective thing, but the most concise way I’ve heard it described is “plausible deniability”. It’s always just a joke until… it isn’t.
Flirting is mainly about showing interest but also always giving the other person a graceful out. It’s asking out without asking out, so nobody has to actively reject the other, but instead can just stop responding.