adam-cowley / neode

Neo4j OGM for Node.js
MIT License
394 stars 72 forks source link

Added Type Definition for detachFrom() #168

Closed alex-laycalvert closed 1 year ago

alex-laycalvert commented 2 years ago

The detachFrom() node function was missing from the types. The function docs only specify a Promise as a return so I'm not sure what type it returns exactly. Left it as returning Promise<any> and a TODO message.

Really needed this for use with typescript.

alex-laycalvert commented 1 year ago

Any chance someone could look at this and clarify the return type for detachFrom function and get this merged? @adam-cowley

alex-laycalvert commented 1 year ago

Any chance this will at least get looked at?

adam-cowley commented 1 year ago

Sure, it looks like it should be detachFrom(other): Promise<[Node, Node]>;

Side note, I'd love to know how you're using neode. Drop me an email at adam at neo4j dot com

alex-laycalvert commented 1 year ago

Thank you so much, I also need to add in a definition for NodeCollection to have a proper iterator so I can use it in for (const thing of things) ...

alex-laycalvert commented 1 year ago

All of the type definitions for those two problems are added and when using it in a typescript project there's no more errors.