Decorators (common)
@Injectable
import { Injectable } from '@hexajs-dev/common';
@Injectable(options?: InjectableOptions)
@InjectWorker
import { InjectWorker } from '@hexajs-dev/common';
@InjectWorker()
Types & Interfaces
HexaTokenRef
import { HexaTokenRef } from '@hexajs-dev/common';
interface HexaTokenRef<T> {
key: string;
value: T;
context?: HexaContext;
}
InjectableOptions
import { InjectableOptions } from '@hexajs-dev/common';
interface InjectableOptions {
context?: HexaContext;
}
Enums
HexaContext
import { HexaContext } from '@hexajs-dev/common';
enum HexaContext {
Empty = 'empty',
Content = 'content',
Background = 'background',
UI = 'ui'
}
Functions
createToken
import { createToken } from '@hexajs-dev/common';
function createToken<T>(key: string, value: T, context?: HexaContext): HexaTokenRef<T>
Inject
import { Inject } from '@hexajs-dev/common';
function Inject(token: string | HexaTokenRef<any>): ParameterDecorator