socket-api icon indicating copy to clipboard operation
socket-api copied to clipboard

Typescript Types

Open ccorcos opened this issue 3 years ago • 1 comments

Experimenting with building typescript types from JSDoc comments.

https://github.com/socketsupply/socket/issues/14

There are a variety of little problems left to solve though...

  • TypedArray isn't a global type currently so that needs to get injected.
  • err is not a type. Could just change these to Error
  • Several places with a non-optional argument followed by an optional argument: options?: any | undefined, callback: Function
  • Some types need to be imported from elsewhere for the types to work, like fs.ReadStream

All in all, this seems pretty achievable, but I'm afraid this is an 80-20 effort so far and much pain and suffering lies again. haha

ccorcos avatar Oct 12 '22 20:10 ccorcos

@jwerle Is this change still applicable? I'm trying to reassess everything now that the ipc-cleanup branch has landed.

trevnorris avatar Jan 17 '23 23:01 trevnorris