more typing

This commit is contained in:
Elliot DeNolf
2020-11-21 20:10:27 -05:00
parent 60afdd239c
commit eb3d299521
7 changed files with 19 additions and 16 deletions

View File

@@ -1,7 +1,7 @@
import path from 'path';
import fs from 'fs';
const findConfig = () => {
const findConfig = (): string => {
// If the developer has specified a config path,
// format it if relative and use it directly if absolute
if (process.env.PAYLOAD_CONFIG_PATH) {

View File

@@ -60,7 +60,7 @@ export type Config = {
cookiePrefix?: string;
csrf?: string[];
cors?: string[];
publicENV: { [key: string]: string };
publicENV?: { [key: string]: string };
routes?: {
api?: string;
admin?: string;
@@ -102,7 +102,7 @@ export type Config = {
maxComplexity?: number;
disablePlaygroundInProduction?: boolean;
};
components: { [key: string]: JSX.Element | (() => JSX.Element) };
components?: { [key: string]: JSX.Element | (() => JSX.Element) };
paths?: { [key: string]: string };
hooks?: {
afterError?: () => void;