Skip to content

Core API ​

@makoojs/core runs in the browser: it creates Core instances, declares components and listeners, reads status, and handles errors. If this is your first time, complete the Quick Start first.

Export Index ​

Functions ​

ExportPurposeReference
createMakoo()Create a Core instanceCore Instance
inject()Declare a componentDeclarations
injectEach()Declare an Each Injection: one component on every matching elementDeclarations
listen()Declare a host listenerDeclarations

Classes and Constants ​

ExportPurposeReference
MakooErrorErrors thrown or reported by MakooErrors
MakooAggregateErrorCollects multiple child errorsErrors
MakooErrorCodeCore error codesErrors

Types ​

TypeReference
MakooRuntimeCore Instance
ComponentInjection, ComponentEachInjection, ChildInjection, ListenerInjectionCore Instance
MakooComponentInput, MakooComponentDeclarationDeclarations
MakooComponentEachInput, MakooComponentEachDeclarationDeclarations
MakooListenerInput, MakooListenerDeclarationDeclarations
MakooInjectionDeclarationDeclarations
ComponentCommand, ChildCommand, ListenerCommand, InjectionCommandCommands and Status
ComponentStatusHandle, ComponentEachStatusHandle, ChildStatusHandle, ListenerStatusHandle, InjectionStatusHandleCommands and Status
ComponentStatus, ComponentEachStatus, ListenerStatusCommands and Status
StateViewCommands and Status
ObservationNotice, ObservationHandlerCommands and Status
MountAdapter, AdapterMountParamsAdapter Contract

Minimal Example ​

ts
import { createMakoo, inject } from '@makoojs/core';
import { createVueAdapter } from '@makoojs/vue';
import Panel from './Panel.vue';

const core = createMakoo();
core.useAdapter(createVueAdapter());
core.apply([
  inject({ name: 'panel', injectAt: 'body', adapter: 'vue', component: Panel })
]);

For the APIs used inside Vue and React components, see Vue and React.