Skip to content

Commit fa60ded

Browse files
committed
fix: Add deprecated directive to enumsAsConst
Use the BaseTypesVisitor getNodeComment to build the comment string (which uses transformComment under the hood) rather than just using the transform. The getNodeComment method already has support for intepreting and transforming deprecated directives correctly, as is seen in the default output for enums.
1 parent 62dd4c7 commit fa60ded

File tree

1 file changed

+1
-1
lines changed
  • packages/plugins/typescript/typescript/src

1 file changed

+1
-1
lines changed

packages/plugins/typescript/typescript/src/visitor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ export class TsVisitor<
443443
transformUnderscore: true,
444444
})
445445
);
446-
const comment = transformComment(enumOption.description as any as string, 1);
446+
const comment = this.getNodeComment(enumOption);
447447
const name = enumOption.name as unknown as string;
448448
const enumValue: string | number = getValueFromConfig(name) ?? name;
449449

0 commit comments

Comments
 (0)