Turn PatternKind into a non-const enum. PatternKind is later re-exported. const enums cannot be re-exported, as they are removed at compile time and don't exist at runtime. This fixes a compilation error in TS3.6: conformance_pattern_rule.ts:57:9 - error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. PiperOrigin-RevId: 270688010
diff --git a/internal/tsetse/util/pattern_config.ts b/internal/tsetse/util/pattern_config.ts index bc907b1..216ce13 100644 --- a/internal/tsetse/util/pattern_config.ts +++ b/internal/tsetse/util/pattern_config.ts
@@ -4,7 +4,7 @@ * patterns whose name match JSConformance patterns should behave similarly (see * https://github.com/google/closure-compiler/wiki/JS-Conformance-Framework) */ -export const enum PatternKind { +export enum PatternKind { BANNED_NAME = 'banned-name', BANNED_PROPERTY_WRITE = 'banned-property-write', BANNED_PROPERTY_NON_CONSTANT_WRITE = 'banned-property-non-constant-write',