question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Duplicate dot after enum's namespace in typescript file when using dot in package name

See original GitHub issue

related #1271

#1278 breaks the package name includes dot.

$ tree
.
├── child
│   └── enum.proto
└── test.proto

1 directory, 2 files

test.proto

syntax = "proto3";

import "child/enum.proto";

package test;

message HelloRequest {
    child.DocEnum doc = 1;
}

child/enum.proto

syntax = "proto3";

package test.child;

enum DocEnum {
    DOC_ENUM_PDF = 0;
    DOC_ENUM_HTML = 1;
}
$ protoc-gen-grpc-web --version
protoc-gen-grpc-web 1.4.0
protoc -I=. *.proto --plugin=/path/to/protoc-gen-js --plugin=/path/to/protoc-gen-grpc-web --js_out=import_style=commonjs:. --grpc-web_out=import_style=commonjs+dts,mode=grpcwebtext:.
import * as jspb from 'google-protobuf'

import * as child_enum_pb from './child/enum_pb';


export class HelloRequest extends jspb.Message {
  getDoc(): child_enum_pb..DocEnum;
  setDoc(value: child_enum_pb..DocEnum): HelloRequest;

  serializeBinary(): Uint8Array;
  toObject(includeInstance?: boolean): HelloRequest.AsObject;
  static toObject(includeInstance: boolean, msg: HelloRequest): HelloRequest.AsObject;
  static serializeBinaryToWriter(message: HelloRequest, writer: jspb.BinaryWriter): void;
  static deserializeBinary(bytes: Uint8Array): HelloRequest;
  static deserializeBinaryFromReader(message: HelloRequest, reader: jspb.BinaryReader): HelloRequest;
}

export namespace HelloRequest {
  export type AsObject = {
    doc: child_enum_pb..DocEnum,
  }
}

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
sampajanocommented, Sep 28, 2022

@augi Hi FYI I’ve cut a new release containing the bug fix here: https://github.com/grpc/grpc-web/releases/tag/1.4.1

Thanks again for the support! 😃

1reaction
sampajanocommented, Sep 27, 2022

Thank you very much for the quick fix! 👍 When can we expect a new release, please? 🙏

You’re very welcome… And yes of course… No later than end of day tomorrow! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use namespaces with import in TypeScript
A solution with namespaces (not recommended). To resolve your issue, you can export your namespace: // UtilBase.ts import * as path from "path"; ......
Read more >
Documentation - Namespaces - TypeScript
This post outlines the various ways to organize your code using namespaces (previously “internal modules”) in TypeScript. As we alluded in our note...
Read more >
Documentation - Modules .d.ts - TypeScript
Comparing JavaScript to an example DTS. Common CommonJS Patterns. A module using CommonJS patterns uses module.exports to describe the exported values.
Read more >
TSConfig Reference - Docs on every TSConfig option
A TSConfig file in a directory indicates that the directory is the root of a ... Without this flag, TypeScript will allow you...
Read more >
The starting point for learning TypeScript
How to use TypeScript-powered JavaScript tooling. JS Projects Utilizing TypeScript · Type Checking JavaScript Files · JSDoc Reference · Creating .d.ts Files ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found