Skip to main content

Module: @ima/core

Enumerations

Classes

Interfaces

Type Aliases

AnyParameters

Ƭ AnyParameters: Object

Index signature

[key: string]: unknown

Defined in

packages/core/src/types.ts:22


AppSettings

Ƭ AppSettings: Object

App settings function, used in ./app/config/settings.js

Type declaration

NameType
dev?PartialDeep<Settings>
prodSettings
regression?PartialDeep<Settings>
test?PartialDeep<Settings>

Defined in

packages/core/src/boot.ts:159


AsyncRouteController

Ƭ AsyncRouteController: WithAsync<RouteController>

Defined in

packages/core/src/router/AbstractRoute.ts:27


AsyncRouteView

Ƭ AsyncRouteView: WithAsync<RouteView>

Defined in

packages/core/src/router/AbstractRoute.ts:28


BootSettings

Ƭ BootSettings: Pick<GlobalImaObject, "$Version" | "$Debug" | "$Env" | "$Version" | "$App" | "$Protocol" | "$Language" | "$Host" | "$Path" | "$Root" | "$LanguagePartPath">

Defined in

packages/core/src/Bootstrap.ts:82


Ƭ Cookie: Object

Type declaration

NameType
optionsCookieOptions
valuestring | number | boolean | Date | undefined

Defined in

packages/core/src/storage/CookieStorage.ts:33


CookieOptions

Ƭ CookieOptions: Object

Type declaration

NameType
domain?string
expires?Date
httpOnly?boolean
maxAge?number
partitioned?boolean
path?string
sameSite?"none" | "lax" | "strict"
secure?boolean

Defined in

packages/core/src/storage/CookieStorage.ts:22


CookieTransformFunction

Ƭ CookieTransformFunction: Object

Type declaration

NameType
decode(value: string) => string
encode(value: string) => string

Defined in

packages/core/src/router/Response.ts:10


DecoratedOCAliasMap

Ƭ DecoratedOCAliasMap: AddOCChaining<OCAliasMap> & WithOCOptional<OCAliasMap> & WithOCOptionalSpread<OCAliasMap> & WithOCSpread<OCAliasMap>

Defined in

packages/core/src/config/bind.ts:68


Dependencies

Ƭ Dependencies<T>: Dependency<T>[]

Type parameters

NameType
Tany

Defined in

packages/core/src/oc/ObjectContainer.ts:23


Dependency

Ƭ Dependency<T>: keyof DecoratedOCAliasMap | OCInjectable<T> | [OCInjectable<T>, { optional: boolean }]

Type parameters

Name
T

Defined in

packages/core/src/oc/ObjectContainer.ts:24


DictionaryConfig

Ƭ DictionaryConfig: Object

Type declaration

NameType
$Languagestring
dictionaryDictionaryData

Defined in

packages/core/src/dictionary/Dictionary.ts:3


DictionaryData

Ƭ DictionaryData: Object

Index signature

[key: string]: DictionaryData | LocalizationFunction

Defined in

packages/core/src/dictionary/Dictionary.ts:8


DispatcherListener

Ƭ DispatcherListener<D>: (data: D) => void

Type parameters

Name
D

Type declaration

▸ (data): void

Parameters
NameType
dataD
Returns

void

Defined in

packages/core/src/event/Dispatcher.ts:12


EntryOptions

Ƭ EntryOptions: Object

Type declaration

NameType
writeableboolean

Defined in

packages/core/src/oc/Entry.ts:7


EventBusEventHandler

Ƭ EventBusEventHandler: (data?: UnknownParameters) => void

Type declaration

▸ (data?): void

Parameters
NameType
data?UnknownParameters
Returns

void

Defined in

packages/core/src/event/EventBus.ts:5


EventBusListener

Ƭ EventBusListener: (event: CustomEvent) => unknown

Type declaration

▸ (event): unknown

Parameters
NameType
eventCustomEvent
Returns

unknown

Defined in

