refactor(all): enable ts strict

This commit is contained in:
Manu Mtz.-Almeida
2018-04-03 17:30:25 +02:00
parent ea24ad677d
commit fd5c957787
44 changed files with 1065 additions and 1475 deletions

View File

@ -13,7 +13,7 @@ export default function iosLeaveAnimation(Animation: Animation, baseEl: HTMLElem
const wrapperAnimation = new Animation();
const wrapperEl = baseEl.querySelector('.modal-wrapper');
wrapperAnimation.addElement(wrapperEl);
const wrapperElRect = wrapperEl.getBoundingClientRect();
const wrapperElRect = wrapperEl!.getBoundingClientRect();
wrapperAnimation.beforeStyles({ 'opacity': 1 })
.fromTo('translateY', '0%', `${window.innerHeight - wrapperElRect.top}px`);

View File

@ -166,9 +166,12 @@ export class Modal implements OverlayInterface {
@Method()
async present(): Promise<void> {
if (this.presented) {
return Promise.resolve();
return;
}
const container = this.el.querySelector(`.modal-wrapper`);
if (!container) {
throw new Error('container is undefined');
}
const componentProps = {
...this.componentProps,
modal: this.el