UNPKG

@terminus/ngx-tools

Version:

[![CircleCI][circle-badge]][circle-link] [![codecov][codecov-badge]][codecov-project] [![semantic-release][semantic-release-badge]][semantic-release] [![MIT License][license-image]][license-url] <br> [![NPM version][npm-version-image]][npm-url] [![Github

28 lines (27 loc) 733 B
/** * Ensure you only define an action once in the entirety of the application * * @param label - The action label * @returns uniqueLabel - The unique label * * @example * defineType('[log-in] User log in') as '[log-in] User log in'; */ export declare function defineType<T extends string>(label: T): T; /** * Ensure action is defined only once in the entirety of the application * * @param typeEnum * * @example * export enum actionTypes { * AssignState = '[mock-meta-reducer] Assign State', * }; * defineTypeEnum(actionTypes); */ export declare function defineTypeEnum(typeEnum: Record<string, any>): void; /** * Reset the type cache * NOTE: FOR TESTS ONLY */ export declare function resetTypeCache(): void;