Skip to content

Commit 95b1190

Browse files
Merge pull request #338 from FiestaRuless/bugfix/StronglyTypedModuleWithProviders
Bugfix/strongly typed module with providers
2 parents 5c8e726 + ec3969b commit 95b1190

File tree

7 files changed

+19
-7
lines changed

7 files changed

+19
-7
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
77

88
## Unreleased
99

10+
## [6.1.2] - 2024-08-20
11+
12+
### Fixed
13+
14+
- `ngx-pagination`: Add strongly typed return type for forChild() in ItemCounterModule, which is necessary in Angular 18.
15+
16+
### Changed
17+
- `ngx-calendar`: Changed ModuleWithProviders<any> to specific module in forChild()
18+
- `ngx-forms`: Changed ModuleWithProviders<any> to specific module in forChild()
19+
- `ngx-pagination`: Changed ModuleWithProviders<any> to specific module in forChild()
20+
- `ngx-table`: Changed ModuleWithProviders<any> to specific module in forChild()
21+
1022
## [6.1.1] - 2024-07-02
1123

1224
### Fixed

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"packages": [
33
"packages/*"
44
],
5-
"version": "6.1.1"
5+
"version": "6.1.2"
66
}

packages/ngx-calendar/src/lib/calendar.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class CalendarModule {
4141
static forChild(
4242
weekdayLabels: WeekdayLabelsConfig,
4343
monthLabels: MonthLabelsConfig
44-
): ModuleWithProviders<any> {
44+
): ModuleWithProviders<CalendarModule> {
4545
return {
4646
ngModule: CalendarModule,
4747
providers: [

packages/ngx-forms/src/lib/upload/upload.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { ValidationMessagesService } from './services/validation-messages.servic
2525
providers: [ValidationMessagesService, { provide: UPLOAD_VALIDATION_MESSAGES, useValue: {} }],
2626
})
2727
export class UploadModule {
28-
static forChild(validationMessages: ValidationMessages = {}): ModuleWithProviders<any> {
28+
static forChild(validationMessages: ValidationMessages = {}): ModuleWithProviders<UploadModule> {
2929
return {
3030
ngModule: UploadModule,
3131
providers: [{ provide: UPLOAD_VALIDATION_MESSAGES, useValue: validationMessages }],

packages/ngx-leaflet/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@acpaas-ui/ngx-leaflet",
3-
"version": "6.1.1",
3+
"version": "6.1.2",
44
"publishConfig": {
55
"access": "public"
66
},

packages/ngx-pagination/src/lib/item-counter/item-counter.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NgModule } from '@angular/core';
1+
import { ModuleWithProviders, NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33
import { FormsModule } from '@angular/forms';
44
import { IconModule } from '@acpaas-ui/ngx-icon';
@@ -31,7 +31,7 @@ export class ItemCounterModule {
3131
static forChild(
3232
itemCounterLabel: Label,
3333
itemsPerPageLabel: Label
34-
) {
34+
): ModuleWithProviders<ItemCounterModule> {
3535
return {
3636
ngModule: ItemCounterModule,
3737
providers: [

packages/ngx-pagination/src/lib/pagination/pagination.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { PaginationComponent } from './components/pagination/pagination.componen
1919
export class PaginationModule {
2020
static forChild(
2121
paginationLabels: PaginationLabels
22-
): ModuleWithProviders<any> {
22+
): ModuleWithProviders<PaginationModule> {
2323
return {
2424
ngModule: PaginationModule,
2525
providers: [{ provide: PAGINATION_LABELS, useValue: paginationLabels }],

0 commit comments

Comments
 (0)