UNPKG

@studiometa/js-toolkit

Version:

A set of useful little bits of JavaScript to boost your project! 🚀

17 lines (16 loc) • 625 B
import type { BaseDecorator, BaseInterface } from '../Base/types.js'; import type { Base, BaseProps } from '../Base/index.js'; export interface WithGroupProps extends BaseProps { $options: { group: string; }; } export interface WithGroupInterface extends BaseInterface { get $group(): Set<Base>; } /** * Add group features to easily bind multiple components together. * * @link https://js-toolkit.studiometa.dev/api/decorators/withGroup.html */ export declare function withGroup<S extends Base = Base>(BaseClass: typeof Base, namespace?: string): BaseDecorator<WithGroupInterface, S, WithGroupProps>;