From 56c91811bed45ef94dce5afdb4194da2da09a9dd Mon Sep 17 00:00:00 2001 From: Adrien Crivelli Date: Mon, 7 Aug 2023 13:21:21 +0800 Subject: [PATCH] Specify option types --- .../src/lib/modules/matomo/matomo.service.spec.ts | 10 ++++++++-- .../dropdown-container.component.spec.ts | 8 ++++++-- src/main.ts | 4 ++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/projects/natural/src/lib/modules/matomo/matomo.service.spec.ts b/projects/natural/src/lib/modules/matomo/matomo.service.spec.ts index a0bba3e3..249fa4f3 100644 --- a/projects/natural/src/lib/modules/matomo/matomo.service.spec.ts +++ b/projects/natural/src/lib/modules/matomo/matomo.service.spec.ts @@ -1,5 +1,11 @@ import {TestBed} from '@angular/core/testing'; -import {NATURAL_SEO_CONFIG, NaturalMatomoService, NaturalSeo, NaturalSeoService} from '@ecodev/natural'; +import { + NATURAL_SEO_CONFIG, + NaturalMatomoService, + NaturalSeo, + NaturalSeoConfig, + NaturalSeoService, +} from '@ecodev/natural'; import {RouterTestingModule} from '@angular/router/testing'; import {Component} from '@angular/core'; import {Router, Routes} from '@angular/router'; @@ -46,7 +52,7 @@ describe('NaturalMatomoService', () => { provide: NATURAL_SEO_CONFIG, useValue: { applicationName: 'my app', - }, + } satisfies NaturalSeoConfig, }, ], }).compileComponents(); diff --git a/projects/natural/src/lib/modules/search/dropdown-container/dropdown-container.component.spec.ts b/projects/natural/src/lib/modules/search/dropdown-container/dropdown-container.component.spec.ts index b4500f67..b94cdffc 100644 --- a/projects/natural/src/lib/modules/search/dropdown-container/dropdown-container.component.spec.ts +++ b/projects/natural/src/lib/modules/search/dropdown-container/dropdown-container.component.spec.ts @@ -1,6 +1,10 @@ import {ComponentFixture, TestBed} from '@angular/core/testing'; import {NoopAnimationsModule} from '@angular/platform-browser/animations'; -import {NATURAL_DROPDOWN_CONTAINER_DATA, NaturalDropdownContainerComponent} from './dropdown-container.component'; +import { + NATURAL_DROPDOWN_CONTAINER_DATA, + NaturalDropdownContainerComponent, + NaturalDropdownContainerData, +} from './dropdown-container.component'; describe('NaturalDropdownContainerComponent', () => { let component: NaturalDropdownContainerComponent; @@ -12,7 +16,7 @@ describe('NaturalDropdownContainerComponent', () => { providers: [ { provide: NATURAL_DROPDOWN_CONTAINER_DATA, - useValue: {}, + useValue: {showValidateButton: false} satisfies NaturalDropdownContainerData, }, ], }).compileComponents(); diff --git a/src/main.ts b/src/main.ts index 7de7708d..52e3ba29 100644 --- a/src/main.ts +++ b/src/main.ts @@ -6,7 +6,7 @@ import {provideHttpClient} from '@angular/common/http'; import {routes} from './app/app-routing'; import {provideAnimations} from '@angular/platform-browser/animations'; import {bootstrapApplication} from '@angular/platform-browser'; -import {MAT_PAGINATOR_DEFAULT_OPTIONS} from '@angular/material/paginator'; +import {MAT_PAGINATOR_DEFAULT_OPTIONS, MatPaginatorDefaultOptions} from '@angular/material/paginator'; import {AnyLinkMutationService} from './app/shared/services/any-link-mutation.service'; import {DemoLoggerExtra} from './app/demo.error-handler'; import { @@ -52,7 +52,7 @@ bootstrapApplication(AppComponent, { provide: MAT_PAGINATOR_DEFAULT_OPTIONS, useValue: { formFieldAppearance: 'fill', - }, + } satisfies MatPaginatorDefaultOptions, }, provideAnimations(), provideHttpClient(),