UNPKG

impair

Version:

impair is a React framework bringing several programming concepts together in order to provide a foundation for a layered, scalable, performant and enterprise level react application.

17 lines (16 loc) 608 B
import { Dispose } from '../types'; /** * @onDispose decorator * @description This decorator is used to mark a method as a dispose method. It will automatically * create a dispose function that will be called when the instance is disposed by the disposal of the parent dependency container. * * The method can also accept an optional Cleanup function as a parameter. * * @example * \@onDispose * dispose() { * // do something * } */ export declare function onDispose(target: any, propertyKey: string): void; export declare function initOnDispose(instance: any, disposers: Dispose[]): void;