npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dyadpy/ts

v0.3.0

Published

Deprecated shim. @dyadpy/ts has been renamed to @causewayjs/ts — install that instead.

Readme

@dyadpy/ts

The tiny TypeScript runtime imported by Dyadpy-generated clients.

pnpm add @dyadpy/ts

You shouldn't have to think about this package much. The dyadpy Python CLI writes a generated client/ directory into your frontend that imports from @dyadpy/ts. That's it.

Why @dyadpy/ts and not @dyadpy/react? Because this package is intentionally framework-agnostic. It's the tiny TypeScript runtime that the generated client imports regardless of where it ends up — Next.js, Vite + React, SvelteKit, SolidStart, Astro, plain HTML, a Node script. The name @dyadpy/ts reflects the language (TypeScript), not a framework. Framework-specific bindings live in their own packages:

| Package | What it adds | Status | | ---------------- | --------------------------------------------------------------------- | ----------------------- | | @dyadpy/ts | The core TypeScript runtime. Required. | v0.1 (this package) | | @dyadpy/react | useQuery, useSubscription, useMutation hooks via TanStack Query | v0.1 | | @dyadpy/svelte | Svelte 5 store bindings | v0.1 | | @dyadpy/solid | SolidJS createResource / signal bindings | v0.1 |

If you only need React, you'll still install @dyadpy/ts (the generated client imports it) plus @dyadpy/react for the hooks.

Hard rules I've held this package to:

  • Zero runtime dependencies. Anything we need (SSE parsing, nested dispatch) ships inline.
  • Tree-shakable. ESM-first, side-effect-free.
  • Tiny. Target is under ~3 KB min+gz. We check it in CI.

What's in it

| Export | What it does | | -------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | | createLazyClient<ApiRoutes>({ routeMeta, loadRoute, baseUrl, headers, fetch }) | Returns the nested object your generated api.* calls dispatch through while loading full route descriptors on demand. | | forwardHeaders(request) | Copies cookies/auth/tracing headers into SSR calls. | | parseSSE(stream) | Streams a ReadableStream<Uint8Array> into typed SSE frames. | | unwrapResult(value) | Unwrap a Result<T, E> envelope onto data / throw error. Used by the binding packages. | | Result<T, E> (type) | \{ ok: true; data: T \} \| \{ ok: false; error: E \} — output of @raises routes. | | Ok<R> / Err<R> (types) | Extract success / error type from a route's Return. |

If you find yourself reaching for something else, that's probably a bug in the codegen — open an issue.

License

MIT