xtrpc icon indicating copy to clipboard operation
xtrpc copied to clipboard

The declaration file can be pruned further

Open kran6a opened this issue 1 year ago • 1 comments

The following endpoint fields can be stripped without affecting type inference:

  • transformer
  • _input_out (result of transforming the raw input via the zod schema .transform() method)
  • _output_in (what is returned by the procedure before being transformed by the zod output schema)
  • middleware
  • _ctx_out
  • _meta
  • _config (not sure if it affects type inferency in any way)

Some fields are leaking implementation data if present in the declaration file on top of not being required for inference

kran6a avatar Dec 22 '23 14:12 kran6a