@@ -21,9 +21,9 @@ import base = require('@scope/jsii-calc-base');
2121const readFile = promisify ( fs . readFile ) ;
2222
2323export enum AllTypesEnum {
24- MyEnumValue ,
25- YourEnumValue = 100 ,
26- ThisIsGreat
24+ MY_ENUM_VALUE ,
25+ YOUR_ENUM_VALUE = 100 ,
26+ THIS_IS_GREAT
2727}
2828
2929export enum StringEnum {
@@ -169,7 +169,7 @@ export class AllTypes {
169169 // enum
170170
171171 public optionalEnumValue ?: StringEnum ;
172- private enumValue : AllTypesEnum = AllTypesEnum . ThisIsGreat ;
172+ private enumValue : AllTypesEnum = AllTypesEnum . THIS_IS_GREAT ;
173173
174174 get enumProperty ( ) {
175175 return this . enumValue ;
@@ -178,9 +178,9 @@ export class AllTypes {
178178 set enumProperty ( value : AllTypesEnum ) {
179179 this . enumValue = value ;
180180 switch ( value ) {
181- case AllTypesEnum . MyEnumValue :
182- case AllTypesEnum . YourEnumValue :
183- case AllTypesEnum . ThisIsGreat :
181+ case AllTypesEnum . MY_ENUM_VALUE :
182+ case AllTypesEnum . YOUR_ENUM_VALUE :
183+ case AllTypesEnum . THIS_IS_GREAT :
184184 return ;
185185 default :
186186 throw new Error ( 'Invalid enum: ' + value ) ;
@@ -1008,7 +1008,7 @@ export interface ImplictBaseOfBase extends base.BaseProps {
10081008 * See awslabs/jsii#138
10091009 */
10101010export class ReferenceEnumFromScopedPackage {
1011- public foo ?: EnumFromScopedModule = EnumFromScopedModule . Value2 ;
1011+ public foo ?: EnumFromScopedModule = EnumFromScopedModule . VALUE2 ;
10121012
10131013 public loadFoo ( ) : EnumFromScopedModule | undefined {
10141014 return this . foo ;
@@ -1594,7 +1594,7 @@ export abstract class PartiallyInitializedThisConsumer {
15941594
15951595export class ConstructorPassesThisOut {
15961596 constructor ( consumer : PartiallyInitializedThisConsumer ) {
1597- const result = consumer . consumePartiallyInitializedThis ( this , new Date ( 0 ) , AllTypesEnum . ThisIsGreat ) ;
1597+ const result = consumer . consumePartiallyInitializedThis ( this , new Date ( 0 ) , AllTypesEnum . THIS_IS_GREAT ) ;
15981598 if ( result !== 'OK' ) {
15991599 throw new Error ( `Expected OK but received ${ result } ` ) ;
16001600 }
@@ -1702,13 +1702,13 @@ export class SingletonString {
17021702 private constructor ( ) { }
17031703
17041704 public isSingletonString ( value : string ) : boolean {
1705- return value === SingletonStringEnum . SingletonString ;
1705+ return value === SingletonStringEnum . SINGLETON_STRING ;
17061706 }
17071707}
17081708/** A singleton string */
17091709export enum SingletonStringEnum {
17101710 /** 1337 */
1711- SingletonString = '3L1T3!'
1711+ SINGLETON_STRING = '3L1T3!'
17121712}
17131713/**
17141714 * Verifies that singleton enums are handled correctly
@@ -1718,11 +1718,11 @@ export enum SingletonStringEnum {
17181718export class SingletonInt {
17191719 private constructor ( ) { }
17201720 public isSingletonInt ( value : number ) : boolean {
1721- return value === SingletonIntEnum . SingletonInt ;
1721+ return value === SingletonIntEnum . SINGLETON_INT ;
17221722 }
17231723}
17241724/** A singleton integer. */
17251725export enum SingletonIntEnum {
17261726 /** Elite! */
1727- SingletonInt = 1337
1727+ SINGLETON_INT = 1337
17281728}
0 commit comments