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

@deeplink-devtools/typegen

v0.1.0

Published

Generates TypeScript route types and compile-time-checked deep-link builders from a route table.

Readme

@deeplink-devtools/typegen

Typed deep links for React Native, generated from your route table.

This package is the code generator behind rndl typegen. Most people never import it directly: they run the CLI, which uses it to write a TypeScript module into their app. It works with both Expo Router and React Navigation.

Usage

Run the generator from the rndl CLI (no need to install this package):

# Expo Router
npx rndl typegen --out src/deeplinks.gen.ts --app-dir src/app

# React Navigation
npx rndl typegen --out src/deeplinks.gen.ts --config src/navigation/linking.ts#linking

Pass --watch to regenerate whenever your routes change, and --scheme myapp to override the scheme baked into the output (by default it is read from app.json or your linking prefixes).

The generated module has no default export and imports its small runtime from @deeplink-devtools/core, so add that as a dependency of your app:

npm install @deeplink-devtools/core

What you get

Given a route like /users/[id] (Expo Router) or /users/:id (React Navigation), the generated file exports:

import { buildDeepLink, useTypedParams } from './deeplinks.gen';

// Build a link. The route and its params are checked at compile time.
const url = buildDeepLink('/users/[id]', { id: '42' });
// => 'myapp://users/42'

// Override the baked-in scheme when you need a universal link.
const web = buildDeepLink('/users/[id]', { id: '42' }, 'https://example.com');
// => 'https://example.com/users/42'

// Read the current screen's params, typed for the route.
const { id } = useTypedParams<'/users/[id]'>();

A wrong route key, a missing required param, or a mistyped param value fails tsc, so a broken deep link is caught before it ships.

  • Route keys are router-native: Expo Router uses the bracket form you author (/users/[id], /posts/[...slug]); React Navigation keeps its colon patterns (/users/:id).
  • Catch-all params are one a/b/c string when you build a link, and a string[] when you read them back (matching what the router returns).
  • React Navigation params defined with a custom parse function are typed unknown, since their runtime type is not knowable from the config.

API

If you are building your own tooling, the package exports a pure generator:

import { generateDeepLinkTypes } from '@deeplink-devtools/typegen';
import type { RouteTable } from '@deeplink-devtools/core';

const source: string = generateDeepLinkTypes(routeTable, { defaultPrefix: 'myapp://' });

Full documentation lives at vengalath.com/npm/react-native-deeplink-devtools/typegen. See the root README for the rest of the toolkit.

License

MIT