./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 <shyidx@gmail.com>
This commit is contained in:
Traxus 2023-04-21 19:28:09 -04:00
parent b2dc5d14c4
commit 149c77017a

View File

@ -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') {