Skip to content

Commit

Permalink
add types, add proxy to package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
jakjus committed Aug 26, 2022
1 parent ef6b6f5 commit f1b9d88
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ HaxballJS.then((HBInit) => {
```

#### 💻 (Optional) Proxy
Haxball has a limit of 2 rooms per IP. Therefore, you can use proxy with adding `proxy:"<YOUR_PROXY_IP>"` in your RoomConfig.
Haxball has a limit of 2 rooms per IP. Therefore, you can use proxy with adding `proxy: "<YOUR_PROXY_IP>"` in your RoomConfig.

Example:
```js
Expand Down
49 changes: 42 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@koush/wrtc": "^0.5.3",
"@peculiar/webcrypto": "^1.3.3",
"@types/haxball-headless-browser": "^0.1.0",
"http-proxy-agent": "^5.0.0",
"json5": "^2.2.1",
"node-fetch": "^2.6.6",
"pako": "^2.0.4",
Expand Down
5 changes: 4 additions & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import "haxball-headless-browser";

export declare type Headless = (RoomConfig: RoomConfigObject) => RoomObject;
interface RoomConfigObjectM extends RoomConfigObject {
proxy?: string
}
export declare type Headless = (RoomConfig: RoomConfigObjectM) => RoomObject;

declare const HaxballJS: Promise<Headless>
export default HaxballJS

0 comments on commit f1b9d88

Please sign in to comment.