File tree Expand file tree Collapse file tree
typescript-generator-core/src/test/java/cz/habarta/typescript/generator Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -223,9 +223,41 @@ class Page2 {
223223 class TableGA <T > {
224224 public T [] rows ;
225225 }
226-
226+
227227 interface ExecutionResult {
228228 public <T extends Number > T getData ();
229229 }
230230
231+ @ Test
232+ public void testResolveParameter () {
233+ final Settings settings = TestUtils .settings ();
234+ final String output = new TypeScriptGenerator (settings ).generateTypeScript (Input .from (Entity1View .class ));
235+ final String nl = settings .newline ;
236+ final String expected =
237+ "interface Entity1View extends Entity1IdView {" + nl +
238+ " name: string;" + nl +
239+ "}" + nl +
240+ nl +
241+ "interface Entity1IdView extends IdView<string> {" + nl +
242+ "}" + nl +
243+ nl +
244+ "interface IdView<T extends string> {" + nl +
245+ " id: T;" + nl +
246+ "}" ;
247+ assertEquals (expected , output .trim ());
248+ }
249+
250+ public interface IdView <T extends String > {
251+ T getId ();
252+ }
253+
254+ public interface Entity1IdView extends IdView <String > {
255+ }
256+
257+ public abstract class Entity1View implements Entity1IdView {
258+ private String name ;
259+
260+ public String getName () { return name ; }
261+ }
262+
231263}
You can’t perform that action at this time.
0 commit comments