Skip to content

Commit 3b5951b

Browse files
committed
Add module exports for temporal types in TypeScript declarations
1 parent 00cc4c2 commit 3b5951b

File tree

1 file changed

+65
-15
lines changed

1 file changed

+65
-15
lines changed

types/v1/index.d.ts

+65-15
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,26 @@
1919

2020
import Integer, {inSafeRange, int, isInt, toNumber, toString} from "./integer";
2121
import {Node, Path, PathSegment, Relationship, UnboundRelationship} from "./graph-types";
22+
import {isPoint, Point} from "./spatial-types";
23+
import {
24+
CypherDate,
25+
CypherDateTimeWithZoneId,
26+
CypherDateTimeWithZoneOffset,
27+
CypherDuration,
28+
CypherLocalDateTime,
29+
CypherLocalTime,
30+
CypherTime,
31+
isCypherDate,
32+
isCypherDateTimeWithZoneId,
33+
isCypherDateTimeWithZoneOffset,
34+
isCypherDuration,
35+
isCypherLocalDateTime,
36+
isCypherLocalTime,
37+
isCypherTime
38+
} from "./temporal-types";
2239
import {Neo4jError, PROTOCOL_ERROR, SERVICE_UNAVAILABLE, SESSION_EXPIRED} from "./error";
2340
import Result, {Observer, StatementResult} from "./result";
24-
import ResultSummary, {
25-
Notification,
26-
NotificationPosition,
27-
Plan,
28-
ProfiledPlan,
29-
ServerInfo,
30-
StatementStatistic
31-
} from "./result-summary";
41+
import ResultSummary, {Notification, NotificationPosition, Plan, ProfiledPlan, ServerInfo, StatementStatistic} from "./result-summary";
3242
import Record from "./record";
3343
import Session from "./session";
3444
import {AuthToken, Config, Driver, EncryptionLevel, READ, SessionMode, TrustStrategy, WRITE} from "./driver";
@@ -54,14 +64,22 @@ declare function driver(url: string,
5464
config?: Config): Driver;
5565

5666
declare const types: {
57-
Node: typeof Node;
58-
Relationship: typeof Relationship;
59-
UnboundRelationship: typeof UnboundRelationship;
60-
PathSegment: typeof PathSegment;
61-
Path: typeof Path;
67+
Node: Node;
68+
Relationship: Relationship;
69+
UnboundRelationship: UnboundRelationship;
70+
PathSegment: PathSegment;
71+
Path: Path;
6272
Result: Result;
6373
ResultSummary: ResultSummary;
64-
Record: typeof Record;
74+
Record: Record;
75+
Point: Point;
76+
CypherDuration: CypherDuration;
77+
CypherLocalTime: CypherLocalTime;
78+
CypherTime: CypherTime;
79+
CypherDate: CypherDate;
80+
CypherLocalDateTime: CypherLocalDateTime;
81+
CypherDateTimeWithZoneOffset: CypherDateTimeWithZoneOffset;
82+
CypherDateTimeWithZoneId: CypherDateTimeWithZoneId;
6583
};
6684

6785
declare const session: {
@@ -125,6 +143,22 @@ declare const forExport: {
125143
NotificationPosition: NotificationPosition,
126144
Session: Session;
127145
Transaction: Transaction;
146+
Point: Point;
147+
isPoint: typeof isPoint;
148+
CypherDuration: CypherDuration;
149+
CypherLocalTime: CypherLocalTime;
150+
CypherTime: CypherTime;
151+
CypherDate: CypherDate;
152+
CypherLocalDateTime: CypherLocalDateTime;
153+
CypherDateTimeWithZoneOffset: CypherDateTimeWithZoneOffset;
154+
CypherDateTimeWithZoneId: CypherDateTimeWithZoneId;
155+
isCypherDuration: typeof isCypherDuration;
156+
isCypherLocalTime: typeof isCypherLocalTime;
157+
isCypherTime: typeof isCypherTime;
158+
isCypherDate: typeof isCypherDate;
159+
isCypherLocalDateTime: typeof isCypherLocalDateTime;
160+
isCypherDateTimeWithZoneOffset: typeof isCypherDateTimeWithZoneOffset;
161+
isCypherDateTimeWithZoneId: typeof isCypherDateTimeWithZoneId;
128162
};
129163

130164
export {
@@ -161,7 +195,23 @@ export {
161195
ServerInfo,
162196
NotificationPosition,
163197
Session,
164-
Transaction
198+
Transaction,
199+
Point,
200+
isPoint,
201+
CypherDuration,
202+
CypherLocalTime,
203+
CypherTime,
204+
CypherDate,
205+
CypherLocalDateTime,
206+
CypherDateTimeWithZoneOffset,
207+
CypherDateTimeWithZoneId,
208+
isCypherDuration,
209+
isCypherLocalTime,
210+
isCypherTime,
211+
isCypherDate,
212+
isCypherLocalDateTime,
213+
isCypherDateTimeWithZoneOffset,
214+
isCypherDateTimeWithZoneId
165215
}
166216

167217
export default forExport;

0 commit comments

Comments
 (0)