export class UpdateFirstSectionDto {
@IsString()
@ApiProperty()
logo: FileDto
@IsString()
@ApiProperty()
slogan: string
@IsString()
@ApiProperty()
title: string
@IsString()
@ApiProperty()
subtitle: string
@IsString()
@ApiProperty()
buttonMoreText: string
}
src/homepage/homepage.controller.ts:35:5 - error TS2322: Type 'FirstSectionDto' is not assignable to type 'UpdateFirstS
ectionDto'.
Types of property 'logo' are incompatible.
Type 'string' is not assignable to type 'FileDto'.
35 return await this.homepageService.updateFirstSection(updateFirstSectionDto);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/homepage/homepage.service.ts:26:5 - error TS2322: Type 'Homepage' is not assignable to type 'HomepageDto'.
The types of 'firstSection.logo' are incompatible between these types.
Type 'File' is not assignable to type 'string'.
26 return await this.homepageModel.findOne(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
27 {},
~~~~~~~~~
...
30 .populate('feedbackSection.feedback portfolioSection.portfolio')
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31 .exec();
~~~~~~~~~~~~~~
src/homepage/homepage.service.ts:39:9 - error TS2769: No overload matches this call.
The last overload gave the following error.
Type 'UpdateFirstSectionDto' is not assignable to type '{ logo: File; slogan: string; title: string; subtitle: stri
ng; buttonMoreText: string; }'.
Types of property 'logo' are incompatible.
Type 'FileDto' is missing the following properties from type 'File': increment, model, $isDeleted, remove, and
51 more.
39 { firstSection: updateFirstSectionDto },
~~~~~~~~~~~~
src/homepage/schemas/homapage.schema.ts:16:3
16 firstSection: {
~~~~~~~~~~~~
The expected type comes from property 'firstSection' which is declared here on type 'MongooseUpdateQuery age, "_id" | "firstSection" | "detailsSection" | "canIHelpSection" | "questionAnswerSection" | "stepByStepSection" | "c
ontactsSection" | "preFooterSection" | "feedbackSection" | "portfolioSection">>'
node_modules/@types/mongoose/index.d.ts:3546:5
3546 findOneAndUpdate(conditions: FilterQuery, update: UpdateQuery,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3547 options: QueryFindOneAndUpdateOptions,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3548 callback?: (err: any, doc: T | null, res: any) => void): DocumentQuery & Quer
yHelpers;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~
The last overload is declared here.
src/homepage/homepage.service.ts:44:5 - error TS2322: Type '{ logo: File; slogan: string; title: string; subtitle: stri
ng; buttonMoreText: string; }' is not assignable to type 'FirstSectionDto'.
44 return updatedDocument.firstSection;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[18:39:28] Found 4 errors. Watching for file changes.