Browse files

README: TypeScript example [ci skip]

  • Loading branch information...
dcodeIO committed Dec 2, 2016
1 parent 926905b commit d9634d218849fb49ff5dfb4597bbb2c2d43bbf08
Showing with 9 additions and 0 deletions.
  1. +9 −0
@@ -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
/// <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:

0 comments on commit d9634d2

Please sign in to comment.