Add type utilities: KeyOf, Template, DeepPartial, Partial, Required, Pick, Omit#17
Merged
Add type utilities: KeyOf, Template, DeepPartial, Partial, Required, Pick, Omit#17
Conversation
…Pick, Omit Add the following type utilities: - KeyOf[T]: Returns all member names as a tuple of Literal types - Template[*Parts]: Template literal string builder - DeepPartial[T]: Make all fields recursively optional - Partial[T]: Make all fields optional (non-recursive) - Required[T]: Remove Optional from all fields - Pick[T, K]: Pick specific fields from a type - Omit[T, K]: Omit specific fields from a type Add comprehensive tests for all new types. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
8a87ffb to
fba80da
Compare
- Add more complex tests for KeyOf (order preservation) - Add more tests for DeepPartial (optional fields, type preservation) - Add more tests for Partial (union types) - Add more tests for Required (multiple optionals) - Add more tests for Pick (single-element tuples) - Add more tests for Omit (single-element tuples, all fields omitted) - Add Template tests (basic functionality verification) Total: 155 tests passing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update version from 0.1.2 to 0.2.0 - Add CHANGELOG.md with release notes - Add examples for new type utilities in README.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add comprehensive type utilities for type manipulation:
Examples
KeyOf[T]
Template[*Parts]
DeepPartial[T]
Partial[T]
Required[T]
Pick[T, K]
Omit[T, K]
Test Plan
All 155 tests pass.
🤖 Generated with Claude Code