This PR adds the beginnings of declaration file for the library itself. It is enough that the compiler plugin itself type checks, but obviously is missing most of the API.
From looking at capnp.js, I see that parse takes an extra optional options argument, but this isn't mentioned in the docs anywhere so I left it out of the interface for now.
I'm going to close this for now; the Schema type is likely going to need to change to support other library functionality. I may re-open this once it's a bit more mature.
Background: I'm working on a compiler plugin to generate tyepscript declaration files to work with node-capnp:
https://github.com/zenhack/capnpc-node-typescript
This PR adds the beginnings of declaration file for the library itself. It is enough that the compiler plugin itself type checks, but obviously is missing most of the API.
From looking at
capnp.js
, I see thatparse
takes an extra optionaloptions
argument, but this isn't mentioned in the docs anywhere so I left it out of the interface for now.