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

devtypes

v2.0.0

Published

A comprehensive collection of highly-optimized TypeScript type utilities for building type-safe applications

Readme

TypeScript Advanced Type Utilities

A comprehensive collection of more than 150 high-performance TypeScript type utilities focused on type safety and developer experience.

Features

  • Zero Runtime Overhead - Pure type definitions
  • Type Safety - Advanced constraint utilities
  • Modular Design - Import only what you need
  • Rich Toolset - From basic to advanced type operations
  • IntelliSense Optimized - Great IDE support

Installation

npm install devtypes

Documentation

Read the full devtypes Documentation for detailed usage instructions, examples, and API references.

Quick Examples

Object Type Manipulation

import type { Merge } from 'devtypes/merge';
import type { RequireExactlyOne } from 'devtypes/constraint';

type UserBase = { id: number; name: string; email?: string };
type UserAuth = { email: string; password: string };

// Merge types (smart conflict resolution)
type User = Merge< UserBase, UserAuth >;
// { id: number; name: string; email: string; password: string }

// Require exactly one field
type LoginCredentials = RequireExactlyOne<
    { email?: string; phone?: string; username?: string; },
    'email' | 'phone' | 'username'
>;

Deep Utilities

import type { DeepPartial, DeepRequired } from 'devtypes/transform';

interface Config {
    server: {
        port: number;
        host: string;
        ssl?: {
            cert: string;
            key: string;
        };
    };
    database: {
        url: string;
        timeout?: number;
    };
}

// Make everything optional
type PartialConfig = DeepPartial< Config >;

// Make everything required
type FullConfig = DeepRequired< Config >;

Core Modules

| Module | Purpose | |--------|---------| | assert | Assertion utilities for compile-time checks | | class | Class-specific utilities: methods, properties, constructors | | condition | Conditional type utilities (If and Equals) | | constraint | Property requirement constraints and validation | | functional | Functional type utilities: curry, compose, promisify | | guard | Type guard utilities for runtime type checking | | list | List-like structures (arrays, sets, maps, records, iterables) | | merge | (Deep) merging and intersection of types | | object | Object type manipulation and property utilities | | primitive | Primitive type utilities and literal handling | | transform | (Deep) transformations for objects, arrays, and nested structures | | tuple | Tuple-specific utilities and manipulations | | union | Union type utilities: exclusion, extraction, conversion | | util | Generic utility types: branding, boxing, casting, simplification |

Performance Tips

Import from specific modules for best IDE performance:

// Good - direct import
import type { Brand } from 'devtypes/util';
import type { MethodNames } from 'devtypes/class';

// Avoid - star imports slow down IntelliSense
import * as Types from 'devtypes';

Contributing

Contributions are welcome! Please feel free to submit a pull request.

License

Copyright 2025–2026 Paul Köhler (komed3).
Distributed under the MIT license.