UNPKG

@typescript-package/name

Version:

A lightweight TypeScript library for the name with prefix and suffix.

47 lines (46 loc) 1.19 kB
/** * @description * @export * @abstract * @class Affix */ export declare abstract class Affix { #private; /** * @description Define affix for the name. * @public * @static * @param {string} value A `string` type value. * @param {RegExp} [filter=Affix.filter] * @returns {string} The return value is a `string` type affix. */ static define(value: string, filter?: RegExp): string; /** * @description * @public * @static * @type {RegExp} */ static filter: RegExp; /** * @description Returns privately stored affix. * @public * @readonly * @type {string} */ get get(): string; /** * Creates an instance of child class. * @constructor * @param {?string} [affix] An optional initial `string` type value as affix. * @param {?RegExp} [filter] The filter of `RegExp` for affix. */ constructor(affix?: string, filter?: RegExp); /** * @description Sets and stores privately affix of a string type for the name. * @public * @param {string} affix A `string` type value. * @returns {this} */ set(affix: string): this; }