const makeUpperCase = t.pattern( (input: string) => input.toUpperCase(), (input: number) => '' + input );
makeUpperCase('1') + makeUpperCase('1') = '11' (probably what you want) makeUpperCase(1) + makeUpperCase(1) = 2 (probably not what you want)
In other words, the result of "makeUppercase" should be a string, not a number.