summaryrefslogtreecommitdiff
path: root/node_modules/capnp-ts/README.md
blob: a5c67234dd4455f8473f7786002b24e2ddc34cd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# capnp-ts

A strongly typed [Cap'n Proto](https://capnproto.org/) implementation for the browser and Node.js using TypeScript.

Here's a quick usage example:

```typescript
import * as capnp from 'capnp-ts';

import {MyStruct} from './myschema.capnp';

export function loadMessage(buffer: ArrayBuffer): MyStruct {

  const message = capnp.Message.fromArrayBuffer(buffer);

  return message.getRoot(MyStruct);

}
```

An extended readme is available on the project site: [https://github.com/jdiaz5513/capnp-ts](https://github.com/jdiaz5513/capnp-ts).