PrincePrajapati7
New member
I'm getting TypeScript type errors when trying to make the MinIO client optional in the Fastify instance type.
My .env file contains:
API_MINIO_ENABLED=false
API_MINIO_ACCESS_KEY=""
API_MINIO_END_POINT=""
API_MINIO_PORT=9000
Error:
Type 'MinioClient | undefined' is not assignable to type 'MinioClient'
Type 'undefined' is not assignable to type 'MinioClient'
Any guidance on how to properly type and handle this optional dependency would be greatly appreciated and If you have complete steps that how to setup the working environment for talawa-api, Please provide me. Thanks!!
My .env file contains:
API_MINIO_ENABLED=false
API_MINIO_ACCESS_KEY=""
API_MINIO_END_POINT=""
API_MINIO_PORT=9000
Error:
Type 'MinioClient | undefined' is not assignable to type 'MinioClient'
Type 'undefined' is not assignable to type 'MinioClient'
Any guidance on how to properly type and handle this optional dependency would be greatly appreciated and If you have complete steps that how to setup the working environment for talawa-api, Please provide me. Thanks!!