mirror of
https://github.com/JonasunderscoreJones/api-worker.git
synced 2025-10-23 18:39:19 +02:00
Initial commit (by create-cloudflare CLI)
This commit is contained in:
commit
58a42872a0
1745 changed files with 741893 additions and 0 deletions
21
node_modules/capnp-ts/README.md
generated
vendored
Normal file
21
node_modules/capnp-ts/README.md
generated
vendored
Normal file
|
@ -0,0 +1,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).
|
Loading…
Add table
Add a link
Reference in a new issue