How to use yup’s object.shape with typescript?
following the yup guide here you should change your code as follows: import { object, SchemaOf, string } from ‘yup’; interface BaseBootstrapSchema { APPLICATION_NAME: string; LOG_PATH: string; } const bootstrapValidationSchema: SchemaOf<BaseBootstrapSchema> = object({ LOG_PATH: string().required(“The ‘LOG_PATH’ ENV variable is required”), APPLICATION_NAME: string().required(“The ‘APPLICATION_NAME’ ENV variable is required”), }); module.exports = (schema: SchemaOf<BaseBootstrapSchema>) => new Promise((resolve, … Read more