Sometimes you might have an API call that returns a base class, and the service decides which concrete type should actually be returned. Only the base class will be generated into classes.d.ts.
Wonderfully unrealistic example
public abstract Person {
public string Name {get;set;}
}
public class Staff {
public string EmployeeNumber {get;set;}
}
public class Customer {
public string CustomerNumber {get;set;}
}
public PersonBase GetPerson(int id) {
// might return a staff or customer object
}
We should have an option in the props file to specify a list of classes that should have all derived types generated automatically. So in this case, add "Person" to that list and Person/Staff/Customer would all be generated.
Current workaround: - reference the derived types in a Dummy API call.
Sometimes you might have an API call that returns a base class, and the service decides which concrete type should actually be returned. Only the base class will be generated into
classes.d.ts
.Wonderfully unrealistic example
We should have an option in the
props
file to specify a list of classes that should have all derived types generated automatically. So in this case, add "Person" to that list and Person/Staff/Customer would all be generated.Current workaround: - reference the derived types in a Dummy API call.