import * as i0 from "@angular/core"; /** * Provides quick access to platform information. * * @export * @class UniversalService */ export declare class UniversalService { readonly platformId: any; /** * `true` if the app is currently running on a browser; otherwise `false`. */ readonly isPlatformBrowser: boolean; /** * `true` if the app is currently running on a server; otherwise `false`. */ readonly isPlatformServer: boolean; /** * `true` if the app is currently running on a worker app; otherwise `false`. */ readonly isPlatformWorkerApp: boolean; /** * `true` if the app is currently running on a worker UI; otherwise `false`. */ readonly isPlatformWorkerUi: boolean; /** * Creates an instance of UniversalService. * * @param {*} platformId The id of the current platform. This always equals to `PLATFORM_ID`. */ constructor(platformId: any); /** * Executes the specified function only on browser platfroms. * * @template T The type of value returned by the `execute()` function. * @param {() => T} execute The function to execute only on browser platforms. * @returns {T} The value returned by the `execute()` function. If the funtion was not executed, this will be `undefined`. */ onBrowser(execute: () => T): T | undefined; /** * Executes the specified function only on server platfroms. * * @template T The type of value returned by the `execute()` function. * @param {() => T} execute The function to execute only on server platforms. * @returns {T} The value returned by the `execute()` function. If the funtion was not executed, this will be `undefined`. */ onServer(execute: () => T): T | undefined; /** * Executes the specified function only on worker app platfroms. * * @template T The type of value returned by the `execute()` function. * @param {() => T} execute The function to execute only on worker app platforms. * @returns {T} The value returned by the `execute()` function. If the funtion was not executed, this will be `undefined`. */ onWorkerApp(execute: () => T): T | undefined; /** * Executes the specified function only on worker UI platfroms. * * @template T The type of value returned by the `execute()` function. * @param {() => T} execute The function to execute only on worker UI platforms. * @returns {T} The value returned by the `execute()` function. If the funtion was not executed, this will be `undefined`. */ onWorkerUi(execute: () => T): T | undefined; /** * Executes the specified function only on browser platfroms. * * @template T The type of value returned by the `execute()` function. * @param {() => T} execute The function to execute only on browser platforms. * @returns {T} The value returned by the `execute()` function. If the funtion was not executed, this will be `undefined`. */ onNonBrowser(execute: () => T): T | undefined; /** * Executes the specified function only on server platfroms. * * @template T The type of value returned by the `execute()` function. * @param {() => T} execute The function to execute only on server platforms. * @returns {T} The value returned by the `execute()` function. If the funtion was not executed, this will be `undefined`. */ onNonServer(execute: () => T): T | undefined; /** * Executes the specified function only on worker app platfroms. * * @template T The type of value returned by the `execute()` function. * @param {() => T} execute The function to execute only on worker app platforms. * @returns {T} The value returned by the `execute()` function. If the funtion was not executed, this will be `undefined`. */ onNonWorkerApp(execute: () => T): T | undefined; /** * Executes the specified function only on worker UI platfroms. * * @template T The type of value returned by the `execute()` function. * @param {() => T} execute The function to execute only on worker UI platforms. * @returns {T} The value returned by the `execute()` function. If the funtion was not executed, this will be `undefined`. */ onNonWorkerUi(execute: () => T): T | undefined; private onPlatform; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }