You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When instantiating new Typescript classes by passing data to constructor, some properties do not get set if that class extends another class. (Only the properties of the extended class get set when passing data via the constructor).
Version used
V14.2.0
To Reproduce
Server side classes:
public class PaginationFilter: BaseFilter
{
public int PageNumber { get; set; }
public int PageSize { get; set; } = int.MaxValue;
}
public class BaseFilter
{
public string Keyword { get; set; }
}
The IBaseFilter type ends up hiding the 2 properties that would exist in the IPaginationFilter type:
constructor(data?: IBaseFilter) {
if (data) {
for (var property in data) {
if (data.hasOwnProperty(property))
(<any>this)[property] = (<any>data)[property];
}
}
}
The text was updated successfully, but these errors were encountered:
Describe the bug
When instantiating new Typescript classes by passing data to constructor, some properties do not get set if that class extends another class. (Only the properties of the extended class get set when passing data via the constructor).
Version used
V14.2.0
To Reproduce
Server side classes:
Code generation settings:
Auto-generated output:
Typescript usage:
Expected behavior
I expect that
filter.pageSize
andfilter.pageNumber
get assigned the values that are passed via the constructor.Additional context
While all the data that is initially passed is forwarded to the baseFilter class constructor:
The
IBaseFilter
type ends up hiding the 2 properties that would exist in theIPaginationFilter
type:The text was updated successfully, but these errors were encountered: