This commit is contained in:
sanex3339
2026-03-22 14:22:43 +07:00
parent bd6d89fabc
commit a33325d675
@@ -11,6 +11,11 @@ import { NodeGuards } from '../../node/NodeGuards';
@injectable()
export abstract class AbstractIdentifierNamesGenerator implements IIdentifierNamesGenerator {
/**
* @type {number}
*/
private static readonly maxGenerationAttempts: number = 1000;
/**
* @type {IOptions}
*/
@@ -21,11 +26,6 @@ export abstract class AbstractIdentifierNamesGenerator implements IIdentifierNam
*/
protected readonly randomGenerator: IRandomGenerator;
/**
* @type {number}
*/
private static readonly maxGenerationAttempts: number = 1000;
/**
* @type {Set<string>}
*/
@@ -143,9 +143,9 @@ export abstract class AbstractIdentifierNamesGenerator implements IIdentifierNam
protected checkGenerationAttempts(attempts: number): void {
if (attempts > AbstractIdentifierNamesGenerator.maxGenerationAttempts) {
throw new Error(
'Unable to generate a valid identifier name. '
+ 'This is likely caused by `reservedNames` patterns that match all generated names. '
+ 'Please check your `reservedNames` option.'
'Unable to generate a valid identifier name. ' +
'This is likely caused by `reservedNames` patterns that match all generated names. ' +
'Please check your `reservedNames` option.'
);
}
}