@@ -33,8 +33,7 @@ import {CssClasses} from './constants';
33
33
* State observers and event handler entrypoints update a component's adapter's
34
34
* state with the logic needed for switch to function.
35
35
*/
36
- export class MDCSwitchFoundation extends
37
- MDCObserverFoundation < MDCSwitchAdapter > {
36
+ export class MDCSwitchFoundation extends MDCObserverFoundation < MDCSwitchAdapter > {
38
37
constructor ( adapter : MDCSwitchAdapter ) {
39
38
super ( adapter ) ;
40
39
this . handleClick = this . handleClick . bind ( this ) ;
@@ -79,7 +78,7 @@ export class MDCSwitchFoundation extends
79
78
* render adapter to keep the component's DOM updated with the state.
80
79
*/
81
80
export class MDCSwitchRenderFoundation extends MDCSwitchFoundation {
82
- protected override adapter ! : MDCSwitchRenderAdapter ;
81
+ protected declare adapter : MDCSwitchRenderAdapter ;
83
82
84
83
/**
85
84
* Initializes the foundation and starts observing state changes.
@@ -90,7 +89,7 @@ export class MDCSwitchRenderFoundation extends MDCSwitchFoundation {
90
89
disabled : this . onDisabledChange ,
91
90
processing : this . onProcessingChange ,
92
91
selected : this . onSelectedChange ,
93
- } )
92
+ } ) ;
94
93
}
95
94
96
95
/**
@@ -107,8 +106,9 @@ export class MDCSwitchRenderFoundation extends MDCSwitchFoundation {
107
106
// Ensure aria-checked is set if attribute is not present
108
107
this . onSelectedChange ( ) ;
109
108
this . adapter . state . disabled = this . adapter . isDisabled ( ) ;
110
- this . adapter . state . processing =
111
- this . adapter . hasClass ( CssClasses . PROCESSING ) ;
109
+ this . adapter . state . processing = this . adapter . hasClass (
110
+ CssClasses . PROCESSING ,
111
+ ) ;
112
112
113
113
// Re-observe state
114
114
this . setObserversEnabled ( this . adapter . state , true ) ;
0 commit comments