identity-type
v1.0.0
Published
TypeScript identity type — type aliases that return the input type unchanged
Maintainers
Readme
identity-type
A TypeScript identity type — type aliases that return the input type unchanged.
Aliases
| Type | Description |
| ---------------- | ---------------------------------------------- |
| Identity<T> | Returns the type unchanged |
| Relation<T> | Already common in TypeORM |
| Self<T> | Emphasizes that the type refers to itself |
| Same<T> | Clear that the output equals the input |
| AsIs<T> | Take the type as it is |
| Unchanged<T> | Explicitly says no transformation |
| Lazy<T> | Indicates a lazily evaluated type |
| Forward<T> | Used for forwarding generic parameters |
| Ref<T> | Reference wrapper for types |
| Alias<T> | Alternative name for a type |
| Placeholder<T> | Placeholder for a type parameter |
| K<T> | From combinatory logic (K is constant) |
| I<T> | Short for identity, returns the type unchanged |
License
MIT License (c) 2026
