From 149c77017a58332f1673f37ad195049de50f9438 Mon Sep 17 00:00:00 2001 From: Traxus Date: Fri, 21 Apr 2023 19:28:09 -0400 Subject: [PATCH] ./src/lib/datocms-bypass.ts:72:6 Type error: Variable 'directories' implicitly has type 'any[]' in some locations where its type cannot be determined. Signed-off-by: Traxus --- src/lib/datocms-bypass.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/datocms-bypass.ts b/src/lib/datocms-bypass.ts index b8ecce0..f07b549 100644 --- a/src/lib/datocms-bypass.ts +++ b/src/lib/datocms-bypass.ts @@ -47,7 +47,7 @@ function getPageQueryBypassWhitelist() { //-----does not include iterative stuff like blog posts or events etc... //-----this may only end up being scaffolding. - let whitelist = []; + let whitelist : string [] = []; whitelist.push('aboutPage'); whitelist.push('careersPage'); @@ -69,7 +69,7 @@ function getPageQueryBypassWhitelist() { function getListingQueryDirectories() { //-----acts as a whitelist, but also points to the directory name of the listing if ever desired to make code less WET. - let directories = []; + let directories : any[] = []; //-----blog + category is handled in its own annoyingly special way //-----could bundle it in here to be DRY and verbose but will not in the intrest of current time/budget @@ -90,7 +90,7 @@ function getListingQueryDirectories() { function getListingDirectoryByQueryParent(parent : string) { //-----this acts as a whitelist and a mapping to the folder name... - let directories = getListingQueryDirectories() ; + let directories : any[] = getListingQueryDirectories() ; let directory = ''; if (typeof directories[parent] === 'undefined') {