From 30ea9a8b9d751a64caad328763c5d04b34c57931 Mon Sep 17 00:00:00 2001 From: Barron Hagerman Date: Wed, 10 Jan 2024 09:39:31 -0600 Subject: [PATCH] fix:RouteConfig typedef * Fixes the `RouteConfig` `typedef` annotation (see https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler#typedef-type) --- router.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/router.js b/router.js index 13026e9..31d344a 100644 --- a/router.js +++ b/router.js @@ -16,14 +16,16 @@ */ /** - * @typedef {Object} RouteConfig - * @property {string} id - * @property {string} tagName - * @property {string} path - * @property {Array=} params - * @property {boolean=} authenticated - * @property {Array=} subRoutes + * @typedef {{ + * id: string, + * tagName: string, + * path: string, + * params: (Array|undefined), + * authenticated: (boolean|undefined), + * subRoutes: (Array|undefined), + * }} */ +let RouteConfig; import {Context, Page} from './lib/page.js'; import RouteTreeNode from './lib/route-tree-node.js';