more typing
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user