@Test public void testTypeScriptDefinition() throws IOException, IllegalArgumentException { Writer out = new StringWriter(); ArrayList<Class<?>> classesToConvert = new ArrayList<Class<?>>(); classesToConvert.add(TestClass.class); Module module = new Module("mod"); new StaticFieldExporter(module, null).export(classesToConvert); module.write(out); out.close(); final String result = out.toString(); System.out.println(result); assertTrue(result.contains("export class TestClassStatic")); assertTrue(result.contains("export enum ChangedEnumName")); assertTrue(result.contains("static MY_CONSTANT_STRING: string = 'Test';")); assertTrue(result .contains("static MY_CONSTANT_ENUM_ARRAY_2: ChangedEnumName[] = [ ChangedEnumName.VAL1, ChangedEnumName.VAL2 ];")); assertFalse(result.contains("doNotExportAsStatic")); }
@Deprecated public static void export(Module module, List<Class<?>> classesToConvert) { new StaticFieldExporter(module, null).export(classesToConvert); }
StaticFieldExporter { @Deprecated public static void export(Module module, List<Class<?>> classesToConvert) { new StaticFieldExporter(module, null).export(classesToConvert); } }
StaticFieldExporter { @Deprecated public static void export(Module module, List<Class<?>> classesToConvert) { new StaticFieldExporter(module, null).export(classesToConvert); } StaticFieldExporter(Module module, Configuration conf); }
StaticFieldExporter { @Deprecated public static void export(Module module, List<Class<?>> classesToConvert) { new StaticFieldExporter(module, null).export(classesToConvert); } StaticFieldExporter(Module module, Configuration conf); @Deprecated static void export(Module module, List<Class<?>> classesToConvert); void export(List<Class<?>> classesToConvert); }
StaticFieldExporter { @Deprecated public static void export(Module module, List<Class<?>> classesToConvert) { new StaticFieldExporter(module, null).export(classesToConvert); } StaticFieldExporter(Module module, Configuration conf); @Deprecated static void export(Module module, List<Class<?>> classesToConvert); void export(List<Class<?>> classesToConvert);  }