Skip to content

Commit

Permalink
fix: Function wrapper isn't necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
evrys committed Jul 11, 2024
1 parent 200ebed commit 97f36d3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ npm install @wandelbots/nova
The core of this package is the `NovaClient`, which represents a connection to a configured robot cell on a given Nova instance:

```ts
import { createNovaClient } from "@wandelbots/nova"
import { NovaClient } from "@wandelbots/nova"

const nova = createNovaClient({
const nova = new NovaClient({
instanceUrl: "https://example.instance.wandelbots.io",
})
```
Expand Down
5 changes: 0 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
import { NovaClient, NovaClientConfig } from "./NovaClient"
export * from "./NovaClient"
export * from "@wandelbots/wandelbots-api-client"

export function createNovaClient(config: NovaClientConfig) {
return new NovaClient(config)
}
4 changes: 2 additions & 2 deletions test/programs.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/// <reference types="vite/client" />

import { expect, test } from "vitest"
import { createNovaClient } from "../src"
import { NovaClient } from "../src"

test("running a Wandelscript program", async () => {
const nova = createNovaClient({
const nova = new NovaClient({
instanceUrl: import.meta.env.NOVA_INSTANCE_URL,
cellId: "cell",
})
Expand Down

0 comments on commit 97f36d3

Please sign in to comment.