From d9634d218849fb49ff5dfb4597bbb2c2d43bbf08 Mon Sep 17 00:00:00 2001 From: dcodeIO Date: Fri, 2 Dec 2016 19:17:58 +0100 Subject: [PATCH] README: TypeScript example [ci skip] --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index ba9309d14..27abcf7c7 100644 --- a/README.md +++ b/README.md @@ -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 +/// + +import * as protobuf from "protobufjs"; +... +``` + Module Structure ---------------- The library exports a flat `protobuf` namespace with the following members, ordered by category: