From 5b705d4b047640e91b690566d6e0fdbae17bb842 Mon Sep 17 00:00:00 2001 From: Shinigami Date: Wed, 1 Feb 2023 14:04:18 +0100 Subject: infra: configure lint rule array-type (#1793) --- src/modules/string/index.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/modules/string') diff --git a/src/modules/string/index.ts b/src/modules/string/index.ts index 8f62788a..6240184c 100644 --- a/src/modules/string/index.ts +++ b/src/modules/string/index.ts @@ -4,9 +4,13 @@ import type { LiteralUnion } from '../../utils/types'; export type Casing = 'upper' | 'lower' | 'mixed'; -const UPPER_CHARS: readonly string[] = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split(''); -const LOWER_CHARS: readonly string[] = 'abcdefghijklmnopqrstuvwxyz'.split(''); -const DIGIT_CHARS: readonly string[] = '0123456789'.split(''); +const UPPER_CHARS: ReadonlyArray = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split( + '' +); +const LOWER_CHARS: ReadonlyArray = 'abcdefghijklmnopqrstuvwxyz'.split( + '' +); +const DIGIT_CHARS: ReadonlyArray = '0123456789'.split(''); export type LowerAlphaChar = | 'a' @@ -200,7 +204,7 @@ export class StringModule { * * @default [] */ - exclude?: readonly LiteralUnion[] | string; + exclude?: ReadonlyArray> | string; } = {} ): string { if (typeof options === 'number') { @@ -290,7 +294,7 @@ export class StringModule { * * @default [] */ - exclude?: readonly LiteralUnion[] | string; + exclude?: ReadonlyArray> | string; } = {} ): string { if (typeof options === 'number') { @@ -567,7 +571,7 @@ export class StringModule { * * @default [] */ - exclude?: readonly LiteralUnion[] | string; + exclude?: ReadonlyArray> | string; } = {} ): string { if (typeof options === 'number') { -- cgit v1.2.3