diff --git a/generators/base-core/generator.ts b/generators/base-core/generator.ts index 1a5021feace3..70a376e0f1ff 100644 --- a/generators/base-core/generator.ts +++ b/generators/base-core/generator.ts @@ -644,7 +644,7 @@ You can ignore this error by passing '--skip-checks' to jhipster command.`); now = control.reproducibleLiquibaseTimestamp; } else { // Create a new counter - const newCreationTimestamp = creationTimestamp ?? this.config.get('creationTimestamp'); + const newCreationTimestamp: string = (creationTimestamp as string) ?? this.config.get('creationTimestamp'); now = newCreationTimestamp ? new Date(newCreationTimestamp) : now; now.setMilliseconds(0); } diff --git a/generators/javascript/generators/bootstrap/generator.ts b/generators/javascript/generators/bootstrap/generator.ts index 770a25f06449..889cffdf8ffc 100644 --- a/generators/javascript/generators/bootstrap/generator.ts +++ b/generators/javascript/generators/bootstrap/generator.ts @@ -80,7 +80,7 @@ export default class BootstrapGenerator extends BaseApplicationGenerator { } if (packageJsonNodeEngine) { this.packageJson.set('engines', { - ...(this.packageJson.get('engines') ?? {}), + ...((this.packageJson.get('engines') as object) ?? {}), node: typeof packageJsonNodeEngine === 'string' ? packageJsonNodeEngine : packageJson.engines.node, }); }