diff --git a/index.d.ts b/index.d.ts index bd56b54..79724a2 100644 --- a/index.d.ts +++ b/index.d.ts @@ -27,7 +27,7 @@ declare class Router { * @protected * @type {boolean} */ - protected debugMode: boolean + protected debugMode: boolean = false /** * CORS Config * @@ -186,9 +186,9 @@ declare class Router { /** * Debug Mode * - * @param {boolean} state Whether to turn on or off debug mode (default: true) + * @param {boolean} [state=true] Whether to turn on or off debug mode (default: true) */ - debug(state: boolean): void + debug(state?: boolean): void /** * Enable CORS support * diff --git a/index.js b/index.js index 8454d75..c7d51d1 100644 --- a/index.js +++ b/index.js @@ -221,7 +221,7 @@ class Router { /** * Debug Mode * - * @param {boolean} state Whether to turn on or off debug mode (default: true) + * @param {boolean} [state=true] Whether to turn on or off debug mode (default: true) */ debug(state = true) { this.debugMode = state