Skip to content

List of generics export #8

@joachim-heck

Description

@joachim-heck

Hey Kai, I figured out a bit of a special case, where the conversion to typescript seems to be lacking.

I'm creating a generic type

public class GenericType<T>
 {
     public int Value1 { get; set; }

     public T GenericValue { get; set; }

 }

which will be used in a list with another custom type

public class InnerCustomType
{
    public int CustomValue1 { get; set; }
}

in the following exported class

public class ExportedType
{
    public List<GenericType<InnerCustomType>> Listing { get; set; }
}

this will be exported as:

// ------------------------------------------------------------------------------
//  <auto-generated>
//      This code was generated with KY.Generator 2.7.1.0
//      Manual changes to this file may cause unexpected behavior in your application.
//      Manual changes to this file will be overwritten if the code is regenerated.
//  </auto-generated>
// ------------------------------------------------------------------------------
// tslint:disable

import { GenericType } from "./generic-type";
import { InnerCustomType } from "./inner-custom-type";

export class ExportedType {
 public listing: GenericType[];

 public constructor(init: Partial<ExportedType> = undefined) {
     Object.assign(this, init);
 }
}

Where the GenericType doesn't get resolved correctly.
What do you think - is this a quite too exotic scenario?

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingnext releaseTry to add this issue to next release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions