DefinitelyTyped/types/sticky-session/index.d.ts
vanny96 6c0f853713 Add sticky-session to types (#40704)
* Add sticky session typing

* Add sticky-session to types

* Solve package json issue and updated the project to latest commit

* Added readonly to options, optional where required and added env option

* Remove unused import
2019-12-10 11:11:02 -05:00

24 lines
664 B
TypeScript

// Type definitions for sticky-session 1.1
// Project: https://github.com/indutny/sticky-session
// Definitions by: Giovanni Barbaro <https://github.com/vanny96>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
import { Server } from "http";
/**
* Method to create the sticky session
* @param server Server used to create the session
* @param port Port where the app will be listening at
* @param options Options to customize the sticky session
*/
export function listen(
server: Server,
port?: number,
options?: {
readonly workers?: number,
readonly env?: any
}
): boolean;