mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
refactor(all): enable strictPropertyInitialization
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user