Skip to content

Conversation

@djunehor
Copy link

@djunehor djunehor commented Nov 9, 2025

This PR adds comprehensive TypeScript type definitions directly to the package and enables proper ES6 class extension for HttpError, resolving issues #98 and #100. The implementation replaces the old function-based HttpError with a proper ES6 class, allowing users to extend HttpError without abstract class restrictions. TypeScript definitions are provided in index.d.ts with full CommonJS export support and complete type coverage for all functions and overloads. All existing functionality remains backward compatible with 100% test coverage maintained and new tests added for both TypeScript integration and ES6 class extension scenarios. Users can now import TypeScript types directly from the package without requiring @types/http-errors and can properly extend HttpError classes with full prototype chain inheritance.

Fixes:

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.

Include typescript typings in the package Allow HttpError extension by ES6 classes

1 participant