diff --git a/src/TypedSignalR.Client.TypeScript/Templates/ApiTemplate.cs b/src/TypedSignalR.Client.TypeScript/Templates/ApiTemplate.cs index f76af6b..905521a 100644 --- a/src/TypedSignalR.Client.TypeScript/Templates/ApiTemplate.cs +++ b/src/TypedSignalR.Client.TypeScript/Templates/ApiTemplate.cs @@ -74,7 +74,7 @@ public constructor( this.Write(this.ToStringHelper.ToStringWithCulture(hubType.Name)); this.Write(">;\r\n"); } - this.Write("}\r\n\r\nexport const getHubProxyFactory = ((hubType: string) => {\r\n"); + this.Write("}\r\n\r\n// @ts-ignore\r\nexport const getHubProxyFactory = ((hubType: string) => {\r\n"); foreach(var hubType in HubTypes) { this.Write(" if(hubType === \""); this.Write(this.ToStringHelper.ToStringWithCulture(hubType.Name)); @@ -90,7 +90,8 @@ public constructor( this.Write(this.ToStringHelper.ToStringWithCulture(receiverType.Name)); this.Write(">;\r\n"); } - this.Write("}\r\n\r\nexport const getReceiverRegister = ((receiverType: string) => {\r\n"); + this.Write("}\r\n\r\n// @ts-ignore\r\nexport const getReceiverRegister = ((receiverType: string) =>" + + " {\r\n"); foreach(var receiverType in ReceiverTypes) { this.Write(" if(receiverType === \""); this.Write(this.ToStringHelper.ToStringWithCulture(receiverType.Name)); diff --git a/src/TypedSignalR.Client.TypeScript/Templates/ApiTemplate.tt b/src/TypedSignalR.Client.TypeScript/Templates/ApiTemplate.tt index 83a6471..a1c12d8 100644 --- a/src/TypedSignalR.Client.TypeScript/Templates/ApiTemplate.tt +++ b/src/TypedSignalR.Client.TypeScript/Templates/ApiTemplate.tt @@ -50,6 +50,7 @@ export type HubProxyFactoryProvider = { <# } #> } +// @ts-ignore export const getHubProxyFactory = ((hubType: string) => { <# foreach(var hubType in HubTypes) { #> if(hubType === "<#= hubType.Name #>") { @@ -64,6 +65,7 @@ export type ReceiverRegisterProvider = { <# } #> } +// @ts-ignore export const getReceiverRegister = ((receiverType: string) => { <# foreach(var receiverType in ReceiverTypes) { #> if(receiverType === "<#= receiverType.Name #>") {