Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Snippets] Added some helper types for Typescript#239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Mathys-Gasnier merged 1 commit intoquicksnip-dev:mainfromaelshinawy:main
Jan 26, 2025

Conversation

@aelshinawy
Copy link
Contributor

Description

I added 10 handy Typescript helper types

1. At Least One Key
  Ensures that at least one property of an object is required.
2. Deep Partial Type
  Converts all properties of a type, including nested objects, into optional.
3. Deep Read-only Type
  Converts all properties of a type, including nested objects, into readonly.
4. Deep Required Type
  Converts all properties of a type, including nested objects, into required.
5. Keys of Type
  Extracts keys from an object type that match a specified value type.
6. Keys to Optional
  Makes only the specified keys of an object type optional.
7. Nullable Keys
  Extracts keys from an object type that allow null or undefined values.
8. Omit Keys of Type
  Removes keys of a specified type from an object type.
9. Required Keys
  Extracts required keys from an object.
10. Union to Intersection
  Converts a union type into an intersection type.

Type of Change

  • ✨ New snippet
  • 🛠 Improvement to an existing snippet
  • 🐞 Bug fix
  • 📖 Documentation update
  • 🔧 Other (please describe):

Checklist

  • I have tested my code and verified it works as expected.
  • My code follows the style and contribution guidelines of this project.
  • Comments are added where necessary for clarity.
  • Documentation has been updated (if applicable).
  • There are no new warnings or errors from my changes.

Related Issues

Closes #

Additional Context

Screenshots (Optional)

Click to view screenshots

Copy link
Collaborator

@Mathys-GasnierMathys-Gasnier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Great work !

aelshinawy reacted with heart emoji
@Mathys-GasnierMathys-Gasnier merged commitdf7dcbf intoquicksnip-dev:mainJan 26, 2025
4 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@Mathys-GasnierMathys-GasnierMathys-Gasnier approved these changes

@majvaxmajvaxAwaiting requested review from majvax

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@aelshinawy@Mathys-Gasnier

[8]ページ先頭

©2009-2025 Movatter.jp