Schema, but when the schema defines a union of literals (either via S.literal('first', 'second') or S.union(S.literal('first'), S.literal('second')), the type in the match becomes never. Example:x is of type never, unless I get rid of the second argument to S.literal.