Skip to content

Commit bc6b388

Browse files
bradenmacdonaldbigmontz
authored andcommitted
Use isolatedModules for easier compatibility with Deno (and others)
1 parent 24571eb commit bc6b388

File tree

9 files changed

+34
-22
lines changed

9 files changed

+34
-22
lines changed

packages/bolt-connection/tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"moduleResolution": "node",
1010
"downlevelIteration": true,
1111
"outDir": "lib",
12-
"allowJs": true
12+
"allowJs": true,
13+
"isolatedModules": true
1314
},
1415
"include": ["src/**/*.js"]
1516
}

packages/core/src/graph-types.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,6 @@ function isPath(obj: object): obj is Path {
380380
}
381381

382382
export {
383-
StandardDate,
384-
NumberOrInteger,
385383
Node,
386384
isNode,
387385
Relationship,
@@ -393,3 +391,7 @@ export {
393391
PathSegment,
394392
isPathSegment
395393
}
394+
export type {
395+
StandardDate,
396+
NumberOrInteger,
397+
}

packages/core/src/index.ts

+9-6
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,6 @@ export {
168168
LocalDateTime,
169169
LocalTime,
170170
Time,
171-
StandardDate,
172-
NumberOrInteger,
173171
Node,
174172
isNode,
175173
Relationship,
@@ -185,24 +183,29 @@ export {
185183
queryType,
186184
ServerInfo,
187185
Notification,
188-
NotificationPosition,
189186
Plan,
190187
ProfiledPlan,
191188
QueryStatistics,
192189
Stats,
193190
Result,
194-
QueryResult,
195-
ResultObserver,
196191
ConnectionProvider,
197192
Connection,
198193
Transaction,
199194
Session,
200-
TransactionConfig,
201195
Driver,
202196
types,
203197
driver,
204198
json,
205199
auth
206200
}
207201

202+
export type {
203+
StandardDate,
204+
NumberOrInteger,
205+
NotificationPosition,
206+
QueryResult,
207+
ResultObserver,
208+
TransactionConfig,
209+
};
210+
208211
export default forExport

packages/core/src/result-summary.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -536,11 +536,13 @@ export {
536536
queryType,
537537
ServerInfo,
538538
Notification,
539-
NotificationPosition,
540539
Plan,
541540
ProfiledPlan,
542541
QueryStatistics,
543542
Stats
544543
}
544+
export type {
545+
NotificationPosition,
546+
}
545547

546548
export default ResultSummary

packages/core/src/result.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -339,4 +339,4 @@ function replaceStacktrace(error: Error, newStack?: string | null) {
339339
}
340340

341341
export default Result
342-
export { QueryResult, ResultObserver }
342+
export type { QueryResult, ResultObserver }

packages/core/src/session.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -446,4 +446,4 @@ function _createTransactionExecutor(config?: {
446446
}
447447

448448
export default Session
449-
export { TransactionConfig }
449+
export type { TransactionConfig }

packages/core/tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"downlevelIteration": true,
1111
"outDir": "lib",
1212
"declaration": true,
13-
"declarationDir": "types"
13+
"declarationDir": "types",
14+
"isolatedModules": true
1415
},
1516
"include": ["src/**/*.ts"]
1617
}

packages/neo4j-driver-lite/src/index.ts

+10-8
Original file line numberDiff line numberDiff line change
@@ -473,26 +473,18 @@ export {
473473
temporal,
474474
Driver,
475475
Result,
476-
QueryResult,
477476
Record,
478477
ResultSummary,
479-
AuthToken,
480-
Config,
481-
EncryptionLevel,
482-
TrustStrategy,
483-
SessionMode,
484478
Node,
485479
Relationship,
486480
UnboundRelationship,
487481
PathSegment,
488482
Path,
489483
Integer,
490-
ResultObserver,
491484
Plan,
492485
ProfiledPlan,
493486
QueryStatistics,
494487
Notification,
495-
NotificationPosition,
496488
ServerInfo,
497489
Session,
498490
Transaction,
@@ -506,4 +498,14 @@ export {
506498
ConnectionProvider,
507499
Connection
508500
}
501+
export type {
502+
QueryResult,
503+
AuthToken,
504+
Config,
505+
EncryptionLevel,
506+
TrustStrategy,
507+
SessionMode,
508+
ResultObserver,
509+
NotificationPosition,
510+
}
509511
export default forExport

packages/neo4j-driver-lite/tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"downlevelIteration": true,
1111
"outDir": "lib",
1212
"declaration": true,
13-
"declarationDir": "types"
13+
"declarationDir": "types",
14+
"isolatedModules": true
1415
},
1516
"include": ["src/**/*.ts"]
1617
}

0 commit comments

Comments
 (0)