Skip to content

Commit

Permalink
fix(protoc-gen-ng): add a @ts-nocheck comment to the generated files
Browse files Browse the repository at this point in the history
When the noUnusedLocals tsconfig compiler options is true then unused imports generate a build error
like
Error: projects/testing/src/generated/protos/greet.pbsc.ts:22:1 - error TS6133: 'googleProtobuf000' is declared but its value is never read.
from the generated line
import * as googleProtobuf000 from '@ngx-grpc/well-known-types';

this is a quick fix - a better solution would be to remove the import if it is not used in that file.
  • Loading branch information
stocksr committed Nov 10, 2021
1 parent eae0a58 commit 55ead7b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/protoc-gen-ng/src/output/misc/printer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export class Printer {
private createLeadingComment() {
return `/* tslint:disable */
/* eslint-disable */
// @ts-nocheck
//
// THIS IS A GENERATED FILE
// DO NOT MODIFY IT! YOUR CHANGES WILL BE LOST
Expand Down

0 comments on commit 55ead7b

Please sign in to comment.