Skip to content

Allow configuration to choose BigInt over Long.js for int64 types #3047

@Will-Mann-16

Description

@Will-Mann-16

Is your feature request related to a problem? Please describe.

Inability to configure parsing int64 types to BigInt over Long.js or String - .

Describe the solution you'd like

At the moment the choices for when we can handle int64/uint64 types are only Long or String - Now with the ES2020 inclusion of BigInt which is much more compatible and doesn't rely on a third party package. We're also using ts-proto to codegen values and they give us the option but unfortunately it's not available on this library AFAIK.

Describe alternatives you've considered

We can use strings or Long.js but for us it makes much more sense in our use case to maintain using the Number type and using the BigInt option for us as it's much more futureproof.

Additional context

We're using Nest.js here with these package versions:

@nestjs/microservices: ^11.1.17
@grpc/grpc-js: ^1.14.3
@grpc/proto-loader: ^0.8.0
@nestjs/common: ^11.0.1
@nestjs/core: ^11.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions