File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
packages/core/src/getters Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -50,14 +50,14 @@ const getTypeConstEnum = (
5050 descriptions ?: string [ ] ,
5151 enumNamingConvention ?: NamingConvention ,
5252) => {
53- let enumValue = `export type ${ enumName } = typeof ${ enumName } [keyof typeof ${ enumName } ]` ;
53+ let enumValue = `export type ${ enumName } = ( typeof ${ enumName } Consts) [keyof typeof ${ enumName } Consts ]` ;
5454
5555 if ( value . endsWith ( ' | null' ) ) {
5656 value = value . replace ( ' | null' , '' ) ;
5757 enumValue += ' | null' ;
5858 }
5959
60- enumValue += ';\n' ;
60+ enumValue += ';\n\n ' ;
6161
6262 const implementation = getEnumImplementation (
6363 value ,
@@ -66,11 +66,7 @@ const getTypeConstEnum = (
6666 enumNamingConvention ,
6767 ) ;
6868
69- enumValue += '\n\n' ;
70-
71- enumValue += '// eslint-disable-next-line @typescript-eslint/no-redeclare\n' ;
72-
73- enumValue += `export const ${ enumName } = {\n${ implementation } } as const;\n` ;
69+ enumValue += `export const ${ enumName } Consts = {\n${ implementation } } as const;\n` ;
7470
7571 return enumValue ;
7672} ;
You can’t perform that action at this time.
0 commit comments