@serenity-is/corelib / initGlobalMappings
Function: initGlobalMappings()
initGlobalMappings(
options):void
Defined in: src/compat/init-global-mappings.ts:63
Installs legacy global namespace mappings (Serenity, Slick, Q, and vendor globals) for
compatibility with feature packages that consume globals via tsbuild's importAsGlobals.
Parameters
options
Bag of package exports / vendor modules to expose on the global object.
Returns
void
Remarks
- When
corelibis provided it becomesglobals.Serenity(or is merged via live getters ifSerenityalready exists). sleekgridpopulatesglobals.Slickand is merged intoSerenity;Aggregators/AggregateFormattingsub-objects andRemoteVieware synced betweenSlickandSerenity.extensions/proextensions/domwiseare merged intoSerenity(extensions also underSerenity.Extensions).bootstrap/mousetrap/sortable/nprogress/glightbox/flatpickrunwrap.defaultwhen needed and are assigned tobootstrap/Mousetrap/Sortable/NProgress/GLightbox/flatpickrrespectively.- Missing or already-present targets are merged via getter/setter proxies (
copyProps) so later assignments stay in sync.
Example
initGlobalMappings({ corelib: SerenityCore, sleekgrid: SlickGrid, globals: window });