@spartacus/storefront
Version:
Spartacus Storefront is a package that you can include in your application, which allows you to add default storefront features.
36 lines (35 loc) • 1.08 kB
TypeScript
import { Observable } from 'rxjs';
export declare enum OutletPosition {
REPLACE = "replace",
BEFORE = "before",
AFTER = "after"
}
export declare const AVOID_STACKED_OUTLETS = false;
export declare const USE_STACKED_OUTLETS = true;
/**
* Token for injecting outlet related context to the component rendered in the outlet
*/
export declare abstract class OutletContextData<T = any> {
/**
* Provides reference of the outlet where component is rendered in
*/
reference: string;
/**
* Provides position of the outlet
*/
position: OutletPosition;
/**
* Provides outlet context
*
* WARNING: Avoid using it if you need to read the latest value of the context. This property
* is only the initial context value and won't be updated when the new context appears.
* Use `context$` observable instead.
*
* @deprecated since 3.0 - use `context$` observable instead
*/
context: T;
/**
* Provides outlet context as an observable
*/
context$: Observable<T>;
}