From 87be53841bcb66b985dd2b38ca4b802087f93f83 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Sun, 6 Oct 2024 22:39:05 +0200 Subject: [PATCH] fix(core): Fix TypeScript type definition for route match function --- changelog.md | 5 +++++ ts/00_commitinfo_data.ts | 2 +- ts/smartrouter.classes.smartrouter.ts | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 10203c3..4a1a65e 100644 --- a/changelog.md +++ b/changelog.md @@ -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. diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 38b5fd2..33ccac9 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -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.' } diff --git a/ts/smartrouter.classes.smartrouter.ts b/ts/smartrouter.classes.smartrouter.ts index 389593a..a346763 100644 --- a/ts/smartrouter.classes.smartrouter.ts +++ b/ts/smartrouter.classes.smartrouter.ts @@ -32,7 +32,7 @@ export class SmartRouter { * the routes we are handling */ public routes: Array<{ - matchFunction: plugins.pathToRegExp.MatchFunction; + matchFunction: plugins.pathToRegExp.MatchFunction; handler: THandlerFunction; }> = [];