packages/core/src/event/EventBus.ts:3


EventBusOptions

Ƭ EventBusOptions: Object

Type declaration

NameType
bubbles?boolean
cancelable?boolean
composed?boolean

Defined in

packages/core/src/event/EventBus.ts:9


ExecutionJob

Ƭ ExecutionJob: (...args: unknown[]) => Promise<unknown> | unknown

Type declaration

▸ (...args): Promise<unknown> | unknown

Parameters
NameType
...argsunknown[]
Returns

Promise<unknown> | unknown

Defined in

packages/core/src/execution/Execution.ts:1


GenericErrorParams

Ƭ GenericErrorParams: Object

Index signature

[key: string]: unknown

Type declaration

NameType
cause?Error | string
status?number

Defined in

packages/core/src/error/GenericError.ts:3


HttpAgentResponse

Ƭ HttpAgentResponse<B>: Object

A response from the server.

Type parameters

Name
B

Type declaration

NameType
bodyB
cachedboolean
headersStringParameters
headersRaw?Headers
paramsHttpProxyRequestParams
statusnumber

Defined in

packages/core/src/http/HttpAgent.ts:55


HttpProxyErrorParams

Ƭ HttpProxyErrorParams<B>: { body: B ; cause: Error ; errorName: string ; status: number } & HttpProxyRequestParams

An object that describes a failed HTTP request, providing information about both the failure reported by the server and how the request has been sent to the server.

Type parameters

NameType
Bunknown

Defined in

packages/core/src/http/HttpProxy.ts:51


HttpProxyRequestParams

Ƭ HttpProxyRequestParams: Object

An object representing the complete request parameters used to create and send the HTTP request.

Type declaration

NameType
data?UnknownParameters
methodstring
optionsHttpAgentRequestOptions
transformedUrlstring
urlstring

Defined in

packages/core/src/http/HttpProxy.ts:27


InitBindFunction

Ƭ InitBindFunction: (ns: Namespace, oc: ObjectContainer, config: Required<BootConfig>["bind"], state: BindingState) => void

Type declaration

▸ (ns, oc, config, state): void

Parameters
NameType
nsNamespace
ocObjectContainer
configRequired<BootConfig>["bind"]
stateBindingState
Returns

void

Defined in

packages/core/src/Bootstrap.ts:16


InitRoutesFunction

Ƭ InitRoutesFunction: (ns: Namespace, oc: ObjectContainer, routes: UnknownParameters | undefined, router: Router) => void

Type declaration

▸ (ns, oc, routes, router): void

Parameters
NameType
nsNamespace
ocObjectContainer
routesUnknownParameters | undefined
routerRouter
Returns

void

Defined in

packages/core/src/Bootstrap.ts:23


InitServicesFunction

Ƭ InitServicesFunction: (ns: Namespace, oc: ObjectContainer, config: BootConfig["services"]) => void

Type declaration

▸ (ns, oc, config): void

Parameters
NameType
nsNamespace
ocObjectContainer
configBootConfig["services"]
Returns

void

Defined in

packages/core/src/Bootstrap.ts:30


InitSettingsFunction

Ƭ InitSettingsFunction: (ns: Namespace, oc: ObjectContainer, config: BootConfig["settings"]) => AppSettings

Type declaration

▸ (ns, oc, config): AppSettings

Parameters
NameType
nsNamespace
ocObjectContainer
configBootConfig["settings"]
Returns

AppSettings

Defined in

packages/core/src/Bootstrap.ts:36


LoadedResources

Ƭ LoadedResources<T>: Intersection<Partial<Pick<T, Matching<T, Promise<any>>>>, Required<Pick<T, NonMatching<T, Promise<any>>>>>

Type parameters

Name
T

Defined in

packages/core/src/controller/Controller.ts:27


LocalizationFunction

Ƭ LocalizationFunction: (parameters: ObjectParameters) => string

Type declaration

▸ (parameters): string

