UNPKG

nakedobjects.spa

Version:

Single Page Application client for a Naked Objects application.

23 lines (22 loc) 1.05 kB
import { ContextService } from './context.service'; import { TypeResultCache } from './type-result-cache'; import { ConfigService } from './config.service'; export interface IColorServiceConfigurator { addType: (type: string, color: number) => void; addMatch: (matcher: RegExp, color: number) => void; addSubtype: (type: string, color: number) => void; setDefault: (def: number) => void; } export declare class ColorService extends TypeResultCache<number> implements IColorServiceConfigurator { private readonly configService; constructor(context: ContextService, configService: ConfigService); private typeFromUrl(url); toColorNumberFromHref: (href: string) => Promise<any>; toColorNumberFromType: (type: string | null) => Promise<any>; addType(type: string, result: number): void; addMatch(matcher: RegExp, result: number): void; addSubtype(type: string, result: number): void; setDefault(def: number): void; getDefault(): number; configureFromConfig(): void; }