Skip to content

Conversation

kushagra-goyal-14
Copy link
Contributor

@kushagra-goyal-14 kushagra-goyal-14 commented Jul 24, 2025

What?

Part of #67691

Migrating the keyboard-shortcuts package to TypeScript.

Why?

To enhance DX and add type safety.

How?

By porting the code and tests to TypeScript.

Testing Instructions

Typecheck and unit tests.

@kushagra-goyal-14 kushagra-goyal-14 changed the title TypeScript: migrate keyboard-shortcut package to TS TypeScript: migrate keyboard-shortcuts package to TS Jul 24, 2025
@kushagra-goyal-14 kushagra-goyal-14 marked this pull request as ready for review July 24, 2025 14:05
Copy link

github-actions bot commented Jul 24, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: kushagra-goyal-14 <kush123@git.wordpress.org>
Co-authored-by: manzoorwanijk <manzoorwanijk@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano t-hamano mentioned this pull request Jul 25, 2025
39 tasks
@t-hamano t-hamano added [Type] Code Quality Issues or PRs that relate to code quality [Package] Keyboard Shortcuts /packages/keyboard-shortcuts labels Jul 25, 2025
Comment on lines 1 to 2
const useShortcut = (): null => null;
export default useShortcut;
Copy link
Member

Choose a reason for hiding this comment

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

We don't need to set the return type here. TS can inference it easily and it will preserve the git history for the file.

@kushagra-goyal-14
Copy link
Contributor Author

Updated the changes 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Keyboard Shortcuts /packages/keyboard-shortcuts [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants