Skip to content

Fix TypeScript exports for classes #428

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
Nov 20, 2018
Merged

Conversation

lutovich
Copy link
Contributor

They were previously exported in a way that did not allow user code to create instances using new. For example:

const date = new neo4j.types.Date(1, 2, 3);

did not compile.

Added tests for all types exported from neo4j.types object.

Fixes #426

They were previously exported in a way that did not allow user code
to create instances using `new`. For example:

```typescript
const date = new neo4j.types.Date(1, 2, 3);
```

did not compile.

Added tests for all types exported from `neo4j.types` object.
Copy link
Contributor

@ali-ince ali-ince left a comment

Choose a reason for hiding this comment

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

I have a small comment around exporting Node, Relationship, UnboundRelationship, PathSegment, Path and Record with constructors as this change will make them part of the public API. Would it be better to keep them as they were?

Node, Relationship, UnboundRelationship, PathSegment, Path and
Record should not be exposed in `neo4j.types` constant.
@ali-ince ali-ince merged commit 39e4ff5 into neo4j:1.7 Nov 20, 2018
@lutovich lutovich deleted the 1.7-ts-constructors branch November 20, 2018 15:16
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