Shouldn't the uppercase of a number be a string?
const makeUpperCase = t.pattern(
(input: string) => input.toUpperCase(),
(input: number) => '' + input
);
Otherwise you get odd behaviours like: makeUpperCase('1') + makeUpperCase('1') = '11' (probably what you want)
makeUpperCase(1) + makeUpperCase(1) = 2 (probably not what you want)