Skip to content
TypeWire

// EXAMPLES

Runnable, and self-asserting

Every example builds against the packages in this repo rather than a published version, so it cannot drift from the source. Several are headless: they assert and exit, which is why they run in CI.

Smallest possible typesocket example — contract, server, client, in three files.

  • typesocket
pnpm --filter @typewire-examples/basic start

Real-time chat built on one typesocket contract — socket.io server, React UI, live frame inspector.

  • type-permission
  • typesocket
pnpm --filter @typewire-examples/chat dev

The query layer and the cross-transport inspector on one contract — useQuery/useMutation over HTTP and WS, in a single cache and a single timeline.

  • type-devtools
  • type-devtools-core
  • typefetch
  • typefetch-query-core
  • typefetch-react
  • typesocket
pnpm --filter @typewire-examples/query dev

transports

source ↗

One client, three wires — REST, GraphQL and gRPC on a single contract, with errors that normalize across all of them.

  • typefetch
  • typefetch-graphql
  • typefetch-grpc
pnpm --filter @typewire-examples/transports start