-
-
Notifications
You must be signed in to change notification settings - Fork 75
Expand file tree
/
Copy pathtypes.ts
More file actions
24 lines (22 loc) · 1.07 KB
/
types.ts
File metadata and controls
24 lines (22 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import type { NgModuleRef, Type, NgZone, ApplicationRef } from '@angular/core';
import type { AppProps } from 'single-spa';
import type { BaseSingleSpaAngularOptions } from '@single-spa-community/angular/internals';
export interface SingleSpaAngularOptions<
T = Record<string, unknown>,
> extends BaseSingleSpaAngularOptions {
// This might be `noop` if the root module is bootstrapped
// with `{ ngZone: 'noop' }` options.
NgZone: typeof NgZone | 'noop';
updateFunction?(props: AppProps): Promise<any>;
// `Router` and `NavigationStart` should be always provided together.
Router?: Type<any>;
NavigationStart?: Type<any>;
bootstrapFunction(props: AppProps & T): Promise<NgModuleRef<any> | ApplicationRef>;
}
export interface BootstrappedSingleSpaAngularOptions extends SingleSpaAngularOptions {
bootstrappedNgModuleRefOrAppRef: NgModuleRef<any> | ApplicationRef | null;
// All below properties can be optional in case of
// `SingleSpaAngularOpts.NgZone` is a `noop` string and not an `NgZone` class.
bootstrappedNgZone?: NgZone;
routingEventListener?: () => void;
}