fix(ts_web): resolve TypeScript nullability and event typing issues across web components
This commit is contained in:
@@ -45,7 +45,7 @@ export class DeesStepper extends DeesElement {
|
||||
@property({
|
||||
type: Object,
|
||||
})
|
||||
accessor selectedStep: IStep;
|
||||
accessor selectedStep!: IStep;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
@@ -214,19 +214,19 @@ export class DeesStepper extends DeesElement {
|
||||
this.setScrollStatus();
|
||||
// Remove entrance class after initial animation completes
|
||||
await this.domtools.convenience.smartdelay.delayFor(350);
|
||||
this.shadowRoot.querySelector('.step.entrance')?.classList.remove('entrance');
|
||||
this.shadowRoot!.querySelector('.step.entrance')?.classList.remove('entrance');
|
||||
}
|
||||
|
||||
public async updated() {
|
||||
this.setScrollStatus();
|
||||
}
|
||||
|
||||
public scroller: typeof domtools.plugins.SweetScroll.prototype;
|
||||
public scroller!: typeof domtools.plugins.SweetScroll.prototype;
|
||||
|
||||
public async setScrollStatus() {
|
||||
const stepperContainer: HTMLElement = this.shadowRoot.querySelector('.stepperContainer');
|
||||
const firstStepElement: HTMLElement = this.shadowRoot.querySelector('.step');
|
||||
const selectedStepElement: HTMLElement = this.shadowRoot.querySelector('.selected');
|
||||
const stepperContainer = this.shadowRoot!.querySelector('.stepperContainer') as HTMLElement;
|
||||
const firstStepElement = this.shadowRoot!.querySelector('.step') as HTMLElement;
|
||||
const selectedStepElement = this.shadowRoot!.querySelector('.selected') as HTMLElement;
|
||||
if (!selectedStepElement) {
|
||||
return;
|
||||
}
|
||||
@@ -278,7 +278,7 @@ export class DeesStepper extends DeesElement {
|
||||
this.selectedStep = previousStep;
|
||||
await this.domtoolsPromise;
|
||||
await this.domtools.convenience.smartdelay.delayFor(100);
|
||||
this.selectedStep.onReturnToStepFunc?.(this, this.shadowRoot.querySelector('.selected'));
|
||||
this.selectedStep.onReturnToStepFunc?.(this, this.shadowRoot!.querySelector('.selected') as HTMLElement);
|
||||
}
|
||||
|
||||
public goNext() {
|
||||
|
||||
Reference in New Issue
Block a user