Skip to content

Conversation

@merlinz01
Copy link

Without type definitions, users who wish to use this library in their TypeScript project get build errors and no type checking. This PR adds a simple type declaration file and registers it in package.json.

Manually making these changes to the installed package in node_modules confirms that it works:

image image

@scarf005 scarf005 mentioned this pull request Aug 19, 2025
@panphora
Copy link
Owner

Thank you for this contribution! I've just merged a comprehensive TypeScript definitions file that addresses the need for TypeScript support.

The implementation I've added includes:

  • Complete TypeScript definitions in src/overtype.d.ts with all public APIs, options, and types
  • A test file (test-types.ts) to validate the type definitions
  • TypeScript added as a dev dependency

The definitions cover all the functionality including the main OverType class, all configuration options, theme system, toolbar, shortcuts, and static methods.

Since TypeScript support has now been added to the main branch (commit 4c324d0), I'll close this PR. Thank you again for bringing this to our attention and for your initial implementation!

@panphora panphora closed this Aug 20, 2025
panphora added a commit that referenced this pull request Aug 20, 2025
Credit kbhomes for overscroll fix (#17) and merlinz01 for TypeScript definitions (#20)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@panphora
Copy link
Owner

Update: Your contribution has been credited in the README! Thank you again for helping improve OverType with TypeScript support.

You can see the credit here: https://github.com/panphora/overtype#contributors

panphora added a commit that referenced this pull request Aug 20, 2025
Credit kbhomes for overscroll fix (#17) and merlinz01 for TypeScript definitions (#20)

🤖 Generated with [Claude Code](https://claude.ai/code)
panphora added a commit that referenced this pull request Aug 20, 2025
Credit kbhomes for overscroll fix (#17) and merlinz01 for TypeScript definitions (#20)

🤖 Generated with [Claude Code](https://claude.ai/code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants