Skip to content

Fix exported typescript types (#941) #943

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
Jun 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion packages/neo4j-driver/test/types/export.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ import driver, {
RxResult,
Session,
ConnectionProvider,
Record
Record,
types
} from '../../'

const dateTime = DateTime.fromStandardDate(new Date())
Expand Down Expand Up @@ -72,3 +73,16 @@ const rxTransaction: RxTransaction = dummy
const rxResult: RxResult = dummy

const record: Record = new Record(['role'], [124])

const instanceOfNode: boolean = dummy instanceof types.Node
const instanceOfPathSegment: boolean = dummy instanceof types.PathSegment
const instanceOfPath: boolean = dummy instanceof types.Path
const instanceOfRelationship: boolean = dummy instanceof types.Relationship
const instanceOfPoint: boolean = dummy instanceof types.Point
const instanceOfDate: boolean = dummy instanceof types.Date
const instanceOfDateTime: boolean = dummy instanceof types.DateTime
const instanceOfDuration: boolean = dummy instanceof types.Duration
const instanceOfLocalDateTime: boolean = dummy instanceof types.LocalDateTime
const instanceOfLocalTime: boolean = dummy instanceof types.LocalTime
const instanceOfTime: boolean = dummy instanceof types.Time
const instanceOfInteger: boolean = dummy instanceof types.Integer
10 changes: 5 additions & 5 deletions packages/neo4j-driver/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ declare function driver (
): Driver

declare const types: {
Node: Node
Relationship: Relationship
UnboundRelationship: UnboundRelationship
PathSegment: PathSegment
Path: Path
Node: typeof Node
Relationship: typeof Relationship
UnboundRelationship: typeof UnboundRelationship
PathSegment: typeof PathSegment
Path: typeof Path
Result: Result
ResultSummary: ResultSummary
Record: Record
Expand Down