mirror of
https://github.com/cincheo/jsweet.git
synced 2025-12-15 15:29:22 +00:00
Added support for typscript string enums.
This commit is contained in:
parent
8bb9b89243
commit
df4d8bd91d
@ -260,7 +260,7 @@
|
||||
<dependency>
|
||||
<groupId>org.jsweet</groupId>
|
||||
<artifactId>jsweet-core</artifactId>
|
||||
<version>6.0.3</version>
|
||||
<version>6.0.4</version>
|
||||
<scope>test</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
@ -40,6 +40,7 @@ import source.enums.EnumsImplementingInterfaces;
|
||||
import source.enums.EnumsReflection;
|
||||
import source.enums.ErasedEnum;
|
||||
import source.enums.MyComplexEnum2;
|
||||
import source.enums.StringEnumType;
|
||||
import source.enums.StringEnums;
|
||||
import source.enums.SwitchWithEnumWrapper;
|
||||
import source.enums.other.ComplexEnumsAccess;
|
||||
@ -200,4 +201,8 @@ public class EnumTests extends AbstractTest {
|
||||
}, getSourceFile(EnumInOtherPackage.class), getSourceFile(EnumWrapper.class), getSourceFile(SwitchWithEnumWrapper.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testStringEnum() {
|
||||
transpile(TestTranspilationHandler::assertNoProblems, getSourceFile(StringEnumType.class));
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,9 @@
|
||||
package source.enums;
|
||||
|
||||
|
||||
import jsweet.lang.StringEnum;
|
||||
|
||||
@StringEnum
|
||||
public enum StringEnumType {
|
||||
TEST1, TEST2, TEST3
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user