Duplicate dot after enum's namespace in typescript file when using dot in package name
See original GitHub issuerelated #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:
- Created a year ago
- Comments:5 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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! 😃
You’re very welcome… And yes of course… No later than end of day tomorrow! 😃