-
-
Notifications
You must be signed in to change notification settings - Fork 38
Description
I use a few calculated properties on the Class that is being export to Typescript and the properties do show up on the Javascript object but they are not shown in the Interface that is generated by Typescript. Which makes it harder to work with in a typescript environment because it keeps saying that it does not exist on the type. So you have to create a manual interface in typescript or do casting to get around it.
For example:
C#
public class SalesItem
{
public decimal Qty { get; set; }
public decimal Amount { get; set; }
public decimal Total => Qty * Amount;
}
Emited Typescript
export interface SalesItem{
qty : number;
amount: number;
}
Expected emitted Typescript
export interface SalesItem{
qty : number;
amount: number;
total: number;
}
Maybe there is already an attribute or something but I could not find it in the docs.
Thanks again for making this library. I am integrating it into our first internalapp and it has allowed us to share some complicated code between the front and backend quite easily.