Skip to content

Commit fe4135d

Browse files
bigmontznglgzz
andauthored
Fix exported typescript types (#941)
Co-authored-by: Angelo Gazzola <[email protected]>
1 parent e221878 commit fe4135d

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

packages/neo4j-driver/test/types/export.test.ts

+15-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ import driver, {
2727
RxResult,
2828
Session,
2929
ConnectionProvider,
30-
Record
30+
Record,
31+
types
3132
} from '../../'
3233

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

7475
const record: Record = new Record(['role'], [124])
76+
77+
const instanceOfNode: boolean = dummy instanceof types.Node
78+
const instanceOfPathSegment: boolean = dummy instanceof types.PathSegment
79+
const instanceOfPath: boolean = dummy instanceof types.Path
80+
const instanceOfRelationship: boolean = dummy instanceof types.Relationship
81+
const instanceOfPoint: boolean = dummy instanceof types.Point
82+
const instanceOfDate: boolean = dummy instanceof types.Date
83+
const instanceOfDateTime: boolean = dummy instanceof types.DateTime
84+
const instanceOfDuration: boolean = dummy instanceof types.Duration
85+
const instanceOfLocalDateTime: boolean = dummy instanceof types.LocalDateTime
86+
const instanceOfLocalTime: boolean = dummy instanceof types.LocalTime
87+
const instanceOfTime: boolean = dummy instanceof types.Time
88+
const instanceOfInteger: boolean = dummy instanceof types.Integer

packages/neo4j-driver/types/index.d.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ declare function driver (
101101
): Driver
102102

103103
declare const types: {
104-
Node: Node
105-
Relationship: Relationship
106-
UnboundRelationship: UnboundRelationship
107-
PathSegment: PathSegment
108-
Path: Path
104+
Node: typeof Node
105+
Relationship: typeof Relationship
106+
UnboundRelationship: typeof UnboundRelationship
107+
PathSegment: typeof PathSegment
108+
Path: typeof Path
109109
Result: Result
110110
ResultSummary: ResultSummary
111111
Record: Record

0 commit comments

Comments
 (0)