@osaedasia/oresume
Version:
A user-friendly library for generating complete Single Page Applications (SPAs)
21 lines (20 loc) • 910 B
TypeScript
import { Observable } from "../../../infrastructure/observer/Observable";
import { BaseTheme } from "../types/theme/BaseTheme";
/**
* Service interface for managing themes and their CSS custom properties in the application.
* @template ThemeName Theme identifier type, defaults to never if not specified.
* @template PropName CSS custom property name type, defaults to string if not specified.
*/
export interface IThemeService<ThemeName extends string = never, PropName extends string = string> {
/**
* Observable that emits the current active theme configuration.
*/
readonly currentTheme: Observable<BaseTheme<ThemeName>>;
/**
* Provides access to CSS custom properties as var() references.
* @returns A mapped object where each key is a CSS custom property name and value is its var() reference.
*/
get var(): {
[K in PropName]: `var(--${K})`;
};
}