Parameters
NameType
parametersObjectParameters
Returns

string

Defined in

packages/core/src/dictionary/Dictionary.ts:12


ManageArgs

Ƭ ManageArgs: Object

Type declaration

NameType
action?PageAction
optionsRouteOptions
params?RouteParams
routeInstanceType<typeof AbstractRoute>

Defined in

packages/core/src/page/manager/PageManager.ts:5


ManagedPage

Ƭ ManagedPage: Object

Type declaration

NameType
controllerRouteController
controllerInstanceController
decoratedControllerControllerDecorator
optionsRouteOptions
paramsRouteParams
routeInstanceType<typeof AbstractRoute>
state{ abort?: { promise: Promise<void> ; reject: () => void ; resolve: () => void } ; activated: boolean ; cancelled: boolean ; executed: boolean ; initialized: boolean ; mounted: boolean ; page: { promise: Promise<void> ; reject: () => void ; resolve: () => void } }
state.abort?{ promise: Promise<void> ; reject: () => void ; resolve: () => void }
state.abort.promisePromise<void>
state.abort.reject() => void
state.abort.resolve() => void
state.activatedboolean
state.cancelledboolean
state.executedboolean
state.initializedboolean
state.mountedboolean
state.page{ promise: Promise<void> ; reject: () => void ; resolve: () => void }
state.page.promisePromise<void>
state.page.reject() => void
state.page.resolve() => void
viewunknown
viewInstanceunknown

Defined in

packages/core/src/page/PageTypes.ts:11


MetaAttributes

Ƭ MetaAttributes: Record<string, MetaValue>

Defined in

packages/core/src/meta/MetaManager.ts:2


MetaManagerRecord

Ƭ MetaManagerRecord<K>: { [key in K]: MetaValue } & MetaAttributes

Type parameters

NameType
Kextends MetaManagerRecordKeys

Defined in

packages/core/src/meta/MetaManager.ts:5


MetaManagerRecordKeys

Ƭ MetaManagerRecordKeys: "content" | "href"

Defined in

packages/core/src/meta/MetaManager.ts:4


MetaValue

Ƭ MetaValue: number | boolean | string | null | undefined

Defined in

packages/core/src/meta/MetaManager.ts:1


NativeListener

Ƭ NativeListener: (event: CustomEvent | Event) => unknown

Type declaration

▸ (event): unknown

Parameters
NameType
eventCustomEvent | Event
Returns

unknown

Defined in

packages/core/src/event/EventBus.ts:7


OCInjectable

Ƭ OCInjectable<T>: Constructor<T> & WithDependencies | AbstractConstructor<T> & Partial<WithDependencies> | Function & { prototype: T } & Partial<WithDependencies>

Type parameters

Name
T

Defined in

packages/core/src/oc/ObjectContainer.ts:18


OCInstance

Ƭ OCInstance<T>: T extends keyof DecoratedOCAliasMap ? DecoratedOCAliasMap[T] : T extends AbstractConstructor<any> | Constructor<any> ? InstanceType<T> : T extends [AbstractConstructor<any> | Constructor<any>, { optional: true }] ? InstanceType<T[0]> | null : T

Type parameters

NameType
Textends OCInstanceConstrain

Defined in

packages/core/src/oc/ObjectContainer.ts:40


OCInstanceConstrain

Ƭ OCInstanceConstrain<T>: keyof DecoratedOCAliasMap | Constructor<T> | AbstractConstructor<T> | [AbstractConstructor<T> | Constructor<T>, { optional: true }]

Type parameters

NameType
Tany

Defined in

packages/core/src/oc/ObjectContainer.ts:34


ObjectParameters

Ƭ ObjectParameters: Object

Index signature

[key: string]: boolean | number | string | Date

Defined in

packages/core/src/types.ts:30


PageData

Ƭ PageData: { status: number } & UnknownParameters

Defined in

packages/core/src/page/PageTypes.ts:50


PageState

Ƭ PageState: Object

