Skip to content

Commit ca25b35

Browse files
authored
Merge pull request #2 from wherobots/simon/create-connection
feat(EWT-1376): adds stub for connection class with input validation
2 parents 540aa62 + a6888e1 commit ca25b35

File tree

8 files changed

+661
-3
lines changed

8 files changed

+661
-3
lines changed

.eslintrc.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,10 @@
44
"plugin:prettier/recommended",
55
"plugin:node/recommended",
66
"plugin:security/recommended-legacy"
7-
]
7+
],
8+
"rules": {
9+
"node/no-unsupported-features/es-syntax": "off",
10+
// no-missing-import gets confused by typescript `paths`
11+
"node/no-missing-import": "off"
12+
}
813
}

examples/connectionWithDefaults.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// run with: node -r @swc-node/register examples/connectionWithDefaults.ts
2+
3+
import { Connection, Runtime } from "@/index";
4+
5+
const conn = new Connection({
6+
apiKey: "00000000-0000-0000-0000-000000000000",
7+
runtime: Runtime.SEDONA,
8+
});
9+
10+
setTimeout(() => conn.close(), 5000);

0 commit comments

Comments
 (0)