Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

fix: update TypeScript version to 3.5.x and fix typing errors #4853

Merged
merged 7 commits into from
Jul 2, 2019
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/mdc-form-field/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ export class MDCFormField extends MDCComponent<MDCFormFieldFoundation> {
},
deregisterInteractionHandler: (evtType, handler) => {
if (this.label_) {
this.label_.removeEventListener(evtType, handler);
(this.label_ as HTMLElement).removeEventListener(evtType, handler);
}
},
registerInteractionHandler: (evtType, handler) => {
if (this.label_) {
this.label_.addEventListener(evtType, handler);
(this.label_ as HTMLElement).addEventListener(evtType, handler);
}
},
};
Expand Down
4 changes: 2 additions & 2 deletions packages/mdc-ripple/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class MDCRipple extends MDCComponent<MDCRippleFoundation> implements MDCR
deregisterDocumentInteractionHandler: (evtType, handler) =>
document.documentElement.removeEventListener(evtType, handler, applyPassive()),
deregisterInteractionHandler: (evtType, handler) =>
instance.root_.removeEventListener(evtType, handler, applyPassive()),
(instance.root_ as HTMLElement).removeEventListener(evtType, handler, applyPassive()),
deregisterResizeHandler: (handler) => window.removeEventListener('resize', handler),
getWindowPageOffset: () => ({x: window.pageXOffset, y: window.pageYOffset}),
isSurfaceActive: () => matches(instance.root_, ':active'),
Expand All @@ -59,7 +59,7 @@ export class MDCRipple extends MDCComponent<MDCRippleFoundation> implements MDCR
registerDocumentInteractionHandler: (evtType, handler) =>
document.documentElement.addEventListener(evtType, handler, applyPassive()),
registerInteractionHandler: (evtType, handler) =>
instance.root_.addEventListener(evtType, handler, applyPassive()),
(instance.root_ as HTMLElement).addEventListener(evtType, handler, applyPassive()),
registerResizeHandler: (handler) => window.addEventListener('resize', handler),
removeClass: (className) => instance.root_.classList.remove(className),
updateCssVariable: (varName, value) => (instance.root_ as HTMLElement).style.setProperty(varName, value),
Expand Down
4 changes: 2 additions & 2 deletions packages/mdc-top-app-bar/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ export class MDCTopAppBar extends MDCComponent<MDCTopAppBarBaseFoundation> {
getTopAppBarHeight: () => this.root_.clientHeight,
registerNavigationIconInteractionHandler: (evtType, handler) => {
if (this.navIcon_) {
this.navIcon_.addEventListener(evtType, handler);
(this.navIcon_ as HTMLElement).addEventListener(evtType, handler);
}
},
deregisterNavigationIconInteractionHandler: (evtType, handler) => {
if (this.navIcon_) {
this.navIcon_.removeEventListener(evtType, handler);
(this.navIcon_ as HTMLElement).removeEventListener(evtType, handler);
}
},
notifyNavigationIconClicked: () => this.emit(strings.NAVIGATION_EVENT, {}),
Expand Down