cosmology-tech / telescope

A TypeScript Transpiler for Cosmos Protobufs ⚛️
https://cosmology.zone/products/telescope
Apache License 2.0
145 stars 43 forks source link

isScalarDefaultToNullable flag #657

Closed Zetazzz closed 1 month ago

Zetazzz commented 2 months ago

The current nullability of scalar types is default to required. This's controversial.

So a flag 'isScalarDefaultToNullable' is needed:

when isScalarDefaultToNullable is false(default), scalar types will be required if (gogoproto.nullable) is not set.

when isScalarDefaultToNullable is true, scalar types will be nullable if (gogoproto.nullable) is not set.