UNPKG

3.37 kBTypeScriptView Raw
1import { AnimationDriver, EventManager } from '@angular/platform-browser';
2import { ErrorHandler, Injector, ModuleWithProviders, PlatformRef, NgModuleRef, NgZone, TestabilityRegistry } from '@angular/core';
3import { NodeSharedStylesHost } from './node-shared-styles-host';
4export declare function _errorHandler(): ErrorHandler;
5export declare function _document(domSharedStylesHost: NodeSharedStylesHost, _zone: any): any;
6export declare function _resolveDefaultAnimationDriver(): AnimationDriver;
7export declare var __PLATFORM_REF: PlatformRef;
8export declare function removePlatformRef(): void;
9export declare function getPlatformRef(): PlatformRef;
10export declare function setPlatformRef(platformRef: any): void;
11export declare class NodePlatform {
12 private _platformRef;
13 static _noop: () => void;
14 static _cache: WeakMap<any, any>;
15 readonly platformRef: PlatformRef;
16 constructor(_platformRef: PlatformRef);
17 cacheModuleFactory<T>(moduleType: any, compilerOptions?: any): Promise<NgModuleRef<T>>;
18 serializeModule<T>(ModuleType: any, config?: any): Promise<T>;
19 serializeModuleFactory<T>(ModuleType: any, config?: any): Promise<T> | T;
20 serialize<T>(moduleRef: NgModuleRef<T>, config?: any): Promise<T>;
21 readonly injector: Injector;
22 bootstrapModule<T>(moduleType: any, compilerOptions?: any): Promise<NgModuleRef<T>>;
23 bootstrapModuleFactory<T>(moduleFactory: any): Promise<NgModuleRef<T>>;
24 readonly disposed: boolean;
25 readonly destroyed: boolean;
26 destroy(): void;
27 dispose(): void;
28 registerDisposeListener(dispose: () => void): void;
29 onDestroy(callback: () => void): void;
30}
31export interface EventManagerPlugin {
32 manager: EventManager | NodeEventManager;
33 supports(eventName: string): boolean;
34 addEventListener(element: any, eventName: string, handler: Function): any;
35 addGlobalEventListener(element: string, eventName: string, handler: Function): any;
36}
37export declare class NodeEventManager {
38 private _document;
39 private _zone;
40 private _plugins;
41 constructor(plugins: EventManagerPlugin[], _document: any, _zone: NgZone);
42 getWindow(): any;
43 getDocument(): any;
44 getZone(): NgZone;
45 addEventListener(element: any, eventName: string, handler: Function): Function;
46 addGlobalEventListener(target: string, eventName: string, handler: Function): Function;
47 _findPluginFor(eventName: string): EventManagerPlugin;
48}
49export declare class NodeDomEventsPlugin {
50 manager: NodeEventManager;
51 supports(_eventName: string): boolean;
52 addEventListener(element: any, eventName: string, handler: Function): Function;
53 addGlobalEventListener(target: string, eventName: string, handler: Function): Function;
54}
55export declare function _APP_BASE_HREF(_zone: any): any;
56export declare function _REQUEST_URL(_zone: any): any;
57export declare function _ORIGIN_URL(_zone: any): any;
58export declare class MockTestabilityRegistry extends TestabilityRegistry {
59 registerApplication(): any;
60}
61export declare class NodeModule {
62 static forRoot(document: string, config?: any): ModuleWithProviders;
63 static withConfig(config?: any): ModuleWithProviders;
64 constructor(parentModule: NodeModule);
65}
66export declare const INTERNAL_NODE_PLATFORM_PROVIDERS: Array<any>;
67export declare const platformNodeDynamic: (extraProviders?: any[], platform?: any) => NodePlatform;