Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
72b59be
rework the modules entirely
komed3 Jan 27, 2026
02503be
re-implement If, IfEquals and Equals
komed3 Jan 27, 2026
b9b0913
implement EqualsMany type
komed3 Jan 27, 2026
047d181
implement cond. types as its own module
komed3 Jan 27, 2026
67937f5
define assertion types
komed3 Jan 27, 2026
de1fd4b
add JSDoc comments
komed3 Jan 27, 2026
e7d140b
Update assert.d.ts
komed3 Jan 27, 2026
7d1e50c
add AssertTypeWeak
komed3 Jan 27, 2026
556b973
reimplement all types for the primitive module
komed3 Jan 27, 2026
f9e8150
implement type guards
komed3 Jan 27, 2026
9ae3b06
Update util.d.ts
komed3 Jan 27, 2026
38e4384
re-implement class based types
komed3 Jan 27, 2026
0d4007e
add functional types
komed3 Jan 27, 2026
61f1176
add list-like types
komed3 Jan 27, 2026
074f507
add list-like type guard
komed3 Jan 27, 2026
68aa613
fixing types
komed3 Jan 27, 2026
e878b4a
Update list.d.ts
komed3 Jan 27, 2026
72112d9
create object-like type utility
komed3 Jan 27, 2026
2a45eb8
add object-like types
komed3 Jan 27, 2026
2a66164
add ReadonlyProperty / MutableProperty types
komed3 Jan 27, 2026
c6f4b79
add plain object type
komed3 Jan 27, 2026
e7a595d
add (deep) transforming types
komed3 Jan 27, 2026
34a44b9
re-implement path generator
komed3 Jan 27, 2026
c4c86aa
add utility types
komed3 Jan 27, 2026
24d165a
add cond. type for exact matching (ensure no extra props)
komed3 Jan 27, 2026
def03e9
Update collection.d.ts
komed3 Jan 27, 2026
c0af04e
rename module
komed3 Jan 27, 2026
b0d6428
add constraint types
komed3 Jan 27, 2026
bc04c19
Update union.d.ts
komed3 Jan 27, 2026
171384a
add tuple types
komed3 Jan 27, 2026
71b4703
move type
komed3 Jan 27, 2026
e345ddc
export all types from index
komed3 Jan 27, 2026
679305f
add tuple types head, tail, length and reverse
komed3 Jan 27, 2026
53a3d3c
concatenate two tuples
komed3 Jan 27, 2026
b154e7c
implement missing tuple type guard + some other tuple-like types
komed3 Jan 27, 2026
041e364
add missing type guards
komed3 Jan 27, 2026
e0fe96f
add multiple new union types
komed3 Jan 27, 2026
bd591fb
Update README.md
komed3 Jan 27, 2026
2b464bc
2.0.0
komed3 Jan 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 20 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# TypeScript Advanced Type Utilities

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

## Features

Expand All @@ -25,8 +25,8 @@ Read the full **[devtypes Documentation](https://komed3.github.io/devtypes/index
### Object Type Manipulation

```ts
import type { Merge } from 'devtypes/collections';
import type { RequireExactlyOne } from 'devtypes/constraints';
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 };
Expand All @@ -45,7 +45,7 @@ type LoginCredentials = RequireExactlyOne<
### Deep Utilities

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

interface Config {
server: {
Expand Down Expand Up @@ -73,24 +73,29 @@ type FullConfig = DeepRequired< Config >;

| Module | Purpose |
|--------|---------|
| **base** | Foundational types: conditionals, guards, type equality |
| **primitives** | Primitive type utilities and literal handling |
| **collections** | Deep transformations (merging, partial, required, readonly, mutable) |
| **lists** | List-like structures (arrays, sets, maps, records, iterables) |
| **combinators** | Union/tuple/intersection transformations |
| **constraints** | Property requirement constraints and validation |
| **functionals** | Function type utilities: curry, compose, promisify |
| **classes** | Class-specific utilities: methods, properties, constructors |
| **utils** | General-purpose transformations and key filtering |
| **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 |
| **function** | Function 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:

```ts
// Good - direct import
import type { Merge } from 'devtypes/utils';
import type { MethodNames } from 'devtypes/classes';
import type { Brand } from 'devtypes/util';
import type { MethodNames } from 'devtypes/class';

// Avoid - star imports slow down IntelliSense
import * as Types from 'devtypes';
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "devtypes",
"description": "A comprehensive collection of highly-optimized TypeScript type utilities for building type-safe applications",
"license": "MIT",
"version": "1.1.0",
"version": "2.0.0",
"author": {
"name": "komed3 (Paul Köhler)",
"email": "webmaster@komed3.de",
Expand Down
Loading