How to infer types from input?

PBPieter Berkel3/7/2023
When I call my procedure from the client I send an array of strings as an input. How can I infer the strings so they are returned in the response (see client code comment)

On server:
example: publicProcedure
    .input(z.object({ names: z.array(z.string()) }))
    .query(({ input }) => {
      return input.names.reduce((acc, name) => {
        return {
          [name]: Math.random(),
      }, {});

On client:
  const { data } = trpc.router.example.useQuery({
    names: ["Hello", "World"]

  // infer types from query input / autocomplete
  const { Hello, World } = data
PBPieter Berkel3/7/2023
I think this is only for getting the response- or the input types. What I want for example:

const {.data } = trpc.example.useQuery(['one', 'two'])

// type of data variable
// readonly ["one", "two"] <- infered from input