Skip to content
fonlow edited this page Apr 14, 2020 · 2 revisions

C#

All custom enum types are translated to client enum types with the same semantic literals. For example, DemoWebApi.DemoData.AddressType is typically translated to DemoWebApi.DemoData.Client.AddressType in type declaration and type reference.

All built-in enum types of .NET Framework and .NET Core are copied over to client codes without change. However, please note, the generated codes include only namespace System, so all enum types under this namespace are working fine since the generated codes import namespace system. However, if you do use enum types under the other namespaces such as System.Data.SqlClient.SortOrder, these enum types will appear in the generated codes, but they cannot be compiled obviously without manually importing respective namespaces.

TypeScript

All custom enum types are translated to client enum types with the same semantic literals. For example, DemoWebApi.DemoData.AddressType is typically translated to DemoWebApi_DemoData_Client.AddressType in type declaration and type reference.

All built-in enum types of .NET Framework and .NET Core are translated to number in type reference.

Clone this wiki locally