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 1616 "stop-neo4j" : " gulp stop-neo4j" ,
1717 "run-stress-tests" : " gulp run-stress-tests" ,
1818 "run-tck" : " gulp run-tck" ,
19+ "test-types" : " tsc -p ./test/types/tsconfig.json" ,
1920 "docs" : " esdoc -c esdoc.json" ,
2021 "versionRelease" : " gulp set --version $VERSION && npm version $VERSION --no-git-tag-version"
2122 },
6263 "semver" : " ^5.3.0" ,
6364 "through2" : " ~2.0.0" ,
6465 "tmp" : " 0.0.31" ,
66+ "typescript" : " ^2.3.4" ,
6567 "vinyl-buffer" : " ^1.0.0" ,
6668 "vinyl-source-stream" : " ^1.1.0"
6769 },
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