fix(core): Fix TypeScript type definition for route match function

This commit is contained in:
Philipp Kunz 2024-10-06 22:39:05 +02:00
parent 4c27d17769
commit 87be53841b
3 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,10 @@
# Changelog
## 2024-10-06 - 1.3.2 - fix(core)
Fix TypeScript type definition for route match function
- Updated the type definition for the matchFunction in the SmartRouter class to include a generic parameter.
## 2024-10-06 - 1.3.1 - fix(dependencies)
Updated dependencies to latest versions, resolving compatibility issues and improving performance.

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartrouter',
version: '1.3.1',
version: '1.3.2',
description: 'A JavaScript library providing routing capabilities for web applications.'
}

View File

@ -32,7 +32,7 @@ export class SmartRouter {
* the routes we are handling
*/
public routes: Array<{
matchFunction: plugins.pathToRegExp.MatchFunction;
matchFunction: plugins.pathToRegExp.MatchFunction<any>;
handler: THandlerFunction;
}> = [];