Skip to content

Commit

Permalink
fix: when enable strictTemplates, incorrect types error on boolean in…
Browse files Browse the repository at this point in the history
…put value
  • Loading branch information
dylannnn authored and MurhafSousli committed Jun 21, 2023
1 parent c0cd74f commit 0f8fbab
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
8 changes: 7 additions & 1 deletion projects/ngx-scrollbar-demo/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,11 @@
],
"include": [
"src/**/*.d.ts"
]
],
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
}
}
12 changes: 6 additions & 6 deletions projects/ngx-scrollbar/src/lib/ng-scrollbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class NgScrollbar implements OnInit, OnChanges, AfterViewInit, OnDestroy
return this._disabled;
}

set disabled(disabled: boolean) {
set disabled(disabled: boolean | string) {
this._disabled = coerceBooleanProperty(disabled);
}

Expand All @@ -66,7 +66,7 @@ export class NgScrollbar implements OnInit, OnChanges, AfterViewInit, OnDestroy
return this._sensorDisabled;
}

set sensorDisabled(disabled: boolean) {
set sensorDisabled(disabled: boolean | string) {
this._sensorDisabled = coerceBooleanProperty(disabled);
}

Expand All @@ -76,7 +76,7 @@ export class NgScrollbar implements OnInit, OnChanges, AfterViewInit, OnDestroy
return this._pointerEventsDisabled;
}

set pointerEventsDisabled(disabled: boolean) {
set pointerEventsDisabled(disabled: boolean | string) {
this._pointerEventsDisabled = coerceBooleanProperty(disabled);
}

Expand All @@ -86,7 +86,7 @@ export class NgScrollbar implements OnInit, OnChanges, AfterViewInit, OnDestroy
return this._viewportPropagateMouseMove;
}

set viewportPropagateMouseMove(disabled: boolean) {
set viewportPropagateMouseMove(disabled: boolean | string) {
this._viewportPropagateMouseMove = coerceBooleanProperty(disabled);
}

Expand All @@ -96,7 +96,7 @@ export class NgScrollbar implements OnInit, OnChanges, AfterViewInit, OnDestroy
return this._autoHeightDisabled;
}

set autoHeightDisabled(disabled: boolean) {
set autoHeightDisabled(disabled: boolean | string) {
this._autoHeightDisabled = coerceBooleanProperty(disabled);
}

Expand All @@ -106,7 +106,7 @@ export class NgScrollbar implements OnInit, OnChanges, AfterViewInit, OnDestroy
return this._autoWidthDisabled;
}

set autoWidthDisabled(disabled: boolean) {
set autoWidthDisabled(disabled: boolean | string) {
this._autoWidthDisabled = coerceBooleanProperty(disabled);
}

Expand Down

0 comments on commit 0f8fbab

Please sign in to comment.