File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -357,7 +357,39 @@ export class BookServiceClient extends grpc.Client implements IBookServiceClient
357357}
358358```
359359
360+ ## Gotchas
361+
362+ JavaScript can safely handle numbers below ` Number.MAX_SAFE_INTEGER ` . Beyond the
363+ limit, JavaScript overflows:
364+
365+ ```
366+ > 90071992547409912131 + 1
367+ 90071992547409920000
368+ ```
369+
370+ If you are expecting large, 64bit fields consider using a ` jstype ` option to
371+ override the field type.
372+
373+ ``` proto
374+ # example.proto
375+ message Example {
376+ fixed64 id = 1 [jstype = JS_STRING];
377+ }
378+ ```
379+
380+ ``` typescript
381+ // example_pb.d.ts
382+ export namespace Example {
383+ export type AsObject = {
384+ id: string
385+ }
386+ }
387+ ```
388+
360389## Changes
390+ ### 2.4.3
391+ Add support for ` [jstype = JS_STRING] ` overrides
392+
361393### 2.4.2
362394Update grpc version in package.json of examples, to keep consistent.
363395Update handlebars-helpers version to 0.10.0 to fix vulnerability version of randomatic.
You can’t perform that action at this time.
0 commit comments