-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add TypeScript definition file
Related: #5
- Loading branch information
1 parent
a124d0b
commit bab550b
Showing
2 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/// <reference types="node" /> | ||
import { Server as HttpServer } from "http"; | ||
import { Server } from "socket.io"; | ||
|
||
interface Options { | ||
loadBalancingMethod?: "random" | "round-robin" | "least-connection"; | ||
} | ||
|
||
export declare function setupMaster(httpServer: HttpServer, opts?: Options): void; | ||
export declare function setupWorker(io: Server): void; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,13 +3,15 @@ | |
"version": "1.0.1", | ||
"description": "An alternative to the sticky-session package (https://github.com/indutny/sticky-session)", | ||
"main": "index.js", | ||
"types": "index.d.ts", | ||
"scripts": { | ||
"format:check": "prettier --check \"index.js\" \"test/**/*.js\"", | ||
"format:fix": "prettier --write \"index.js\" \"test/**/*.js\"", | ||
"test": "npm run format:check && nyc mocha --timeout 5000" | ||
}, | ||
"files": [ | ||
"index.js" | ||
"index.js", | ||
"index.d.ts" | ||
], | ||
"author": "Damien Arrachequesne <[email protected]>", | ||
"license": "MIT", | ||
|