diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index 4783e954564..91191d97100 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -3319,16 +3319,15 @@ export class Converter { aliasKey: AliasKey, valueKey: ValueKey, ): Properties & Record { - if (this.options.suppressDeprecatedPropertyWarnings) { - (node as any)[aliasKey] = node[valueKey]; - return node as Properties & Record; - } - let warned = false; Object.defineProperty(node, aliasKey, { configurable: true, get(): Properties[typeof valueKey] { + if (this.options.suppressDeprecatedPropertyWarnings) { + (node as any)[aliasKey] = node[valueKey]; + } + if (!warned) { // eslint-disable-next-line no-console console.warn(