/** * Generic string type but with the given suffix appended to it. * * @category String * @category Package : @augment-vir/common * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) */ export type WithSuffix = `${string}${Suffix}`; /** * Suffix for {@link addPercent} and {@link removePercent}. * * @category String * @category Package : @augment-vir/common * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) */ export declare const percentSuffix = "%"; /** * Suffix for {@link addPx} and {@link removePx}. * * @category String * @category Package : @augment-vir/common * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) */ export declare const pxSuffix = "px"; /** * Generic string type but with the `'px'` suffix appended to it. * * @category String * @category Package : @augment-vir/common * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) */ export type WithPx = WithSuffix; /** * Generic string type but with the `'%'` suffix appended to it. * * @category String * @category Package : @augment-vir/common * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) */ export type WithPercent = WithSuffix; /** * Adds the `'px'` suffix to a string if it does not already exist. * * @category String * @category Package : @augment-vir/common * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) */ export declare function addPx(input: number | string): WithPx; /** * Removes the `'px'` suffix from a string if it exists. * * @category String * @category Package : @augment-vir/common * @throws `TypeError` if the input can't be converted into a number. * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) */ export declare function removePx(input: string): number; /** * Adds the `'%'` suffix to a string if it does not already exist. * * @category String * @category Package : @augment-vir/common * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) */ export declare function addPercent(input: number | string): WithPercent; /** * Removes the `'%'` suffix from a string if it exists. * * @category String * @category Package : @augment-vir/common * @throws `TypeError` if the input can't be converted into a number. * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) */ export declare function removePercent(input: string): number; /** * Adds a suffix to a string if it does not already exist. * * @category String * @category Package : @augment-vir/common * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) */ export declare function addSuffix({ value, suffix, }: { value: unknown; suffix: Suffix; }): WithSuffix; /** * Removes a suffix from a string if it exists. * * @category String * @category Package : @augment-vir/common * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) */ export declare function removeSuffix({ value, suffix, }: { value: string; suffix: Suffix; }): string;