@itwin/core-bentley
Version:
Bentley JavaScript core components
60 lines • 3.45 kB
TypeScript
/** @packageDocumentation
* @module ProcessDetector
*/
/** Functions to determine the type of JavaScript process currently executing.
* @public
*/
export declare class ProcessDetector {
/** Is this a browser process?
* @note this method will also return `true` for the frontend of Electron or Mobile apps. They *are* browser processes.
*/
static get isBrowserProcess(): boolean;
/** Is this a Node process?
* @note this means "is this a backend process"? It will return `true` for all backend process, including Electron and mobile apps.
*/
static get isNodeProcess(): boolean;
/** Is this process the frontend of an Electron app? */
static get isElectronAppFrontend(): boolean;
/** Is this process the backend of an Electron app? */
static get isElectronAppBackend(): boolean;
/** Is this process running in a browser on an iPad?
* @note This method will return `true` for any frontend running on an iPad, whether it is a user-launched web browser (e.g. Safari) or the frontend of a mobile app.
*/
static get isIPadBrowser(): boolean;
/** Is this process running in a browser on an iPhone?
* @note This method will return `true` for any frontend running on an iPhone, whether it is a user-launched web browser (e.g. Safari) or the frontend of a mobile app.
*/
static get isIPhoneBrowser(): boolean;
/** Is this process running in a browser on an iOS device?
* @note This method will return `true` for any frontend running on an iOS device, whether it is a user-launched web browser (e.g. Safari) or the frontend of a mobile app.
*/
static get isIOSBrowser(): boolean;
/** Is this process running in a browser on an Android device?
* @note This method will return `true` for any frontend running on an Android device, whether it is a user-launched web browser (e.g. Chrome) or the frontend of a mobile app.
*/
static get isAndroidBrowser(): boolean;
/** Is this process running in a browser on a mobile device?
* @note This method will return `true` for any frontend running on a mobile device, whether it is a user-launched web browser or the frontend of a mobile app.
*/
static get isMobileBrowser(): boolean;
/** Is this process running in a Chromium based browser (Chrome / new Edge / Electron front end)? */
static get isChromium(): boolean;
/** Is this process the frontend of an iTwin mobile application?
* @note this indicates that this is a browser process started by an iTwin mobile application.
* It will return `false` when running user-launched web browsers on a mobile device.
*/
static get isMobileAppFrontend(): boolean;
/** Is this process the frontend of an iOS mobile application? */
static get isIOSAppFrontend(): boolean;
/** Is this process the frontend of an Android mobile application? */
static get isAndroidAppFrontend(): boolean;
/** Is this process the backend of an iOS mobile application? */
static get isIOSAppBackend(): boolean;
/** Is this process the backend of an Android mobile application? */
static get isAndroidAppBackend(): boolean;
/** Is this process a mobile app backend? */
static get isMobileAppBackend(): boolean;
/** Is this process the frontend of a native (Electron or Mobile) app? */
static get isNativeAppFrontend(): boolean;
}
//# sourceMappingURL=ProcessDetector.d.ts.map