Skip to content

Add type assertion to is functions #781

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 13, 2021
Merged

Conversation

thebestnom
Copy link
Contributor

Allow for easier use in typescript of is function

Copy link
Contributor

@bigmontz bigmontz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution.

It doesn't see to have harm in the changes you did, but do you mind to add unit some tests?

It could be something like:

const potentialNode :object = getSomeNode()
if (isNode(potentialNode)) {
   potentialNode.identity
}

Apart of this, it looks really nice.

@thebestnom
Copy link
Contributor Author

@bigmontz added the "test" 😅
didn't find anywhere to put the other tests (no graph types) is but it shouldn't be any different and I don't think any futther tests will make any different

Copy link
Contributor

@bigmontz bigmontz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌵

Thanks for your contribution.

Post here whenever it gets released.

@bigmontz bigmontz merged commit d8c60c5 into neo4j:4.3 Oct 13, 2021
bigmontz pushed a commit to bigmontz/neo4j-javascript-driver that referenced this pull request Oct 15, 2021
Allow for easier use in typescript of is function
@bigmontz
Copy link
Contributor

Type improvement release in version 4.3.4.

Release notes: https://github.com/neo4j/neo4j-javascript-driver/wiki/4.3-changelog#434

cc: @thebestnom

bigmontz pushed a commit that referenced this pull request Oct 15, 2021
Allow for easier use in typescript of is function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants