@e22m4u/js-trie-router 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  ## @e22m4u/js-trie-router
2
2
 
3
+ ![npm version](https://badge.fury.io/js/@e22m4u%2Fjs-trie-router.svg)
4
+ ![license](https://img.shields.io/badge/license-mit-blue.svg)
5
+
3
6
  HTTP маршрутизатор для Node.js на основе
4
7
  [префиксного дерева](https://ru.wikipedia.org/wiki/Trie) (trie).
5
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e22m4u/js-trie-router",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "HTTP маршрутизатор для Node.js на основе префиксного дерева",
5
5
  "author": "Mikhail Evstropov <e22m4u@yandex.ru>",
6
6
  "license": "MIT",
@@ -13,7 +13,6 @@ type RouteMockOptions = {
13
13
  /**
14
14
  * Create route mock.
15
15
  *
16
- * @param {Route} options
17
- * @returns {Route}
16
+ * @param options
18
17
  */
19
- export function createRouteMock(options: RouteMockOptions): Route;
18
+ export function createRouteMock(options?: RouteMockOptions): Route;
@@ -2,15 +2,15 @@ import {Route, HttpMethod} from '../route.js';
2
2
 
3
3
  /**
4
4
  * @typedef {object} RouteMockOptions
5
- * @property {HttpMethod} method
6
- * @property {string} path
7
- * @property {import('../route.js').RouteHandler} handler
5
+ * @property {string|undefined} method
6
+ * @property {string|undefined} path
7
+ * @property {Function|undefined} handler
8
8
  */
9
9
 
10
10
  /**
11
11
  * Create route mock.
12
12
  *
13
- * @param {Route} options
13
+ * @param {RouteMockOptions|undefined} options
14
14
  * @returns {Route}
15
15
  */
16
16
  export function createRouteMock(options = {}) {