Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
luk3thomas committed Jan 12, 2019
1 parent dc22c68 commit 5881b1a
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,39 @@ export class BookServiceClient extends grpc.Client implements IBookServiceClient
}
```

## Gotchas

JavaScript can safely handle numbers below `Number.MAX_SAFE_INTEGER`. Beyond the
limit, it begins to overflow:

```
> 90071992547409912131 + 1
90071992547409920000
```

If you are expecting large, 64bit fields consider using a `jstype` option to
override the field type.

```proto
# example.proto
message Example {
fixed64 id = 1 [jstype = JS_STRING];
}
```

```typescript
// example_pb.d.ts
export namespace Example {
export type AsObject = {
id: string
}
}
```

## Changes
### 2.4.3
Add support for `[jstype = JS_STRING]` overrides

### 2.4.2
Update grpc version in package.json of examples, to keep consistent.
Update handlebars-helpers version to 0.10.0 to fix vulnerability version of randomatic.
Expand Down

0 comments on commit 5881b1a

Please sign in to comment.