fix: clean up Application types

This commit is contained in:
shirakaba
2022-11-23 15:57:47 +09:00
parent 890be6c888
commit 933af70d39
6 changed files with 47 additions and 31 deletions

View File

@@ -4,7 +4,7 @@ import { ApplicationEventData, CssChangedEventData, LaunchEventData, LoadAppCSSE
// TODO: explain why we need to this or remov it
// Use requires to ensure order of imports is maintained
const { backgroundEvent, displayedEvent, exitEvent, foregroundEvent, getCssFileName, launchEvent, livesync, lowMemoryEvent, notify, on, orientationChanged, orientationChangedEvent, resumeEvent, setApplication, suspendEvent, systemAppearanceChanged, systemAppearanceChangedEvent } = require('./application-common');
const { backgroundEvent, displayedEvent, exitEvent, foregroundEvent, getCssFileName, launchEvent, livesync, lowMemoryEvent, notify, on, orientationChanged, orientationChangedEvent, resumeEvent, setApplication, suspendEvent, systemAppearanceChanged, systemAppearanceChangedEvent } = require('./application-common') as typeof import('./application-common');
// First reexport so that app module is initialized.
export * from './application-common';
@@ -12,7 +12,6 @@ import { View } from '../ui/core/view';
import { NavigationEntry } from '../ui/frame/frame-interfaces';
// TODO: Remove this and get it from global to decouple builder for angular
import { Builder } from '../ui/builder';
import { Observable } from '../data/observable';
import { CSSUtils } from '../css/system-classes';
import { IOSHelper } from '../ui/core/view/view-helper';
import { Device } from '../platform';
@@ -238,7 +237,7 @@ export class iOSApplication implements iOSApplicationDefinition {
const args: LaunchEventData = {
eventName: launchEvent,
object: this,
ios: (notification && notification.userInfo && notification.userInfo.objectForKey('UIApplicationLaunchOptionsLocalNotificationKey')) || null,
ios: notification?.userInfo?.objectForKey('UIApplicationLaunchOptionsLocalNotificationKey') || null,
};
notify(args);