Skip to content

Support 64 bit int/fixed as number #112

@wemeetagain

Description

@wemeetagain

In order to be performant in certain usecases, we need to be able to force generated code to use number instead of bigint.

Protons should be extended to support a field option named jstype used like so:

message Foo {
  uint64 bar = 1 [jstype = JS_NUMBER];
}
import { Foo } from './foo.js'

const foo = {
  bar: 100 // a number :)
}

typeof Foo.decode(Foo.encode(foo)).bar === 'number'

See

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