Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
sinclairzx81 authored Feb 18, 2023
1 parent 1159041 commit 5a520a1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions example/trpc/readme.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# TypeBox TRPC Integration
# Using TypeBox with TRPC

To use TypeBox with TRPC, you will need to wrap types passed to procedures within a TRPC compatible assert function. Once wrapped, TypeBox can offer typical auto type inference for procedures, enhanced runtime checking performance and enable publishable procedure schematics based on the JSON Schema specification.

## Contents

- [Example](#Example)
- [TypeCompiler](#TypeComplier)
- [TypeCompiler](#TypeCompiler)
- [Value](#Value)
- [Ajv](#Ajv)

<a name="Example"></a>

## Example

The following example shows a minimal TypeBox TRPC setup with the `IoType` wrapper function described in the sections below.
Expand Down Expand Up @@ -94,4 +96,4 @@ export const IoType = <T extends TSchema>(schema: T, references: TSchema[] = [])
throw new TRPCError({ message: `${message} for ${instancePath}`, code: 'BAD_REQUEST' })
})()
}
```
```

0 comments on commit 5a520a1

Please sign in to comment.