Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSC error with compiler option noUnusedLocals #243

Open
finnosdiemitdemo opened this issue Nov 25, 2023 · 2 comments
Open

TSC error with compiler option noUnusedLocals #243

finnosdiemitdemo opened this issue Nov 25, 2023 · 2 comments

Comments

@finnosdiemitdemo
Copy link

I have a .proto File with just one enum inside.

syntax = "proto3";

enum Color{
  RED = 0;
  GREEN = 1;
  BLUE = 2;
  YELLOW = 3;
}

The output typescript file always imports the google-protobuf library, even if it's not necessary.

import * as pb_1 from "google-protobuf";
export enum Color {
    RED = 0,
    GREEN = 1,
    BLUE = 2,
    YELLOW = 3
}

With the typescript compiler option noUnusedLocals enabled, the following error occurred: TS6133: 'pb_1' is declared but its value is never read.

It would be nice to add a option to solve this problem

@thesayyn
Copy link
Owner

This is not an issue anymore. Could you try with https://github.com/thesayyn/protoc-gen-ts/pkgs/npm/protoc-gen-ts/150544246?

@graup
Copy link

graup commented Nov 28, 2023

Hi! Could you push these canary releases to the "real" npm? I couldn't figure out how to install packages from the GitHub registry without authenticating. Or does anyone know how to do that?

I tried setting the registry in .yarnrc.yml

npmScopes:
  thesayyn:
    npmRegistryServer: "https://npm.pkg.github.com"

but getting this error

yarn add @thesayyn/protoc-gen-ts@0.0.0-578f3a0
➤ YN0000: ┌ Resolution step
➤ YN0041: │ @thesayyn/protoc-gen-ts@npm:0.0.0-578f3a0: Invalid authentication (as an anonymous user)
➤ YN0000: └ Completed in 0s 398ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants