UNPKG

@studiometa/js-toolkit

Version:

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

22 lines (21 loc) • 855 B
import type { ServiceInterface } from './AbstractService.js'; import { AbstractService } from './AbstractService.js'; export interface MutationServiceProps { mutations: MutationRecord[]; } export type MutationServiceInterface = ServiceInterface<MutationServiceProps>; export type MutationServiceOptions = MutationObserverInit; export declare class MutationService extends AbstractService<MutationServiceProps> { props: MutationServiceProps; target: Node; options: MutationObserverInit; observer: MutationObserver; constructor(target?: Node, options?: MutationObserverInit); init(): void; kill(): void; } /** * Use the mutation service. * @link https://js-toolkit.studiometa.dev/api/services/useMutation.html */ export declare function useMutation(target?: Node, options?: MutationObserverInit): MutationServiceInterface;