Comments (2)
@gabrielOttopia can you include the snippet of code from encode
that stack traces?
Are you using the useNullAsOptional
flag introduced in #1017 ? Historically we've not supported null
, so unless you're using useNullAsOptional
that behavior is probably expected.
from ts-proto.
@stephenh I tried that flag and got this error:
`src/autogenerated/X/X_management.ts:241:96 - error TS2345: Argument of type '{ clientId?: { id?: string | undefined; } | null | undefined; stationId?: { id?: { id?: string | undefined; } | null | undefined; address?: { ipv4?: number | null | undefined; ipv6?: Uint8Array | null | undefined; } | null | undefined; } | null | undefined; }' is not assignable to parameter of type '{ clientId?: { id?: string | undefined; } | null | undefined; stationId?: { id?: { id?: string | undefined; } | null | undefined; address?: { ipv4?: number | null | undefined; ipv6?: Uint8Array | null | undefined; } | null | undefined; } | null | undefined; } & { ...; } & {}'.
Type '{ clientId?: { id?: string | undefined; } | null | undefined; stationId?: { id?: { id?: string | undefined; } | null | undefined; address?: { ipv4?: number | null | undefined; ipv6?: Uint8Array | null | undefined; } | null | undefined; } | null | undefined; }' is not assignable to type '{ clientId?: ({ id?: string | undefined; } & { id?: string | undefined; } & {}) | undefined; stationId?: ({ id?: { id?: string | undefined; } | null | undefined; address?: { ipv4?: number | null | undefined; ipv6?: Uint8Array | ... 1 more ... | undefined; } | null | undefined; } & { ...; } & {}) | undefined; }'.
Types of property 'clientId' are incompatible.
Type '{ id?: string | undefined; } | null | undefined' is not assignable to type '({ id?: string | undefined; } & { id?: string | undefined; } & {}) | undefined'.
Type 'null' is not assignable to type '({ id?: string | undefined; } & { id?: string | undefined; } & {}) | undefined'.
241 message.connectedClients = object.connectedClients?.map((e) => ConnectedClient.fromPartial(e)) || [];
`
` Type '{ id?: string | undefined; } | null | undefined' is not assignable to type '({ id?: string | undefined; } & { id?: string | undefined; } & {}) | undefined'.
Type 'null' is not assignable to type '({ id?: string | undefined; } & { id?: string | undefined; } & {}) | undefined'.ts(2345)
`
the error snipped i get probably wont be too helpful
from ts-proto.
Related Issues (20)
- TypeError on Runtime ChannelCredentials object HOT 1
- Using 'useDate=string' parameter; the response is still anticipating an object for Timestamp Wrapper
- Rpc doesn't account for metadata HOT 2
- Rpc is not exported by ts-proto as it previously was HOT 6
- Generated affixes HOT 5
- Conflicting protobuf definitions when using ts-proto plugin with Buf HOT 2
- Support for proto-loader "virtual" oneof field
- Release updated ts-proto-descriptors? HOT 4
- Proto import statements not being recognized HOT 1
- Support for messages with the same name as an rpc method HOT 2
- unexpected changes in `camelToSnake()` at v1.176.1 HOT 7
- Typescript as peerDependency HOT 3
- Easier to use oneof=union generated code HOT 1
- Support default instances on singular/required fields HOT 6
- Option to include generated type registry in exports HOT 5
- Consider switching many types to interfaces HOT 2
- Incorrect message names in the generated code for repeated fields HOT 2
- `nestJs=true` and `useDate=true` interferes with `@google-cloud/firestore` HOT 1
- runing cmd 'protoc' in the bash script will miss some files HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ts-proto.