Index signature

[key: string]: any

Defined in

packages/core/src/page/state/PageStateManager.ts:1


PluginInitBindFunction

Ƭ PluginInitBindFunction: (ns: Namespace, oc: ObjectContainer, config: Required<BootConfig>["bind"], isDynamicallyLoaded: boolean, name?: string) => void

Type declaration

▸ (ns, oc, config, isDynamicallyLoaded, name?): void

Parameters
NameType
nsNamespace
ocObjectContainer
configRequired<BootConfig>["bind"]
isDynamicallyLoadedboolean
name?string
Returns

void

Defined in

packages/core/src/Bootstrap.ts:42


PluginInitServicesFunction

Ƭ PluginInitServicesFunction: (ns: Namespace, oc: ObjectContainer, config: BootConfig["services"], isDynamicallyLoaded: boolean) => void

Type declaration

▸ (ns, oc, config, isDynamicallyLoaded): void

Parameters
NameType
nsNamespace
ocObjectContainer
configBootConfig["services"]
isDynamicallyLoadedboolean
Returns

void

Defined in

packages/core/src/Bootstrap.ts:50


PluginInitSettingsFunction

Ƭ PluginInitSettingsFunction: (ns: Namespace, oc: ObjectContainer, config: BootConfig["settings"], isDynamicallyLoaded: boolean) => PartialDeep<AppSettings>

Type declaration

▸ (ns, oc, config, isDynamicallyLoaded): PartialDeep<AppSettings>

Parameters
NameType
nsNamespace
ocObjectContainer
configBootConfig["settings"]
isDynamicallyLoadedboolean
Returns

PartialDeep<AppSettings>

Defined in

packages/core/src/Bootstrap.ts:57


Resource

Ƭ Resource: string | [string, { [attribute: string]: unknown; fallback: boolean }]

Defined in

packages/core/src/boot.ts:37


RouteController

Ƭ RouteController: keyof OCAliasMap | Constructor<Controller<any>> | AbstractConstructor<Controller<any>>

Defined in

packages/core/src/router/AbstractRoute.ts:15


RouteParams

Ƭ RouteParams<T>: Partial<{ [K in keyof T]: T[K] }> & { [key: string]: string | GenericError; }

Type parameters

NameType
T{}

Defined in

packages/core/src/router/AbstractRoute.ts:9


RoutePathExpression

Ƭ RoutePathExpression: Object

Path expression type used for router routes definition.

Type declaration

NameTypeDescription
extractParameters(trimmedPath: string, additionalData: { path: string ; query: RouteParams }) => RouteParamsFunction which takes care of parsing url params from given path. It returns object of key/value pairs which correspond to expected path url params and their values.
matcherRegExpRegExp use in router for path matching to current route.
toPath(params: RouteParams) => stringFunction that generates valid path from given route params.

Defined in

packages/core/src/router/DynamicRoute.ts:23


RouteView

Ƭ RouteView: keyof OCAliasMap | Constructor<any> | AbstractConstructor<any> | (...args: any[]) => any

Defined in

packages/core/src/router/AbstractRoute.ts:20


RouterMiddleware

Ƭ RouterMiddleware: (params: RouteParams, locals: RouteLocals, next?: (result: UnknownParameters) => void) => UnknownParameters | void | Promise<UnknownParameters | void>

Type declaration

▸ (params, locals, next?): UnknownParameters | void | Promise<UnknownParameters | void>

Parameters
NameType
paramsRouteParams
localsRouteLocals
next?(result: UnknownParameters) => void
Returns

UnknownParameters | void | Promise<UnknownParameters | void>

Defined in

packages/core/src/router/Router.ts:29


SerializedCacheEntry

Ƭ SerializedCacheEntry<V>: Object

Type parameters

Name
V

Type declaration

NameType
ttlnumber | string
valueV

Defined in

packages/core/src/cache/CacheEntry.ts:1


SerializedData

Ƭ SerializedData<V>: Object

Type parameters

NameType
Vunknown

Index signature

[key: string]: { ttl: number ; value: V }

Defined in

packages/core/src/cache/Cache.ts:1


StringParameters

Ƭ StringParameters: Object

Index signature

[key: string]: string

Defined in

packages/core/src/types.ts:14


UnknownParameters

Ƭ UnknownParameters: Object

Index signature

[key: string]: unknown

Defined in

packages/core/src/types.ts:18


UnknownPromiseParameters

Ƭ UnknownPromiseParameters: Object

Index signature

[key: string]: unknown | Promise<unknown>

Defined in

packages/core/src/types.ts:26


WindowEventTargets

Ƭ WindowEventTargets: Document | globalThis.Window | HTMLBodyElement | SVGSVGElement | SVGElement | HTMLMediaElement | HTMLVideoElement | Element

Defined in

packages/core/src/window/Window.ts:4


WindowEventTargetsMap

Ƭ WindowEventTargetsMap<E>: E extends Document ? DocumentEventMap : E extends globalThis.Window ? WindowEventMap : E extends HTMLBodyElement ? HTMLBodyElementEventMap : E extends SVGSVGElement ? SVGSVGElementEventMap : E extends SVGElement ? SVGElementEventMap : E extends HTMLMediaElement ? HTMLMediaElementEventMap : E extends HTMLVideoElement ? HTMLVideoElementEventMap : HTMLElementEventMap & WindowCustomEventsMap

Type parameters

NameType
Eextends WindowEventTargets

Defined in

packages/core/src/window/Window.ts:14

Variables

ns

Const ns: Namespace

Defined in

packages/core/src/Namespace.ts:123


pluginLoader

Const pluginLoader: PluginLoader

Defined in

packages/core/src/pluginLoader.ts:93

Functions

bootClientApp

bootClientApp(app, bootConfig): Object

Parameters

NameType
appObject
app.bootstrapBootstrap
app.ocObjectContainer
bootConfigBootConfig

Returns

Object

NameType
bootstrapBootstrap
ocObjectContainer

Defined in

packages/core/src/boot.ts:254


createImaApp

createImaApp(): Object

Returns

Object

NameType
bootstrapBootstrap
ocObjectContainer

Defined in

packages/core/src/boot.ts:182


getClientBootConfig

getClientBootConfig(initialAppConfigFunctions): BootConfig

Parameters

NameType
initialAppConfigFunctionsInitAppConfig

Returns

BootConfig

Defined in

packages/core/src/boot.ts:190


getInitialImaConfigFunctions

getInitialImaConfigFunctions(): InitImaConfig

Returns

InitImaConfig

Defined in

packages/core/src/boot.ts:166


getInitialPluginConfig

getInitialPluginConfig(): Object

Returns

Object

NameType
plugins{ name: string ; plugin: InitPluginConfig }[]

Defined in

packages/core/src/boot.ts:170


getNamespace

getNamespace(): Namespace

Returns

Namespace

Defined in

packages/core/src/Namespace.ts:125


onLoad

onLoad(): Promise<unknown>

Returns

Promise<unknown>

Defined in

packages/core/src/boot.ts:310


reviveClientApp

reviveClientApp(initialAppConfigFunctions): Promise<UnknownParameters & { app: { bootstrap: Bootstrap ; oc: ObjectContainer } ; bootConfig: BootConfig }>

Parameters

NameType
initialAppConfigFunctionsInitAppConfig

Returns

Promise<UnknownParameters & { app: { bootstrap: Bootstrap ; oc: ObjectContainer } ; bootConfig: BootConfig }>

Defined in

packages/core/src/boot.ts:289


routeClientApp

routeClientApp(app): Promise<void | UnknownParameters>

Parameters

NameType
appObject
app.bootstrapBootstrap
app.ocObjectContainer

Returns

Promise<void | UnknownParameters>

Defined in

packages/core/src/boot.ts:269