mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 10:01:59 +08:00
chore(angular): improve types of platform.ts
(#27810)
This commit is contained in:

committed by
GitHub

parent
cd1102b985
commit
6b9c6fcd4d
@ -1,9 +1,7 @@
|
|||||||
import { DOCUMENT } from '@angular/common';
|
import { DOCUMENT } from '@angular/common';
|
||||||
import { NgZone, Inject, Injectable } from '@angular/core';
|
import { Inject, Injectable, NgZone } from '@angular/core';
|
||||||
import { BackButtonEventDetail, KeyboardEventDetail, Platforms, getPlatforms, isPlatform } from '@ionic/core';
|
import { BackButtonEventDetail, KeyboardEventDetail, Platforms, getPlatforms, isPlatform } from '@ionic/core';
|
||||||
import { Subscription, Subject } from 'rxjs';
|
import { Subject, Subscription } from 'rxjs';
|
||||||
|
|
||||||
// TODO(FW-2827): types
|
|
||||||
|
|
||||||
export interface BackButtonEmitter extends Subject<BackButtonEventDetail> {
|
export interface BackButtonEmitter extends Subject<BackButtonEventDetail> {
|
||||||
subscribeWithPriority(
|
subscribeWithPriority(
|
||||||
@ -22,13 +20,13 @@ export class Platform {
|
|||||||
/**
|
/**
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
backButton: BackButtonEmitter = new Subject<BackButtonEventDetail>() as any;
|
backButton = new Subject<BackButtonEventDetail>() as BackButtonEmitter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The keyboardDidShow event emits when the
|
* The keyboardDidShow event emits when the
|
||||||
* on-screen keyboard is presented.
|
* on-screen keyboard is presented.
|
||||||
*/
|
*/
|
||||||
keyboardDidShow = new Subject<KeyboardEventDetail>() as any;
|
keyboardDidShow = new Subject<KeyboardEventDetail>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The keyboardDidHide event emits when the
|
* The keyboardDidHide event emits when the
|
||||||
|
Reference in New Issue
Block a user