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

ts-deep-types

v0.1.0-beta.1

Published

Type-safe utility types for TypeScript. Deep types, string manipulation, function helpers, and React integration.

Readme

ts-deep-types

A comprehensive collection of type-safe utility types for TypeScript.

npm version License MIT Test Status


What It Does

Provides missing TypeScript utility types that should exist in the standard library but don't:

  • Deep types — Recursive transformations on nested objects
  • String types — Case conversion (camelCase, snake_case, kebab-case)
  • Function types — Parameter/return type extraction
  • Type guards — Runtime type checking
  • Object utilities — Key/value manipulation

Installation

# npm
npm install ts-deep-types

# pnpm
pnpm add ts-deep-types

# yarn
yarn add ts-deep-types

Usage

import { DeepPartial, CamelCase, Parameters, IsAny } from 'ts-deep-types'

// Deep types
type PartialConfig = DeepPartial<{
  database: { host: string; port: number }
}>
// { database?: { host?: string; port?: number } | undefined }

// String types
type CamelStr = CamelCase<'hello_world'>
// 'helloWorld'

// Function types
type FnParams = Parameters<(a: string, b: number) => void>
// [string, number]

// Type guards
type TestAny = IsAny<any>      // true
type TestNever = IsAny<never>   // false

Features

Core Types

  • DeepPartial - Recursive partial types
  • DeepRequired - Recursive required types
  • DeepReadonly - Deep readonly for nested objects
  • PickDeep - Deep pick with nested paths
  • OmitDeep - Deep omit with nested paths
  • Merge - Merge two object types
  • UnionToIntersection - Convert union to intersection

String Types

  • CamelCase - Convert to camelCase
  • KebabCase - Convert to kebab-case
  • SnakeCase - Convert to snake_case
  • PascalCase - Convert to PascalCase
  • Trim - Trim strings in templates

Function Types

  • Parameters - Function parameters
  • ReturnType - Return type
  • ThisParameterType - this parameter type
  • AsyncReturnType - Async version of ReturnType

Type Guards

  • IsAny - Check if type is any
  • IsNever - Check if type is never
  • IsUnknown - Check if type is unknown
  • IsUnion - Check if type is a union
  • IsTuple - Check if type is a tuple
  • IsArray - Check if type is an array
  • IsPlainObject - Check if type is a plain object
  • IsFunction - Check if type is a function
  • IsConstructor - Check if type is a constructor

Object Utilities

  • KeysOfType - Keys matching a type
  • ValueOf - Values of a union type
  • EntryOf - Key-value entries
  • RequiredKeys - Keys that are required
  • OptionalKeys - Keys that are optional
  • ReadonlyKeys - Keys that are readonly
  • WritableKeys - Keys that are mutable

Why ts-deep-types?

TypeScript's standard utility types (Partial, Pick, Omit) only work at one level. When you need recursive transformations, you're on your own.

ts-deep-types provides the missing utilities:

// Standard library (one level)
type A = Partial<{ a: { b: { c: string } } }>
// { a?: { b?: { c?: string } } | undefined } | undefined

// ts-deep-types (recursive)
type B = DeepPartial<{ a: { b: { c: string } } }>
// { a?: { b?: { c?: string } } | undefined } | undefined }
// All levels are partial!

Development

# Install dependencies
pnpm install

# Run tests
pnpm test

# Build for production
pnpm build

License

MIT © Peter W.


Contributing

Issues and PRs welcome!