refactor(all): enable strictPropertyInitialization

This commit is contained in:
Manu Mtz.-Almeida
2018-04-19 18:48:38 +02:00
parent 78bd146ad2
commit 4ea8881f33
129 changed files with 1513 additions and 1664 deletions

View File

@ -1,5 +1,5 @@
import { Component, Element, Event, EventEmitter, Listen, Method, Prop } from '@stencil/core';
import { Config, GestureDetail, QueueController } from '../../index';
import { Config, GestureDetail, Mode, QueueController } from '../../index';
@Component({
tag: 'ion-scroll',
@ -19,13 +19,13 @@ export class Scroll {
private detail: ScrollDetail;
private queued = false;
@Element() private el: HTMLElement;
@Element() el!: HTMLElement;
@Prop({ context: 'config' }) config: Config;
@Prop({ context: 'queue' }) queue: QueueController;
@Prop({ context: 'window' }) win: Window;
@Prop({ context: 'config'}) config!: Config;
@Prop({ context: 'queue' }) queue!: QueueController;
@Prop({ context: 'window' }) win!: Window;
@Prop() mode: string;
@Prop() mode!: Mode;
/**
@ -33,25 +33,25 @@ export class Scroll {
* If the content exceeds the bounds of ionScroll, nothing will change.
* Note, the does not disable the system bounce on iOS. That is an OS level setting.
*/
@Prop({ mutable: true }) forceOverscroll: boolean;
@Prop({ mutable: true }) forceOverscroll?: boolean;
@Prop() scrollEvents = false;
/**
* Emitted when the scroll has started.
*/
@Event() ionScrollStart: EventEmitter<ScrollBaseDetail>;
@Event() ionScrollStart!: EventEmitter<ScrollBaseDetail>;
/**
* Emitted while scrolling. This event is disabled by default.
* Look at the property: `scrollEvents`
*/
@Event({bubbles: false}) ionScroll: EventEmitter<ScrollDetail>;
@Event({bubbles: false}) ionScroll!: EventEmitter<ScrollDetail>;
/**
* Emitted when the scroll has ended.
*/
@Event() ionScrollEnd: EventEmitter<ScrollBaseDetail>;
@Event() ionScrollEnd!: EventEmitter<ScrollBaseDetail>;
constructor() {
// Detail is used in a hot loop in the scroll event, by allocating it here