@typescript-package/affix
Version:
A lightweight TypeScript library for the affix - prefix and suffix.
33 lines (32 loc) • 996 B
TypeScript
import { Affix } from "./affix.abstract";
/**
* @description A class to manage suffixes that can be applied to strings.
* @export
* @class Suffix
* @template {string} [Value=string] The type of suffix constrained by the `string`.
* @extends {Affix<Value>}
*/
export declare class Suffix<Value extends string = string> extends Affix<Value> {
/**
* @description Returns the `string` tag representation of the `Suffix` class when used in `Object.prototype.toString.call(instance)`.
* @public
* @readonly
* @type {string}
*/
get [Symbol.toStringTag](): string;
/**
* @description Sanitizes the suffix with a `pattern`.
* @public
* @param {string} value
* @param {RegExp} [pattern=Suffix.pattern]
* @returns {string}
*/
static sanitize<Value extends string = string>(value: Value, pattern?: RegExp): Value;
/**
* @inheritdoc
* @public
* @static
* @type {RegExp}
*/
static pattern: RegExp;
}