-
Notifications
You must be signed in to change notification settings - Fork 17
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
protoc-gen-tstypes: Generating types for dependencies #24
Comments
@mousavian we have a couple of options here. Can you weigh in on how you’d expect it to work? |
imported types also fails for protoc-gen-flowtypes for me. What are the options there for types with dependency? @tmc |
@shanshanzhu @mousavian the implementation work here isn't hard -- can you propose how you'd expect the output to end up as a design recommendation? |
Thanks for this generator, @tmc There's some info about the canonical JSON mapping: This is what I came up with so far: declare namespace google.protobuf {
type Any = {
"@type": string;
[index: string]: any
};
type Timestamp = string;
type Duration = string;
type Struct = { [index: string]: Value };
type DoubleValue = number | 'NaN' | 'Infinity' | '-Infinity';
type FloatValue = number | 'NaN' | 'Infinity' | '-Infinity';
type Int64Value = string;
type UInt64Value = number;
type Int32Value = number;
type UInt32Value = number;
type BoolValue = boolean;
type StringValue = string;
type BytesValue = string;
type Empty = {};
type NullValue = null;
type ListValue = Value[];
type Value = string | number | boolean | any[] | null;
type FieldMask = string;
} |
Consider having this definition:
Inside generated files, it can't resolve timestamp's type from google namespace.
![screen shot 2018-09-05 at 4 53 22 pm](https://user-images.githubusercontent.com/317322/45082644-5f478480-b12c-11e8-98e3-b9be2f1c0112.png)
Am I missing anything or I has not been implemented?
Because I didn't see any handler for
f.GetDependencies()
in the generator.The text was updated successfully, but these errors were encountered: