File tree Expand file tree Collapse file tree 3 files changed +58
-0
lines changed Expand file tree Collapse file tree 3 files changed +58
-0
lines changed Original file line number Diff line number Diff line change 16
16
"stop-neo4j" : " gulp stop-neo4j" ,
17
17
"run-stress-tests" : " gulp run-stress-tests" ,
18
18
"run-tck" : " gulp run-tck" ,
19
+ "test-types" : " tsc -p ./test/types/tsconfig.json" ,
19
20
"docs" : " esdoc -c esdoc.json" ,
20
21
"versionRelease" : " gulp set --version $VERSION && npm version $VERSION --no-git-tag-version"
21
22
},
62
63
"semver" : " ^5.3.0" ,
63
64
"through2" : " ~2.0.0" ,
64
65
"tmp" : " 0.0.31" ,
66
+ "typescript" : " ^2.3.4" ,
65
67
"vinyl-buffer" : " ^1.0.0" ,
66
68
"vinyl-source-stream" : " ^1.1.0"
67
69
},
Original file line number Diff line number Diff line change
1
+ {
2
+ "compilerOptions" : {
3
+ "module" : " es6" ,
4
+ "target" : " es6" ,
5
+ "noImplicitAny" : true ,
6
+ "noImplicitReturns" : true ,
7
+ "strictNullChecks" : true ,
8
+ "outDir" : " ../../build/test/types"
9
+ },
10
+ "include" : [
11
+ " v1/*.test.ts" ,
12
+ " ../../types/**/*"
13
+ ]
14
+ }
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Copyright (c) 2002-2017 "Neo Technology,","
3
+ * Network Engine for Objects in Lund AB [http://neotechnology.com]
4
+ *
5
+ * This file is part of Neo4j.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
19
+
20
+ import Transaction from "../../../types/v1/transaction" ;
21
+
22
+ const dummy : any = null ;
23
+
24
+ const tx : Transaction = dummy ;
25
+
26
+ const isOpen : boolean = tx . isOpen ( ) ;
27
+ console . log ( isOpen ) ;
28
+
29
+ const runResult1 = tx . run ( "RETURN 1" ) ;
30
+ runResult1 . then ( result => {
31
+ result . records . forEach ( record => {
32
+ console . log ( record ) ;
33
+ } ) ;
34
+ } ) ;
35
+
36
+ tx . commit ( ) . catch ( error => {
37
+ console . log ( error ) ;
38
+ } ) ;
39
+
40
+ tx . rollback ( ) . catch ( error => {
41
+ console . log ( error ) ;
42
+ } ) ;
You can’t perform that action at this time.
0 commit comments