Skip to content

Commit

Permalink
Merge pull request #113 from nenoNaninu/ts-nocheck
Browse files Browse the repository at this point in the history
add @ts-nocheck to header
  • Loading branch information
nenoNaninu authored Jun 15, 2023
2 parents 6314421 + bd58d75 commit 190cfdb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/TypedSignalR.Client.TypeScript/InterfaceTranspiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ private void AddHeader(IGrouping<INamespaceSymbol, INamedTypeSymbol> interfaceTy
codeWriter.AppendLine("/* THIS (.ts) FILE IS GENERATED BY TypedSignalR.Client.TypeScript */");
codeWriter.AppendLine("/* eslint-disable */");
codeWriter.AppendLine("/* tslint:disable */");
codeWriter.AppendLine("// @ts-nocheck");
codeWriter.AppendLine("import { IStreamResult, Subject } from '@microsoft/signalr';");

var appearTypes = interfaceTypes
Expand Down
7 changes: 3 additions & 4 deletions src/TypedSignalR.Client.TypeScript/Templates/ApiTemplate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public partial class ApiTemplate : ApiTemplateBase
public virtual string TransformText()
{
this.Write("/* THIS (.ts) FILE IS GENERATED BY TypedSignalR.Client.TypeScript */\r\n/* eslint-d" +
"isable */\r\n/* tslint:disable */\r\n");
"isable */\r\n/* tslint:disable */\r\n// @ts-nocheck\r\n");
this.Write(this.ToStringHelper.ToStringWithCulture(Header));
this.Write(@"
Expand Down Expand Up @@ -74,7 +74,7 @@ public constructor(
this.Write(this.ToStringHelper.ToStringWithCulture(hubType.Name));
this.Write(">;\r\n");
}
this.Write("}\r\n\r\n// @ts-ignore\r\nexport const getHubProxyFactory = ((hubType: string) => {\r\n");
this.Write("}\r\n\r\nexport const getHubProxyFactory = ((hubType: string) => {\r\n");
foreach(var hubType in HubTypes) {
this.Write(" if(hubType === \"");
this.Write(this.ToStringHelper.ToStringWithCulture(hubType.Name));
Expand All @@ -90,8 +90,7 @@ public constructor(
this.Write(this.ToStringHelper.ToStringWithCulture(receiverType.Name));
this.Write(">;\r\n");
}
this.Write("}\r\n\r\n// @ts-ignore\r\nexport const getReceiverRegister = ((receiverType: string) =>" +
" {\r\n");
this.Write("}\r\n\r\nexport const getReceiverRegister = ((receiverType: string) => {\r\n");
foreach(var receiverType in ReceiverTypes) {
this.Write(" if(receiverType === \"");
this.Write(this.ToStringHelper.ToStringWithCulture(receiverType.Name));
Expand Down
3 changes: 1 addition & 2 deletions src/TypedSignalR.Client.TypeScript/Templates/ApiTemplate.tt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/* THIS (.ts) FILE IS GENERATED BY TypedSignalR.Client.TypeScript */
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
<#= Header #>

// components
Expand Down Expand Up @@ -50,7 +51,6 @@ export type HubProxyFactoryProvider = {
<# } #>
}

// @ts-ignore
export const getHubProxyFactory = ((hubType: string) => {
<# foreach(var hubType in HubTypes) { #>
if(hubType === "<#= hubType.Name #>") {
Expand All @@ -65,7 +65,6 @@ export type ReceiverRegisterProvider = {
<# } #>
}

// @ts-ignore
export const getReceiverRegister = ((receiverType: string) => {
<# foreach(var receiverType in ReceiverTypes) { #>
if(receiverType === "<#= receiverType.Name #>") {
Expand Down

0 comments on commit 190cfdb

Please sign in to comment.