Skip to content

Commit

Permalink
README: TypeScript example [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
dcodeIO committed Dec 2, 2016
1 parent 926905b commit d9634d2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,15 @@ var message = AwesomeMessage.decode(buffer);

Custom classes are automatically populated with static `encode`, `encodeDelimited`, `decode`, `decodeDelimited` and `verify` methods and reference their reflected type via the `$type` property. Note that there are no methods (just `$type`) on instances by default as method names might conflict with field names.

### Usage with TypeScript

```ts
/// <reference path="node_modules/protobufjs/types/protobuf.js.d.ts" />

import * as protobuf from "protobufjs";
...
```

Module Structure
----------------
The library exports a flat `protobuf` namespace with the following members, ordered by category:
Expand Down

0 comments on commit d9634d2

Please sign in to comment.